Demisto : How to display List of Messages

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

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()

create_incident_request.name = 'Sample1 Incident with custom fields'
create_incident_request.type = 'Access'
create_incident_request.owner = 'Admin'
create_incident_request.custom_fields= {'src': '1.1.1.1',
'dest': '192.168.1.1',
'malwarefamily': 'Trojan.Generic',
'filehash': '142b638c6a60b60c7f9928da4fb85a5a8e1422a9ffdc9ee49e17e56ccca9cf6e',
'vendorproduct': 'Secure Producnt',
'messages':"[{'messageid': 1, 'messagedetails':'First Message'}, {'messageid': 2, 'messagedetails':'Second Message'}]"
}

try:
api_response = api_instance.create_incident(create_incident_request=create_incident_request)
print(api_response)
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.

 

1 REPLY 1

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.

Visit our Cortex XDR Customer Corner on Live Community to access resources for your product journey, engage in discussions with community members and subject matter experts, and register for upcoming events!

*Cortex XDR Customer Corner: https://live.paloaltonetworks.com/t5/cortex-xdr-customer-corner/ct-p/Cortex_XDR_Customer_Corner

Join our Cortex XDR Office Hours to receive live guidance and training from our Customer Success Architects.

*Cortex XDR Office Hours [NAM]: https://paloaltonetworks.zoom.us/webinar/register/3316669859020/WN_yMpAB-aBTt6xk2h-gsra4w
*Cortex XDR Office Hours [EMEA/APAC]: https://paloaltonetworks.zoom.us/webinar/register/4116709604301/WN_CZuFE5CHQbG9LUEqugsIOw
  • 2365 Views
  • 1 replies
  • 0 Likes
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!