Hello,
Currently I'm trying to create an incident by REST API using the endpoint api/respond/rest/orgs/xxxxx/incidents.
My question is, Exist a kind of minimum data to set in the json body?
Like when i create the incident by api only set the name. Could somebody give me an example please?
My code is some like this:
def generarCaso(query):
auth = HTTPBasicAuth("xxxxxx", "xxxxxx")
try:
respuesta_api = requests.post("endpointurl", auth=auth, json=query, verify=False)
respuesta_api.raise_for_status()
salida_api = respuesta_api.json()
print ("La salida es {}".format(salida_api))
except ChunkedEncodingError as e:
print(f"Error de ChunkedEncoding: {e}")
except requests.RequestException as e:
print(f"Error de solicitud: {e}")
and the json that i trying to put in the request is
query ='''
{
"name" : "test",
"discovered_date" : 1620020451000,
"plan_status" : "O",
}
'''
------------------------------
Juan Parentini
------------------------------