Custom Search Templates Using CLI

Hi Team
Using sail search template we can list and use available templates which accepts input.
Did anyone try creating custom search templates which can accept inputs and respond using SailPoint CLI Search Template | SailPoint Developer Community ?

image

Thanks!

Yes, I have created new templates that are can prompt for input. The process is pretty straight forward.

  1. From the CLI, set the path to your custom file:
sail set searchTemplates "path/to/search/template/file"
  1. Edit the file specified above. Add a section like:
[
  {
    "name": "New Users",
    "description": "New Users created in a variable number of days - Accepts input"
    "variables": [{"name": "days", "prompt": "Days before today"}],
    "searchQuery": {
      "indicies": ["identities"],
       "queryType": null,
       "queryVersion": null,
       "query": {
         "query": "(created:[now-{{days}}d to now])"
        },
        "sort": [],
        "searchAfter": []
      }
   }
]

Save the file.

  1. run the command
sail search template

You will see your new query in the list.

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.