- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Enhanced Security Measures in Place: To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.
07-19-2023 05:07 AM
Hi all,
I am creating an incident with script as following:
uri = f'/incident'
body = {
"name": incident_name,
"type": incident_type,
"createInvestigation": True,
#"rawJSON": json.dumps({'hello': 'test'})
}
return execute_command('demisto-api-post', {'uri': uri, 'body': body}, fail_on_error=False)
and i want to use a field that type is json. My purpose when i create an incident, i want to send args for playbook (if I give an input in rawjson, I can reach the result with the operations I will do here.) For example -> rawJSON: {"password":"defaultpassword"} and in playbook, I can get these on the playbook.
But rawJson doesn't work. Do you have any idea?
07-19-2023 07:54 AM
Far as I know the /incident doesn't accept the rawJSON, you gotta build the body and send in the fields you want, example below.
Better option is to use /incident/json endpoint as this will accept a raw json body, and you and then add a Classifier and Mapper to it via Settings -> Objects Setup -> Incidents -> Classifiers and Mappers -> API Endpoints (3 dots on right side) -> Incident API.
/incident/json body example:
/incident API body example
07-19-2023 07:54 AM
Far as I know the /incident doesn't accept the rawJSON, you gotta build the body and send in the fields you want, example below.
Better option is to use /incident/json endpoint as this will accept a raw json body, and you and then add a Classifier and Mapper to it via Settings -> Objects Setup -> Incidents -> Classifiers and Mappers -> API Endpoints (3 dots on right side) -> Incident API.
/incident/json body example:
/incident API body example
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!