Catalogs

The OLP CLI supports the following:

catalog list

Lists all catalogs that you can access and returns a catalog name on a separate line. The list of catalogs that are shown are dependent on the scope of the request:

  • If the request contains no scope, the response will include all catalogs you can access, including catalogs inside all projects that you can access.
  • If the request contains a project HRN as a scope, the response will only include catalogs that are part of that project.

To get more information about a catalog, see the show command.

olp catalog list [filter] [command options]

Optional parameters:

  • [filter] Freeform text used to filter the catalog list. The filter checks if the catalog HRN contains the filter string.
  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --json Displays the command's result in JSON format.
  • --quiet Displays catalog HRNs, each on a new line.
  • --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 olp catalog list command returns all catalogs that are accessible to an app according to app permissions. The app can have access to catalogs based on direct permissions (that is, catalogs owned by or shared with the app), or by indirect permissions (such as when the app has permissions due to group membership or a realm-wide policy).

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

Example with filtering:

olp catalog list "first-catalog-example-id" --json

Output:


{"results": {"items": [
    {"hrn": "hrn:here:data:::first-catalog-example-id"}
]}}

Example without filtering:

olp catalog list --json

Output:


{"results": {"items": [
    {"hrn": "hrn:here:data:::first-catalog-example-id"},
    {"hrn": "hrn:here:data:::second-catalog-example-id"}
]}}

catalog create

Creates an empty catalog in the platform. Access to the created catalog depends on the scope of the request:

  • If the request contains no scope, the calling App will be granted full access to the catalog, including the ability to share with others.
  • If the request contains a project HRN as a scope, the catalog will be created inside of the project and access to it will be automatically available to all users and apps that have access to the project.
olp catalog create <catalog ID> <catalog name> --summary <catalog summary> [command options]

Warning: Catalog IDs

Catalog IDs are part of the catalog HRN and are publicly visible. When you specify a catalog ID, do not include private or company confidential information. If you need to include private and confidential information, use the catalog name field instead, as that is private by default.

Required parameters:

  • <catalog ID> The ID that is used as a hint to create the catalog HRN.
  • <catalog name> The human-readable name of the catalog. Overrides any values provided with the --config parameter through the command line.
  • --description <catalog description> A detailed description of the catalog and its contents. Enclose the description with quotes.
  • --summary <catalog summary> A one-line summary of the catalog contents. Overrides any values provided with the --config parameter through the command line.

Note

You can also specify the summary for a catalog through a configuration file referenced by the --config option.

Optional parameters:

  • --config <path to config file> The path and name of the configuration file.
  • --tags <tag1 tag2 ...> Catalog keywords; used for search discovery.
  • --notifications If set to true, a notification is written to the notification stream layer each time the catalog’s version changes. The default value is false.
  • --skip-sharing-with-user Do not share catalog permissions with the associated user account. The default value is false, as the CLI shares permissions with the user account. This option may be used to prevent associated user accounts from reaching the limit of resources they are allowed to create. If a scope is provided in the request, this option is required to be true and assumed to be a value of true. A value of false is ignored.
  • --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 catalog HRN in JSON format.
  • --quiet Displays the catalog HRN.
  • --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.
  • --replicate Defines if the catalog should be replicated in the backup region. By default, the primary region is EU West (Ireland), and the secondary region is US West (Oregon). For more information about multi-region support, see Data Security and Durability.
  • --auto-version-deletion <number of latest versions to keep> Defines the maximum number of catalog versions to keep at a time. If this maximum is reached and a new version is created, the oldest catalog version is automatically deleted. By default, automatic version deletion for catalogs is disabled. <number of latest versions to keep> must be of type long. Overrides any values provided with the --config parameter through the command line.

    Note

    This parameter is applicable only with the --config <config file> parameter in case the <config file> contains definition for at least one versioned layer.

    To disable automatic version deletion see catalog update commands.

Example:

The command below creates the empty catalog first-catalog-example in the platform, and displays the catalog's HRN in the output.

olp catalog create first-catalog-example-id first-catalog-example --summary "A new summary"

To pass multiple arguments to a parameter that accepts them, separate the arguments with spaces.

Example:

The command below creates an empty catalog second-catalog-example with two tags (tag1 and tag2) in the platform and displays the catalog's HRN in the console output.

olp catalog create second-catalog-example-id second-catalog-example --tags tag1 tag2 --summary "A new summary"

Please note that the catalog name first-catalog-example in the examples above serves as a placeholder where you should pass the name of your own catalog.

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

catalog update

Updates an existing catalog in the platform with the configuration specified in a configuration file.

olp catalog update <catalog HRN> [command options]

Warning: Catalog configuration changes

The platform does not allow you to change a catalog's layer configurations.

Required parameters:

  • <catalog HRN> The HRN of the catalog.

Optional parameters:

  • --config <path to config file> The path of the file with the updated configuration.
  • --name <catalog name> The human-readable name of the catalog. Overrides values provided with --config through the command line.
  • --summary <catalog summary> A one-line summary of the catalog contents. Overrides values provided with --config through the command line.
  • --description <catalog description> A detailed description of the catalog and its contents. Enclose the description with quotes.
  • --tags <tag1 tag2 ...> Catalog keywords used for search discovery. To unset tags, use --tags [].
  • --notifications If set to true, a notification is written to the notification stream layer each time the catalog’s version changes. The default value is false.
  • --marketplace-ready <true|false> If set to true, the catalog is marked as Ready for Marketplace. If set to false, the catalog is not marked as Ready for Marketplace.
  • --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 empty output with no additional information.
  • --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.
  • --auto-version-deletion <number of latest versions to keep | off> Defines the maximum number of catalog versions to keep at a time. If this maximum is reached and a new version is created, the oldest catalog version is automatically deleted. By default, automatic version deletion for catalogs is disabled. <number of latest versions to keep | off> can be of type long or key word off to remove automatic version deletion from a catalog. Overrides any values provided with the --config parameter through the command line.

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

Example:


olp catalog update hrn:here:data:::first-catalog-example-id --config path/to/config.json

Example configuration for a catalog with a volatile layer:

{
  "name": "volatile-volatile-catalog",
  "summary": "A short summary",
  "description": "A longer description about what the catalog contains",
  "tags": [
    "tag1",
    "tag2"
  ],
  "layers": [
    {
      "id": "volatile-layer",
      "name": "volatile-layer",
      "summary": "A short summary",
      "description": "A longer description about what the layer contains",
      "layerType": "volatile",
      "partitioning": {
          "scheme": "generic"
      },
      "volume": {
         "volumeType": "volatile"
      },
      "contentType": "application/x-protobuf"
    }
  ]
}

Example configuration for a catalog with a versioned layer:

{
  "name": "versioned-durable-catalog",
  "summary": "A short summary",
  "description": "A longer description about what the catalog contains",
  "tags": [
    "tag1",
    "tag2"
  ],
  "layers": [
    {
      "id": "versioned-layer",
      "name": "versioned-layer",
      "summary": "A short summary",
      "description": "A longer description about what the layer contains",
      "layerType": "versioned",
      "partitioning": {
          "scheme": "generic"
      },
      "volume": {
          "volumeType": "durable"
      },
      "contentType": "application/x-protobuf",
      "crc": "CRC-32C",
      "digest": "MD5"
    }
  ]
}

Example configuration for a catalog with a stream layer:

{
  "name": "stream-durable-catalog",
  "summary": "A short summary",
  "description": "A longer description about what the catalog contains",
  "tags": [
    "tag1",
    "tag2"
  ],
  "layers": [
    {
      "id": "stream-layer",
      "name": "stream-layer",
      "summary": "A short summary",
      "description": "A longer description about what the layer contains",
      "layerType": "stream",
      "partitioning": {
          "scheme": "generic"
      },
      "volume": {
          "volumeType": "durable"
      },
      "contentType": "application/x-protobuf"
    }
  ]
}

Example with additional parameters:

Linux
Windows
olp catalog update hrn:here:data:::first-catalog-example-id --name first-catalog-example-updated \
   --summary "Updated summary" --description "Updated description"
olp catalog update hrn:here:data:::first-catalog-example-id --name first-catalog-example-updated ^
   --summary "Updated summary" --description "Updated description"

Example with a catalog automatic version deletion removal:

Linux
olp catalog update hrn:here:data::realm:first-catalog-example-id --auto-version-deletion off

For more information on catalog configurations, see Data API.

catalog show

Shows the catalog configuration.

olp catalog show <catalog HRN> [command options]

Required parameters:

  • <catalog HRN> The HRN of the catalog

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's result in JSON format.
  • --quiet Displays catalog's layer types and layer IDs, separated by space.
  • --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.

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

Example:


olp catalog show hrn:here:data:::first-catalog-example-id --json --credentials path/to/olpcli.ini

The output contains the configuration of the catalog in JSON format:


{
    "summary": "",
    "owner": {
        "creator": {"id": "mzLcb1rL8nskvDQpCFEF"},
        "organisation": {"id": "olp-here"}
    },
    "billingTags": [],
    "hrn": "hrn:here:data:::first-catalog-example-id",
    "created": "2018-03-02T10:41:09.309Z",
    "name": "first-catalog-example",
    "layers": [
        {
            "summary": "Summary",
            "volume": {"volumeType": "Durable"},
            "layerType": "Versioned",
            "billingTags": [],
            "crc": "CRC-32C",
            "name": "Test Layer",
            "contentEncoding": "gzip",
            "description": "some description",
            "partitioning": {"scheme": "generic"},
            "id": "test-layer",
            "contentType": "application/octet-stream",
            "digest": "SHA-1",
            "tags": []
        },
        {
            "summary": "Summary",
            "volume": {"volumeType": "Durable"},
            "layerType": "Versioned",
            "billingTags": [],
            "crc": "CRC-32C",
            "name": "Test Layer1",
            "description": "some description",
            "partitioning": {"scheme": "generic"},
            "id": "test-layer1",
            "contentType": "application/octet-stream",
            "tags": []
        }
    ],
    "description": "",
    "notifications": {
        "enabled": false
    },
    "marketplaceReady": false,
    "automaticVersionDeletion": {"numberOfVersionsToKeep": 100},
    "id": "first-catalog-example-id",
    "version": 4,
    "metadataVersion": 21
    "metadataMinimumVersion": 0
    "tags": []
}

catalog delete

Deletes a catalog from the platform.

olp catalog delete <catalog HRN> [command options]

Warning: Deleting catalogs

This command removes the catalog completely; it cannot be restored.

Required parameters:

  • <catalog HRN> The HRN of the catalog.

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 empty output with no additional information.
  • --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: Marked Ready for Marketplace

Catalogs marked Ready for Marketplace cannot be deleted.

Example:


olp catalog delete hrn:here:data:::first-catalog-example-id

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

catalog dependency list

Lists all catalog dependencies for a specific version.

olp catalog dependency list <catalog HRN>

Required parameters:

  • <catalog HRN> The HRN of the catalog.

Optional parameters:

  • --version <catalog version> The catalog version. The default value is the latest version.
  • --direct-only When enabled, only direct dependencies are displayed. When disabled, all dependencies are displayed. Disabled 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 platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --json Displays the command's result in JSON format.
  • --quiet Displays HRNs of catalog dependencies, each on a new line.
  • --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.

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

Example:

The command below lists all direct dependencies for the hrn:here:data:::first-catalog-example-id catalog in JSON format.


olp catalog dependency list hrn:here:data:::first-catalog-example-id --direct-only --json

catalog permission grant

Grants permission to perform specified actions on a catalog.

olp catalog permission grant <catalog HRN> [command options]

Warning

Any schemas associated with layers in the catalog are also shared.

Required parameters:

  • <catalog HRN> The HRN of the catalog.
  • Either of the following recipients:
    • --group <groupID1 groupID2 ...> The list of group IDs you want to grant catalog access to, separated by space.
    • --user <userID1 userID2 ...> The list of user IDs you want to grant catalog access to, separated by space. This information can be found in the .here/credentials.properties file, in the user's home directory, or via your profile.
    • --app <appID1 appID2 ...> The list of application IDs you want to grant catalog access to, separated by space.
  • Either of the following permissions:
    • --manage Grants manage and share access to the catalog.
    • --read Grants read access to the catalog.
    • --write Grants write access to the catalog.
    • --share Grants share access to the catalog. Deprecated.

Note

You must specify at least one --manage, --read, or --write parameter for a corresponding --group, --user, or --app.

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 empty output with no additional information.

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

Example:

Linux
Windows
olp catalog permission grant hrn:here:data:::first-catalog-example-id --group \
   GROUP-example-group-id --read --write
olp catalog permission grant hrn:here:data:::first-catalog-example-id --group ^
   GROUP-example-group-id --read --write

catalog permission revoke

Revokes permissions to perform all actions on a catalog.

olp catalog permission revoke <catalog HRN> [command options]

Required parameters:

  • <catalog HRN> The HRN of the catalog.
  • Either of the following recipients:
    • --app <appID1 appID2 ...> The list of application IDs you want to revoke catalog access from, separated by space.
    • --user <userID1 userID2 ...> The list of user IDs you want to revoke catalog access from, separated by space. This information can be found in the .here/credentials.properties file, in the user's home directory, or via your profile.
    • --group <groupID1 groupID2 ...> The list of group IDs you want to revoke catalog access from, separated by space.
  • Either of the following permissions:
    • --manage Revokes manage and share access to the catalog.
    • --read Revokes read access to the catalog.
    • --write Revokes write access to the catalog.

Note

You must specify at least one --manage, --read, or --write parameter for a corresponding --group, --user, or --app.

The catalog permission revoke command without either <--read|--write|--manage> flag is deprecated.

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 empty output with no additional information.

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

Example:

Linux
Windows
olp catalog permission revoke hrn:here:data:::first-catalog-example-id \
   --group GROUP-example-group-id --read --write --manage
olp catalog permission revoke hrn:here:data:::first-catalog-example-id ^
   --group GROUP-example-group-id --read --write --manage

Response:


Revoked read, write, manage access for a group GROUP-example-group-id to the catalog hrn:here:data:::first-catalog-example-id

catalog version delete

Deletes those catalog versions that are less than the specified one and sets a new minimum version. To check the current minimum version, refer to the values for metadataMinimumVersion in JSON output and metadata minimum version in verbose output of the show command.

Note: Catalog version

The catalog version in this command stands for a single version of all the versioned layers in the catalog.

olp catalog version delete <catalog HRN> <version> [command options]

Warning: Risk of data loss

The result of the delete command is irreversible. Once data is deleted, it cannot be restored.

Required parameters:

  • <catalog HRN> The HRN of the catalog.
  • <version> The earliest catalog version that will not 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 empty output with no additional information.
  • --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.

Example:


olp catalog version delete hrn:here:data:::first-catalog-example-id 4

Response:


Successfully deleted catalog versions less than 4.

results matching ""

    No results matching ""