API调用URL地址
http://<serverName>:<portNumber>/api/v3/requests/{request_id}/resolutions
其中{request_id}为待添加解决方法的请求ID
示例:http://192.168.1.8:8080/api/v3/requests/12/resolutions
请求参数
方法:POST
请求参数:
参数名
|
值
|
位置
|
input_data
|
<JSON_String>
|
body
|
authtoken
|
<API Key>
|
header
|
输入示例
{
"resolution":{
"content":"测试解决方法"
}
}
响应示例
{
"response_status": {
"status_code": 2000,
"messages": [
{
"status_code": 2000,
"type": "success",
"message": "成功添加解决方法。"
}
],
"status": "success"
}
}
Postman示例
Python脚本示例
#Python version - 3.9
#需要安装requests模块
import requests
url = "http://192.168.1.8:8080/api/v3/requests/12/resolutions"
headers = {"authtoken":"9E5E6F38-CA0E-4EC9-B7A8-60F7726FC926"}
input_data = '''{
"resolution": {
"content": "sample resolution"
}
}'''
data = {'input_data': input_data}
response = requests.post(url,headers=headers,data=data,verify=False)
print(response.text)