indicator extract data

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

indicator extract data

L0 Member

im working on a project with xsoar indicators, we want to add a extra field to the layout that describes what the analist have to look for when certain indicators are present, now that problem that im running into is im trying to make a dynamic section script to call the extra data from our api but i need the tags we have given the indicator, but the tags are gathered using the custom field to be loaded in and as such i can't seem to gather the data i need in the script to dynamically get the right data from our api. is there anyway i could gather the data thats present in the indicator with my script using demisto-sdk?

1 accepted solution

Accepted Solutions

L4 Transporter

If you're using an XSOAR automation that is tagged as a "dynamic-indicator-section", then the indicator including it's fields are passed into automatically as an argument called "indicator"

 

 

def main():
    # magic
    # the indicator is passed automatically into an argument called "indicator"
    indicator = demisto.args().get('indicator')
    custom_fields = indicator.get("CustomFields",{})
    return_results(CommandResults(readable_output=json.dumps(custom_fields,indent=2)))


if __name__ in ('__main__', '__builtin__', 'builtins'):
    main()

 

 

Basically create your automation, tag it with dynamic-indicator-section, and add it to an Indicator Layout:

 

Screenshot 2023-05-05 at 8.56.05 AM.pngScreenshot 2023-05-05 at 8.56.11 AM.png

 

View solution in original post

2 REPLIES 2

L4 Transporter

If you're using an XSOAR automation that is tagged as a "dynamic-indicator-section", then the indicator including it's fields are passed into automatically as an argument called "indicator"

 

 

def main():
    # magic
    # the indicator is passed automatically into an argument called "indicator"
    indicator = demisto.args().get('indicator')
    custom_fields = indicator.get("CustomFields",{})
    return_results(CommandResults(readable_output=json.dumps(custom_fields,indent=2)))


if __name__ in ('__main__', '__builtin__', 'builtins'):
    main()

 

 

Basically create your automation, tag it with dynamic-indicator-section, and add it to an Indicator Layout:

 

Screenshot 2023-05-05 at 8.56.05 AM.pngScreenshot 2023-05-05 at 8.56.11 AM.png

 

thank you for helping me with this 🙂

  • 1 accepted solution
  • 1251 Views
  • 2 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!