其中{request_id}为需要获取关联变更的请求ID
示例:http://192.168.0.39:8080/api/v3/requests/14/request_caused_by_change
请求参数
方法:GET
请求参数:
参数名
|
值
|
位置
|
authtoken
|
<API Key>
|
header
|
响应示例
{
"response_status": [
{
"status_code": 2000,
"status": "success"
}
],
"request_caused_by_change": [
{
"change": {
"short_description": "",
"id": "1",
"title": "该变更造成了请求14"
}
}
],
"list_info": {
"has_more_rows": false,
"start_index": 1,
"row_count": 1
}
}
Postman示例
Python脚本示例
#Python version - 3.9
#需要安装requests模块
import requests
url = "http://192.168.0.39:8080/api/v3/requests/14/request_caused_by_change"
headers = {"authtoken":"9E5E6F38-CA0E-4EC9-B7A8-60F7726FC926"}
response = requests.get(url,headers=headers,verify=False)
print(response.text)