catalog layer subscription
The OLP CLI supports the following:
- create a subscription for a layer
- delete a subscription for a layer
- list all the available subscriptions
- show the subscription details
Layer-level subscriptions allow you to get a notification whenever changes occur in a particular layer.
Note
All subscription commands сan be executed only within the project scope using default project scoped credentials or the --scope command parameter.
catalog layer subscription create
Creates a subscription to layer change notifications.
olp catalog layer subscription create <subscription name> \
<subscription type> <source catalog HRN> <source layer ID> \
<destination catalog HRN> <destination layer ID> [command options]
olp catalog layer subscription create <subscription Name> ^
<subscription type> <source catalog HRN> <source layer ID> ^
<destination catalog HRN> <destination layer ID> [command options]
Required parameters:
-
<subscription name>
The human-readable name of the subscription. -
<subscription type>
The type of subscription. Possible values are transaction
,feature
and change
. -
<source catalog HRN>
The HRN of the source catalog. -
<source layer ID>
The ID of the source layer. -
<destination catalog HRN>
The HRN of the destination catalog. -
<destination layer ID>
The ID of the destination layer.
Optional parameters:
-
--description <subscription description>
A detailed description of the subscription. -
--credentials <path to credentials file>
The name of a credentials file to use with the command. Credentials files are downloaded separately from the 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 HRN of the subscription that was created. -
--scope <project HRN>
Specifies the project HRN to use as the scope in the request. The value specified with --scope
overrides any value for here.token.scope
provided in the credentials file used for the command.
Note
The --scope
parameter is required if a non-scoped credentials file is used for command execution.
Example:
The following command creates a subscription my-subscription
of type transaction
that allows you to get notifications whenever changes occur in the source-layer
of the catalog hrn:here:data::org:source-catalog
.
Notifications are written to the destination-layer
of the catalog hrn:here:data::org:destination-catalog
.
olp catalog layer subscription create my-subscription transaction \
hrn:here:data::org:source-catalog source-layer \
hrn:here:data::org:destination-catalog destination-layer
olp catalog layer subscription create my-subscription transaction ^
hrn:here:data::org:source-catalog source-layer ^
hrn:here:data::org:destination-catalog destination-layer
Output:
Subscription hrn:here:data-subscription::org:my-subscription-7d93563980d94f1b has been created
catalog layer subscription delete
Deletes a subscription to notifications for a specific layer.
olp catalog layer subscription delete <subscription HRN> [command options]
Required parameters:
-
<subscription HRN>
The HRN of the subscription that needs to be deleted.
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 platform portal. -
--profile <profile name>
The name of the credentials profile to use from the olpcli.ini
file. -
--quiet
Displays the HRN of the subscription that was deleted. -
--scope <project HRN>
Specifies the project HRN to use as the scope in the request. The value specified with --scope
overrides any value for here.token.scope
provided in the credentials file used for the command.
Note
The --scope
parameter is required if a non-scoped credentials file is used for command execution.
Example:
The command below deletes the subscription with the HRN hrn:here:data-subscription::org:my-subscription-7d93563980d94f1b
.
olp catalog layer subscription delete hrn:here:data-subscription::org:my-subscription-7d93563980d94f1b
Output:
Subscription hrn:here:data-subscription::org:my-subscription-7d93563980d94f1b has been deleted
catalog layer subscription list
Lists all the available subscriptions.
olp catalog layer subscription list [command options]
Optional parameters:
-
--type <transaction|feature|change>
Filters the list of subscriptions based on subscription type. -
--source-catalog <source catalog HRN>
Filters the list of subscriptions based on source catalog. -
--destination-catalog <destination catalog HRN>
Filters the list of subscriptions based on destination catalog. -
--credentials <path to credentials file>
The name of a credentials file to use with the command. Credentials files are downloaded separately from the 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 HRNs of the subscriptions. -
--scope <project HRN>
Specifies the project HRN to use as the scope in the request. The value specified with --scope
overrides any value for here.token.scope
provided in the credentials file used for the command.
Note
The --scope
parameter is required if a non-scoped credentials file is used for command execution.
Example:
The command below returns a list of all available subscriptions.
olp catalog layer subscription list
Output:
HRN name description
hrn:here:data-subscription::org:my-subscription-7d93563980d94f1bmy-subscription my-subscription A detailed description
Use olp catalog layer subscription show <subscription HRN> to display more information about a subscription
catalog layer subscription show
Shows the subscription details.
olp catalog layer subscription show <subscription HRN> [command options]
Required parameters:
-
<subscription HRN>
The HRN of the subscription 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 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 name of the subscription. -
--scope <project HRN>
Specifies the project HRN to use as the scope in the request. The value specified with --scope
overrides any value for here.token.scope
provided in the credentials file used for the command.
Note
The --scope
parameter is required if a non-scoped credentials file is used for command execution.
Example:
The command below displays the details of the subscription with the HRN hrn:here:data-subscription::org:my-subscription-7d93563980d94f1b
in JSON format.
olp catalog layer subscription show hrn:here:data-subscription::org:my-subscription-7d93563980d94f1b --json
Output:
{
"subscriptionName": "my-subscription",
"subscriptionHrn": "hrn:here:data-subscription::org:my-subscription-7d93563980d94f1b",
"description": "A detailed description of the subscription",
"sourceCatalog": "hrn:here:data::org:my-source-catalog",
"sourceLayer": "source-layer",
"destinationCatalog": "hrn:here:data::org:my-destination-catalog",
"destinationLayer": "destination-layer",
"owner": {
"creator": {
"id": "string"
},
"organisation": {
"id": "org"
}
},
"version": 0,
"created": "2017-08-04T17:19:03.853Z",
"updated": "2017-08-04T17:19:03.853Z",
"status": {
"state": "active",
"message": "Some error message"
},
"interactiveMapSubscription": {
"type": "perFeature"
}
}