API Python
API Python
Im trying use the API to create a ticket, but I just got the response 200 without any error.
Im using this:
import requests
import json
u rl = '
http://xxxxx/sdpapi/request'
TechnicianKey = 'xxxxx'
resultjson = {}
params={
"operation":{
"details":{
"subject": "teste 123as123",
"description": "descrição",
"requester": "Monitoramento Zabbix",
"account": "Account",
"site": "Site",
"group": "Group",
"category":"Category",
"subcategory":"DC",
"item":"ALERTAS",
"Request type ":"Incidente"
}}}
with requests.Session() as s:
data = {
'INPUT_DATA': params,
'TECHNICIAN_KEY': TechnicianKey,
'format': 'json',
'OPERATION_NAME': 'ADD_REQUEST',
}
r = s.post(url, data)
print(r)
What is wrong?
Already testes on html/APICall.html and everything is ok.