Would u like to check the issue about adding the request with technician key=none or any under https protocol, request also can added successfully.
Please check and response.
# -*-coding:utf-8-*-
import requests,codecs,sys,pprint,xml,json
with requests.Session() as s:
url = 'https://localhost:8443/sdpapi/request' #/*--替换成实际的URL链接--*/
OPERATION_NAME = 'ADD_REQUEST'
TechnicianKey ='4D42B066-7DF7-4C10-B047-5644D9709D69111111' #/*--替换成实际的key--*/
jsonData='''{
"operation": {
"details": {
"requester": "Guest",
"subject": "Specify Subject03",
"description": "Specify Description001",
"technician": "frank",
"status": "open",
}
}
}'''
json_data = json.dumps(jsonData)
data = {'OPERATION_NAME':OPERATION_NAME,'TECHNICIAN_KEY':TechnicianKey,'INPUT_DATA':jsonData,'format':'json'}
#args={'OPERATION_NAME':'ADD_REQUEST','TECHNICIAN_KEY':'E49F6162-262C-43EB-BD1F-E19EE31712BC','format':'json','INPUT_DATA':{"operation": {"details": {"requester": "Shawn Adams","subject": "Specify Subject","description": "Specify Description","priority": "High","technician": "administrator","status": "open"}}}}
s.post(url,verify=False) #/*--该语句应用在ssl场景下--*/
response=s.post(url,params=data)
if(response.status_code == 200):#Checking if the API Request was Submitted successfully.The Status Code 200 is returned if the POST operation was successful.
print("request Added successfully")#This message can be customized based on your requirement.
else :
print("problem submitting request")