Demisto : How to display List of Messages

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Demisto : How to display List of Messages

L0 Member

Hi Team, I am using create_incident API to create incidents. Below is the sample code. I can create an incident when I use "messages" as String.  Basically, this is custom_fields and its data vary from incident to incident.  Some incidents may have  0 messages in the string array or some may have 10 messages. 



api_instance = demisto_client.configure(base_url=base_url, api_key=api_key, debug=False, verify_ssl=False)
create_incident_request = demisto_client.demisto_api.CreateIncidentRequest() = 'Sample1 Incident with custom fields'
create_incident_request.type = 'Access'
create_incident_request.owner = 'Admin'
create_incident_request.custom_fields= {'src': '',
'dest': '',
'malwarefamily': 'Trojan.Generic',
'filehash': '142b638c6a60b60c7f9928da4fb85a5a8e1422a9ffdc9ee49e17e56ccca9cf6e',
'vendorproduct': 'Secure Producnt',
'messages':"[{'messageid': 1, 'messagedetails':'First Message'}, {'messageid': 2, 'messagedetails':'Second Message'}]"

api_response = api_instance.create_incident(create_incident_request=create_incident_request)
except ApiException as e:
print("Exception when calling DefaultApi->create_incident: %s\n" % e)


Is there any field type I can choose or Any way I can show these custom_fields messages in the form of a table on the incident screen? 


Screenshot from 2020-10-22 22-29-37.png

Thanks in advance.



L4 Transporter

Hi JSannake,


It looks like you have a query for the XSOAR community. I would recommend posting this inquiry in their Live Community section.

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!