Files
developer.sailpoint.com/docs/tools/cli/jsonpath.md
2024-11-13 17:23:28 -05:00

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
cli
cli jsonpath
jsonpath
Learn how to use the CLI to evaluate JSONpath queries in this guide. /tools/cli/jsonpath
CLI

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

    Evaluate JSONpath

    Run this command to evaluate a JSONpath query:

    sail jsonpath eval
    

    The 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 (-f for 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 -f flag:

    sail jsonpath eval -f /path/to/object.json
    

    Specifying a file path without also specifying the -p flag 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 (-p for short) flag. This flag specifies the path you want to evaluate against the JSON object.

    Here is what the command looks like with the -p flag:

    sail jsonpath eval -f /path/to/object.json -p $.path
    

    This will show the result of the path expression in the terminal.