device
The OLP CLI supports the following functionality for device account management:
Devices are created as part of the token exchange. There is no separate command for device creation.
device show
Shows the details of a device account.
olp device show <device HRN>
Required parameters:
-
<device HRN>
The HRN of the device account to show.
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
Displays the device name. -
--json
Displays the command result in JSON format.
For more information on using credentials and profiles, see Credentials setup.
Example:
The command below shows the details of a device account:
olp device show hrn:here-cn:account::org:device/my-device-1234
Output:
Details of the device:
id my-device-1234
hrn hrn:here-cn:account::org:device/my-device-1234
realm hrn:here-cn:account::org:realm/org
project hrn:here-cn:authorization::org:project/my-project-1234
identityProvider hrn:here-cn:account::org:identityProvider/my-provider-1234
externalId A-S0001234
enabled true
device update
Updates a device account.
olp device update <device HRN> [command options]
Required parameters:
-
<device HRN>
The HRN of the device account to update. -
--enabled <true|false>
Enables or disables the device.
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
Displays empty output with no additional information.
Note
To update a device, the caller must be a resource manager of their organization.
For more information on using credentials and profiles, see Credentials setup.
Example:
The command below disables the device account:
olp device update hrn:here-cn:account::org:device/my-device-1234 --enabled false
Output:
Device account hrn:here-cn:account::org:device/my-device-1234 has been updated
device find
Finds device details by the external ID and provider HRN.
olp device find --provider <provider HRN> --external-id <external ID>
Required parameters:
-
--provider <provider HRN>
HRN of the identity provider. Must be used together with the --external-id
parameter. -
--external-id <external ID>
Identifier of the device in the identity provider. Must be used together with the --provider
parameter.
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
Displays the device HRN.
For more information on using credentials and profiles, see Credentials setup.
Example:
The command below fetches the device account details matching the provided external-id and provider:
olp device find --provider hrn:here-cn:account::org:identityProvider/my-provider-1234 --external-id A-S0001234
Output:
Details of the device:
id my-device-1234
hrn hrn:here-cn:account::org:device/my-device-1234
realm hrn:here-cn:account::org:realm/org
project hrn:here-cn:authorization::org:project/my-project-1234
identityProvider hrn:here-cn:account::org:identityProvider/my-provider-1234
externalId A-S0001234
enabled true
device delete
Deletes a device account.
olp device delete <device HRN>
Required parameters:
-
<device HRN>
The HRN of the device account to delete.
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
Displays empty output with no additional information.
Note
To delete a device, the caller must be a resource manager of their organization.
For more information on using credentials and profiles, see Credentials setup.
Example:
The command below deletes the device account:
olp device delete hrn:here-cn:account::org:device/my-device-1234
Output:
Device account hrn:here-cn:account::org:device/my-device-1234 has been deleted