FortiSOAR Knowledge Base
FortiSOAR: Security Orchestration and Response software provides innovative case management, automation, and orchestration. It pulls together all of an organization's tools, helps unify operations, and reduce alert fatigue, context switching, and the mean time to respond to incidents.
premchanderr
Staff
Staff
Article Id 370631
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:

 

Picklist_IRI.png

 
  1. 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}}

 

Utilities_PicklistIRI.png

 

  1. Set Variable 'listDetails' with below for loop:

 

{%- set res = [] -%}
{%- for item in vars.PicklistName -%}
{%- set _dummy = res.append(item.itemValue) -%}
{%- endfor -%}
{{res}}

 

List_Picklist_SetVariable.png

 

  1. Save and run the playbook, now the output will list all the picklist values.

 

Picklist_PlaybookExecuted_Output.png

 

It is possible to find attached, the playbook 'Get_Picklist_Values.json' for reference.