- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
10-20-2022 08:17 PM
I'm working with a Python automation, and I need to get the numeric incident id. I expect this id to be numeric (123456) but it is always a long concatenated hex string and GUID.
incident = demisto.incidents()[0]
incident_id = incident['id']
print(incident_id )
Output is: 89a633e1ef019afeee78fbb2ac23ee84$&$234f4f55-5c46-44b1-8662-6f65039a9a0c
I need a ordinal numeric value like #19119 (number seen in incidents list). How are these ids related?
10-21-2022 12:11 AM
If you are running this command as a test in the playground, the playground always returns this GUID like string.
Running it in a real incident should return the incident ID.
You can also use demisto.incident() to get the incident data of the incident in which the script is running in (rather than getting all incidents and pulling the first one off the list).
Regards
Adam
10-21-2022 12:11 AM
If you are running this command as a test in the playground, the playground always returns this GUID like string.
Running it in a real incident should return the incident ID.
You can also use demisto.incident() to get the incident data of the incident in which the script is running in (rather than getting all incidents and pulling the first one off the list).
Regards
Adam
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!