1.9 KiB
id, title, pagination_label, sidebar_label, sidebar_position, sidebar_class_name, keywords, description, slug, tags
| id | title | pagination_label | sidebar_label | sidebar_position | sidebar_class_name | keywords | description | slug | tags | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cli-jsonpath | JSONpath | CLI JSONpath | JSONpath | 10 | cli-jsonpath |
|
Learn how to use the CLI to evaluate JSONpath queries in this guide. | /tools/cli/jsonpath |
|
Learn how to use the SailPoint CLI to evaluate JSONpath queries in this guide.
JSONpath is a language for querying data in a JSON object.
The jsonpath command makes it easy to evaluate JSONpath queries from within the SailPoint CLI. At this time, the jsonpath command only supports the workflows JSONpath operators documented here.
-
Evaluate JSONpath
Run this command to evaluate a JSONpath query:
sail jsonpath evalThe default behavior will open a terminal editor with a default JSON object and default query. You can modify the query and object to test different queries.
File path
The first flag you can append when you are evaluating JSONpath queries is the
--file(-ffor short) flag. This flag specifies the file path for a JSON object that you want to use as a test for your query.Here is what the command looks like with the
-fflag:sail jsonpath eval -f /path/to/object.jsonSpecifying a file path without also specifying the
-pflag will open the interactive editor using your file as the input.Path
The second flag you can append when you are evaluating JSONpath queries is the
--path(-pfor short) flag. This flag specifies the path you want to evaluate against the JSON object.Here is what the command looks like with the
-pflag:sail jsonpath eval -f /path/to/object.json -p $.pathThis will show the result of the path expression in the terminal.