Schemas

The OLP CLI supports the following:

schema list

Lists all schemas you can access.

olp schema list [filter] [command options]

Optional parameters:

  • [filter] Freeform text used to filter the schema list. The filter checks if the schema's HRN, name or summary contains the filter string. If the filter string contains an HRN without a realm, OLP CLI will also return schemas that contain the realm in HRN.
  • --limit <max number of schemas> Specifies the maximum number of schemas returned, the default value is 10000.
  • --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 the schema 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.

Example:

olp schema list "RIB 1.25.0 Topology" --json

Output:

The example below lists all the schemas to which you have access with the term RIB 1.25.0 Topology in the name or the summary field.


{"schemas": [{
    "summary": "Topology provides the representation of a topology network.",
    "hrn": "hrn:here:schema::realm:com.here.schema.rib:topology_v1:1.25.0",
    "created": "2018-04-19T05:11:09.523Z",
    "groupId": "com.here.schema.rib",
    "name": "RIB 1.25.0 Topology",
    "artifactId": "topology_v1",
    "updated": "2018-04-19T05:11:54.225Z",
    "version": "1.25.0"
}]}

schema show

Shows the details of the specified schema.

olp schema show <schema HRN> [command options]

Required parameters:

  • <schema HRN> The HRN of the schema.

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 the schema's name.
  • --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 displays the details of the Sensor Data Ingestion Interface (SDII) schema in the JSON format.


olp schema show hrn:here:schema::realm:com.here.sdii:sdii_common_v3:3.3.8 --json

Output:


{
    "summary": "SDII schemas made available through HERE platform are Open Standard Schema specifications.
    Sensor Data Ingestion Interface (SDII) is a vehicle based, sensor data format for the
    transmission of data between a vehicle and the Cloud. This data format consists of events (e.g.
    vehicle position, sign recognition, object detection) where an event might be built from one or
    more attributes (e.g. lat/lon and altitude of a vehicle). All events include a time stamp based
    on the actual event time. Each position of a vehicle is also provided with a timestamp. Events
    can be related to positions by corresponding event and position time stamps.\nSDII Schema,
    Common: contains definitions of events and attributes of a message. SDII Schema, Message: is a
    container as a delivery package which consists of SDII Schema, Common. SDII Schema, Message
    List: is a container for multiple individual SDII Schema, Messages enabling you to send
    multiple messages within a single Protobuf container thereby optimizing your data
    transmission.",
    "schemaValidationResults": [{
        "fileExtension": true,
        "module": "proto",
        "packageConsistency": false,
        "backwardsCompatibility": true,
        "googleStyle": false,
        "majorVersionInPackage": true
    }],
    "hrn": "hrn:here:schema::realm:com.here.sdii:sdii_common_v3:3.3.8",
    "created": "2019-04-11T18:57:04.828Z",
    "groupId": "com.here.sdii",
    "name": "SDII v3 Schema, Common",
    "artifactId": "sdii_common_v3",
    "updated": "2019-05-06T11:26:17.734Z",
    "version": "3.3.8"
}

schema delete

Deletes a schema by the schema HRN.

olp schema delete <schema HRN> [command options]

Required parameters:

  • <schema HRN> The HRN of the schema.

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

Schemas associated with a catalog marked Ready for Marketplace cannot be deleted.

Example:

The command below deletes a schema with the hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0 HRN from the platform.


olp schema delete hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0

Note that the hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0 schema HRN in the example above serves as a placeholder where you should pass the HRN of your own schema.

schema get

Downloads the specified schema package.

olp schema get <schema HRN> [command options]

Required parameters:

  • <schema HRN> The HRN of the schema.

Optional parameters:

  • --output <path to dir> The output directory to store the downloaded schema ZIP package. If not specified, the current directory is used 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 the absolute path to the downloaded schema package.
  • --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 downloads the schema package with the hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0 HRN from the platform.


olp schema get hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0

Note that the hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0 schema HRN in the example above serves as a placeholder where you should pass the HRN of your own schema.

schema permission grant

Grants permission to perform selected actions on a schema.

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

Required parameters:

  • <schema HRN> The HRN of the schema.
  • Either of the following recipients:
    • --group <groupID1 groupID2 ...> The list of group IDs you want to grant schema access to, separated by space.
    • --user <userID1 userID2 ...> The list of user IDs you want to grant schema 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 schema access to, separated by space.
  • Either of the following permissions:
    • --read Grants read access to a schema.
    • --modify Grants modify access to a schema.
    • --share Grants share access to a schema.

Note

You must specify at least one --read, --modify, or --share 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 schema permission grant hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0 \
   --group GROUP-example-group-id --read --modify
olp schema permission grant hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0 ^
   --group GROUP-example-group-id --read --modify

Note that the hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0 schema HRN in the example above serves as a placeholder where you should pass the HRN of your own schema.

schema permission revoke

Revokes permissions to perform all actions on a schema.

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

Required parameters:

  • <schema HRN> The HRN of the schema.
  • Either of the following recipients:
    • --app <appID1 appID2 ...> The list of application IDs you want to revoke schema access from, separated by space.
    • --user <userID1 userID2 ...> The list of user IDs you want to revoke schema 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 schema access from, separated by space.
  • Either of the following permissions:
    • --read Revokes read access to a schema.
    • --modify Revokes modify access to a schema.
    • --share Revokes share access to a schema.

Note

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

The schema permission revoke command without either <--read|--modify|--share> 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 schema permission revoke hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0 \
   --group GROUP-example-group-id --read --modify --share
olp schema permission revoke hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0 ^
   --group GROUP-example-group-id --read --modify --share

Response:


Revoked read, modify, share access for a group GROUP-example-group-id to the schema hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0

Note that the hrn:here:schema::realm:com.here.example:test_schema_v1:1.0.0 schema HRN in the example above serves as a placeholder where you should pass the HRN of your own schema.

results matching ""

    No results matching ""