#Python version - 3.9
#需要安装requests模块
import requests
headers = {"authtoken":"2D02FD93-9BD8-484E-ADEF-727FA69A161B"}
input_data = '''{
"change": {
"title": "WAN - Port - Reconfigure",
"roles": [
{
"role": {
"id": "8"
},
"id": "1",
"user": {
"id": "5"
}
},
{
"role": {
"id": "8"
},
"id": "2",
"user": {
"id": "7"
}
}
],
"change_requester": {
"id": "4"
},
"change_manager": {
"id": "5"
},
"back_out_plan": {
"description": "test",
"id": "301"
},
"roll_out_plan": {
"description": "test",
"id": "302"
},
"impact_details": {
"description": "test",
"id": "303"
},
"checklist": {
"description": "test",
"id": "304"
},
"review_details": {
"description": "test",
"id": "305"
},
"close_details": {
"description": "test",
"id": "306"
}
}
}'''
data = {'input_data': input_data}
response = requests.put(url,headers=headers,data=data,verify=False)
print(response.text)