Created on
01-16-2025
02:49 AM
Edited on
01-16-2025
03:20 AM
By
Anthony_E
Description
This article describes how to create an API Call using Utilities Connector to list all values of a picklist.
Scope
FortiSOAR v7.
Solution
Sample output: System Picklist AlertState should list all the values New, Detail Extracted, Indicator Extracted, Similar Alerts Correlated, Ready to Investigate, and SLA Set.
Note down the picklist IRI:
- Create a playbook with 2 steps mainly: Under Utilities -> Action - FSR: Make FortiSOAR API Call.
Inputs: /api/3/picklist_names/picklist-iri
HTTP Method: GET
Step Utilites: PicklistName - {{vars.steps.Fetch_Picklist.data.picklists}}
- Set Variable 'listDetails' with below for loop:
{%- set res = [] -%}
{%- for item in vars.PicklistName -%}
{%- set _dummy = res.append(item.itemValue) -%}
{%- endfor -%}
{{res}}
- Save and run the playbook, now the output will list all the picklist values.
It is possible to find attached, the playbook 'Get_Picklist_Values.json' for reference.