Application API Key Commands

The OLP CLI supports the following functionality for application API key management:

app key api list

Retrieves API keys of an application.

olp app key api list <app HRN> [command options]

Required parameters:

  • <app HRN> The HRN of the application.

Optional parameters:

  • --enabled <true|false> If set to true, filters by enabled API keys. If not specified all keys are returned.
  • --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 command's result in JSON format.
  • --quiet List of the keys, skipping additional information.

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

Example:

The command below lists API keys of the application:


olp app key api list hrn:here:account::myrealm:app/my-app-1234 --json

Output:


{"keys": [{
    "apiKey": "hrn:here:account::myrealm:apikey/my-api-key-1234",
    "identity": "hrn:here:account::myrealm:app/my-app-1234",
    "name": "API key example",
    "apiKeyId": "my-api-key-1234",
    "createdTime": 1591012921491,
    "realm": "hrn:here:account::olp-here:realm/myrealm",
    "enabled": true,
    "expiresAt": -1
}]}

app key api create

Creates an API key of an application.

olp app key api create <app HRN> <key name> [command options]

Required parameters:

  • <app HRN> The HRN of the application.
  • <key name> The name of the application API key.

Optional parameters:

  • --expires-at <YYYY-MM-DDThh:mm:ss> The expiration date of a key. The timestamp must match the ISO-8601 format YYYY-MM-DDThh:mm:ss, but only YYYY is mandatory. If not specified, the key doesn't expire.
  • --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 command's result in JSON format.
  • --quiet Display an empty output skipping additional information.

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

Example:

The command below creates an application API key:


olp app key api create hrn:here:account::myrealm:app/my-app-1234 api-key-name

Output:


API key hrn:here:account::myrealm:apikey/my-apikey-1234 has been created.

app key api update

Updates an API key of an application.

olp app key api update <app HRN> <API key HRN> [command options]

Required parameters:

  • <app HRN> The HRN of the application.
  • <API key HRN> The HRN of the application API key.
  • Either of the following parameters:
    • --name <key name> The name of the application API key.
    • --expires-at <YYYY-MM-DDThh:mm:ss> The expiration date of a key. The timestamp must match the ISO-8601 format YYYY-MM-DDThh:mm:ss, but only YYYY is mandatory. If none is specified the key doesn't expire.

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 command's result in JSON format.
  • --quiet Display an empty output skipping additional information.

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

Example:

The command below updates the name of an application API key:


olp app key api update hrn:here:account::myrealm:app/my-app-1234 hrn:here:account::myrealm:apikey/my-apikey-1234 --name api-key-name

Output:


API key hrn:here:account::myrealm:apikey/my-apikey-1234 has been updated.

app key api delete

Deletes an API key of an application.

olp app key api delete <app HRN> <API key HRN> [command options]

Required parameters:

  • <app HRN> The HRN of the application.
  • <API key HRN> The HRN of the application API key.

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 Display an empty output skipping additional information.

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

Example:

The command below deletes an application API key:


olp app key api delete hrn:here:account::myrealm:app/my-app-1234 hrn:here:account::myrealm:apikey/my-apikey-1234

Output:


API key hrn:here:account::myrealm:apikey/my-apikey-1234 has been deleted.

app key api enable

Enables an API key of an application.

olp app key api enable <app HRN> <API key HRN> [command options]

Required parameters:

  • <app HRN> The HRN of the application.
  • <API key HRN> The HRN of the application API key.

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 Display an empty output skipping additional information.

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

Example:

The command below enables an application API key:


olp app key api enable hrn:here:account::myrealm:app/my-app-1234 hrn:here:account::myrealm:apikey/my-apikey-1234

Output:


API key hrn:here:account::myrealm:apikey/my-apikey-1234 has been enabled.

app key api disable

Disables an API key of an application.

olp app key api disable <app HRN> <API key HRN> [command options]

Required parameters:

  • <app HRN> The HRN of the application.
  • <API key HRN> The HRN of the application API key.

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 Display an empty output skipping additional information.

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

Example:

The command below disables an application API key:


olp app key api disable hrn:here:account::myrealm:app/my-app-1234 hrn:here:account::myrealm:apikey/my-apikey-1234

Output:


API key hrn:here:account::myrealm:apikey/my-apikey-1234 has been disabled.

results matching ""

    No results matching ""