Configuration Automation - Ping CLI

pingcli request

Send a custom REST API request to a Ping platform service.

Synopsis

Send a custom REST API request to a Ping Service.

The custom REST API request is most powerful when product connection details have been configured in the CLI configuration file. The command offers a cURL-like experience to interact with the Ping platform services, with authentication and environment details dynamically filled by the CLI.

pingcli request [flags] API_URI

Examples

  Send a custom API request to the configured PingOne tenant, making a GET request against the /environments endpoint.
    pingcli request --service pingone environments

  Send a custom API request to the configured PingOne tenant, making a GET request to retrieve JSON configuration for a specific environment.
    pingcli request --service pingone --http-method GET --output-format json environments/$MY_ENVIRONMENT_ID

  Send a custom API request to the configured PingOne tenant, making a POST request to create a new environment with JSON data sourced from a file.
    pingcli request --service pingone --http-method POST --data ./my-environment.json environments

  Send a custom API request to the configured PingOne tenant, making a POST request using a custom header to create users with JSON data sourced from a file.
    pingcli request --service pingone --http-method POST --header "Content-Type: application/vnd.pingidentity.user.import+json" --data ./users.json environments/$MY_ENVIRONMENT_ID/users

  Send a custom API request to the configured PingOne tenant, making a POST request to create a new environment using raw JSON data.
    pingcli request --service pingone --http-method POST --data-raw '{"name": "My environment"}' environments

  Send a custom API request to the configured PingOne tenant, making a DELETE request to remove an application attribute mapping.
    pingcli request --service pingone --http-method DELETE environments/$MY_ENVIRONMENT_ID/applications/$MY_APPLICATION_ID/attributes/$MY_ATTRIBUTE_MAPPING_ID

Options

  -f, --fail                                                  Return non-zero exit code when HTTP custom request returns a failure status code.
  -h, --help                                                  help for request
  -m, --http-method string                                    The HTTP method to use for the request. (default GET) Options are: DELETE, GET, PATCH, POST, PUT. Example: 'POST'
  -r, --header []string                                       A custom header to send in the request. Example: --header "Content-Type: application/vnd.pingidentity.user.import+json"
  -s, --service string                                        The Ping service (configured in the active profile) to send the custom request to. Options are: pingone. Example: 'pingone'
      --data string                                           The file containing data to send in the request.  Example: './data.json'
      --data-raw string                                       The raw data to send in the request.  Example: '{"name": "My environment"}'
      --pingone-authentication-type string                    The authorization grant type to use to authenticate to the PingOne management API. (default worker) Options are: authorization_code, client_credentials, device_code, worker.
      --pingone-authorization-code-client-id string           The authorization code client ID used to authenticate to the PingOne management API.
      --pingone-authorization-code-redirect-uri-path string   The redirect URI path to use when using the authorization code authorization grant type to authenticate to the PingOne management API. (default /callback)
      --pingone-authorization-code-redirect-uri-port string   The redirect URI port to use when using the authorization code authorization grant type to authenticate to the PingOne management API. (default 7464)
      --pingone-client-credentials-client-id string           The client credentials client ID used to authenticate to the PingOne management API.
      --pingone-client-credentials-client-secret string       The client credentials client secret used to authenticate to the PingOne management API.
      --pingone-device-code-client-id string                  The device code client ID used to authenticate to the PingOne management API.
      --pingone-region-code string                            The region code of the PingOne tenant. Options are: AP, AU, CA, EU, NA, SG. Example: 'NA'
      --pingone-worker-client-id string                       DEPRECATED: Use --pingone-client-credentials-client-id instead. The worker client ID used to authenticate to the PingOne management API.
      --pingone-worker-client-secret string                   DEPRECATED: Use --pingone-client-credentials-client-secret instead. The worker client secret used to authenticate to the PingOne management API.
      --pingone-worker-environment-id string                  DEPRECATED: Use --pingone-environment-id instead. The ID of the PingOne environment that contains the worker client used to authenticate to the PingOne management API.

Options inherited from parent commands

  -C, --config string          The relative or full path to a custom Ping CLI configuration file. (default $HOME/.pingcli/config.yaml)
  -D, --detailed-exitcode      Enable detailed exit code output. (default false) 0 - pingcli command succeeded with no errors or warnings. 1 - pingcli command failed with errors. 2 - pingcli command succeeded with warnings.
  -O, --output-format string   Specify the console output format. (default text) Options are: json, text.
  -P, --profile string         The name of a configuration profile to use.
      --no-color               Disable text output in color. (default false)

More information

  • pingcli - A CLI tool for managing the configuration of Ping Identity products.