App Scope Commands

The OLP CLI supports the following platform API commands:

  • set the default scope for the application identified by the provided HRN.
  • show the default scope for the application identified by the provided HRN.
  • remove the default scope for the application identified by the provided HRN.

app scope set

Sets the default scope for the application.

olp app scope set <app HRN> <project HRN> [command parameters]

Required parameters:

  • <app HRN> The HRN of the application.
  • <project HRN> The HRN of the project that needs to be set as the default scope for this application.

Optional parameters:

  • --is-restricted <true|false> Boolean value indicating whether or not the given application should be restricted from requesting a client token with the scope that is different from the default value (true by default).
  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the HERE platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --json Display the result of the command in JSON format.
  • --quiet Reduce the output to essential values only, in this case it's an empty string.

For more information on using credentials and profiles, see Credentials Setup.

Example:

The command below sets the default scope to the given project HRN for the application identified by the provided application HRN:


olp app scope set hrn:here:account::myrealm:app/my-app-1234 hrn:here:authorization::myrealm:project/my-project-1234 --json

Output:


{
    "scope": "hrn:here:authorization::myrealm:project/my-project-1234",
    "isRestricted": true
}

app scope show

Shows the default scope for the application.

olp app scope show <app HRN> [command parameters]

Required parameters:

  • <app HRN> The HRN of the application.

Optional parameters:

  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the HERE platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --json Display the result of the command in JSON format.
  • --quiet Reduce the output to essential values only, in this case it displays the HRN of the default scope for this application.

For more information on using credentials and profiles, see Credentials Setup.

Example:

The command below shows the default scope for the application:

Linux
Windows
olp app scope show hrn:here:account::myrealm:app/my-app-1234 \
   --json
olp app scope show hrn:here:account::myrealm:app/my-app-1234 ^
   --json

Output:


{
    "scope": "hrn:here:authorization::myrealm:project/my-project-1234",
    "isRestricted": true
}

app scope remove

Removes the default scope for the application.

olp app scope remove <app HRN> [command parameters]

Required parameters:

  • <app HRN> The HRN of the application.

Optional parameters:

  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the HERE platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --quiet Reduce the output to essential values only, in this case it's an empty string.

For more information on using credentials and profiles, see Credentials Setup.

Example:

The command below removes the default scope for the application:


olp app scope remove hrn:here:account::myrealm:app/my-app-1234

Output:


The default scope for app hrn:here:account::myrealm:app/my-app-1234 has been removed.

results matching ""

    No results matching ""