I have a python app that is giving a HTTP 500 when I run it. If I call the same API from a different app it works fine. If I remove the token variable from Authorization header I will get a 401, so it seems I may have a formatting issue somewhere but not seeing it.
token = r.text
incurl= "https://api-url"
data = {
"values": {
"First_Name": "name",
"Last_Name":"name",
"z1D_Action": "CREATE",
"Status":"Assigned",
"Service_Type":"User Service Restoration",
"Impact": "4-Minor/Localized",
"Urgency": "3-Medium",
"Description":"Missing Call Type",
"Reported Source": "Direct Input",
"Detailed_Decription":"Missing Call Type. Look at the Application Event Viewer on <server_name>.",
"Assigned Support Company":"work",
"Assigned Support Organization":"Global Operations",
"Assigned Group":"Team A",
"Product Categorization Tier 1":"Telecom",
"Product Categorization Tier 2":"Software",
"Product Categorization Tier 3":"Call Center",
"Categorization Tier 1":"Failure/Repair",
"Categorization Tier 2":"Missing Data/Modify",
"Product Name":"UCCE"
}
}
hdr = {
'Content-Type': 'application/json',
'Authorization': token
}
r=requests.post(incurl, headers=hdr, json=data)
print('Incident Request Status:', r.status_code)