获取一个或多个变更摘要

获取一个或多个变更摘要

API调用URL地址

http://<serverName>:<portNumber>/api/v3/changes/summary?ids={change_ids}

其中{change_ids}为需要获取摘要信息的变更ID,多个使用逗号隔开。

示例:http://192.168.0.163:8080/api/v3/changes/summary?ids=3,4

请求参数

方法:GET

请求参数:

参数名

位置

authtoken

<API Key>

header

 

响应示例

 {

    "summary":[
        {
            "id":3,
            "task_completed_count":0,
            "task_total_count":0,
            "my_task_total_count":0,
            "my_task_completed_count":0
        }
,
        {
            "id":4,
            "task_completed_count":0,
            "task_total_count":0,
            "my_task_total_count":0,
            "my_task_completed_count":0
        }

    ]
,
    "response_status":[
        {
            "status_code":2000,
            "id":"3",
            "status":"success"
        }
,
        {
            "status_code":2000,
            "id":"4",
            "status":"success"
        }

    ]

}

Postman示例

 

Python脚本示例

#Python version - 3.9
#需要安装requests模块
import requests
 
url = "http://192.168.0.163:8080/api/v3/changes/summary?ids=3,4"
headers = {"authtoken":"2D02FD93-9BD8-484E-ADEF-727FA69A161B"}
response = requests.get(url,headers=headers,verify=False)
print(response.text)