#Python version - 3.9
#需要安装requests模块
import requests
headers = {"authtoken":"2D02FD93-9BD8-484E-ADEF-727FA69A161B"}
input_data = '''{
"change": {
"template": {
"id": "1"
},
"next_review_on": {
"value": "1671392007925"
},
"category": {
"id": "3"
},
"services": [
{
"id": "1"
}
],
"subcategory": {
"id": "8"
},
"item": {
"id": "8"
},
"description": "description",
"title": "WAN - Port - Reconfigure",
"change_type": {
"id": "2"
},
"change_manager": {
"id": "5"
},
"change_owner": {
"id": "5"
},
"priority": {
"id": "4"
},
"scheduled_end_time": {
"value": "1487874599999"
},
"impact": {
"id": "3"
},
"urgency": {
"id": "3"
},
"risk": {
"id": "3"
},
"scheduled_start_time": {
"value": "1487183400000"
},
"assets": [],
"change_requester": {
"id": "4"
},
"workflow": {
"id": "1"
},
"reason_for_change": {
"id": "2"
},
"roles": [
{
"role": {
"id": "8"
},
"user": {
"id": "5"
}
},
{
"role": {
"id": "8"
},
"user": {
"id": "7"
}
}
],
"stage": {
"id": "1"
},
"status": {
"id": "3"
}
}
}'''
data = {'input_data': input_data}
response = requests.post(url,headers=headers,data=data,verify=False)
print(response.text)