#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
def DataDic():
    url = 'http://jira.xxx.com/rest/gadget/1.0/login'
    auth = {
        "os_username": "登录账号",
        "os_password": "登录密码",
        "os_cookie": "true",
        "os_captcha": ""
    }
    session = requests.session()
    session.post(url, auth)
    #jira的高级查询sql
    today_deploy_plan = "project = BCM"
    payload = {
        "jql": today_deploy_plan,
         #根据判断条件取出的条数,默认是取300-400之间
        'maxResults':5000
    }
    uri = "http://jira.xxx.com/rest/api/2/search"
    rep = session.get(uri, params=payload)
    if rep.status_code == 200:
        datalist = rep.json()
    else:
        print("服务器返回异常")
    return datalist

  

相关文章:

  • 2021-06-17
  • 2021-08-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-03
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2021-06-16
  • 2021-10-05
  • 2021-10-10
相关资源
相似解决方案