app scope

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). Access tokens with NO scope are allowed with this value set to true unless the --always-project-scope setting is also true. This value has no effect on the scope of API Keys which are assigned no scope unless --always-project-scope is set to true.
  • --always-project-scope <true|false> Boolean value indicating whether or not the given application is locked to the default scope (false by default). When this value is set to true, both API Keys and Access Tokens for this app are always assigned the default project. Also, the given application cannot be added to any additional projects or groups. Any attempt to get an unscoped access token for the given application fails. Any API Keys associated with the given application are assigned the default scope.
  • --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 Displays the command result in JSON format.
  • --quiet Reduces 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-cn:account::org:app/my-app-1234 hrn:here-cn:authorization::org:project/my-project-1234 --json

Output:


{
    "scope": "hrn:here-cn:authorization::org: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 Displays the command result in JSON format.
  • --quiet Reduces 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-cn:account::org:app/my-app-1234 \
   --json
olp app scope show hrn:here-cn:account::org:app/my-app-1234 ^
   --json

Output:


{
    "scope": "hrn:here-cn:authorization::org: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 Reduces 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-cn:account::org:app/my-app-1234

Output:


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

results matching ""

    No results matching ""