Project Commands

The OLP CLI supports the following functionality for projects:

project list

Lists the projects you can access.


olp project list [command options]

Optional parameters:

  • [filter] Freeform text to filter the project list. The filter checks if a project's HRN, name, or description contains the filter string.
  • --limit <max number of projects> Specify the maximum number of projects returned in the result (100 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 Display the command's result in JSON format.
  • --quiet Display the project HRN, each on a new line.

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

Example:

The command below lists those projects whose HRN, name, or description matches myproject.


olp project list myproject --json

Output:


{"projects": [
        {
            "hrn": "hrn:here:authorization::myrealm:project/myproject",
            "name": "my-project-name",
            "description": "my project description",
            "id": "myproject"
        }
    ]
}

project create

Creates a project.


olp project create <project-id> <project name> [command options]

Required parameters:

  • <project-id> A unique project ID that is used as the last part of the project's HRN. <project-id> must be an alphanumeric string 4 to 16 characters in length; it can contain lowercase characters, numbers, and hyphens. Hyphens are not allowed at the beginning or at the end of the string.
  • <project name> A human-readable name of the project. The project name must be an alphanumeric string up to 200 characters in length from a set of lowercase or uppercase characters, numbers, and hyphens.

Note: Project Access Privileges

By default, the app through which you create a project is granted ProjectAdmin privileges on that project. Use this app to manage both project access and project resources though the CLI.

And the associated user account is granted only User privileges on the project, allowing you to manage project resources through the HERE platform portal. Use the --skip-sharing-with-user flag to revoke User privileges from the user account on project creation.

Optional parameters:

  • --description <project description> A detailed description of the project and its contents. The default value is empty. The string cannot be longer than 500 characters. Enclose the description with quotes.
  • --skip-sharing-with-user Do not share permissions to access the project 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 project resources they are allowed to create.
  • --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 Display an empty output without additional information.

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

Example:

The command below creates a new project:


olp project create myproject my-project-name --description "my project description"

Output:


Project hrn:here:authorization::myrealm:project/myproject has been created.

project update

Updates the name or description of a project.


olp project update <project HRN> [command options]

Required parameters:

  • <project HRN> The HRN of the project.

Optional parameters:

  • --name <project name> A new human-readable name for the project. If nothing is specified, the original name is retained.
  • --description <project description> A new description for the project and its contents. The string cannot be longer than 500 characters. Enclose the description with quotes. If nothing is specified, the original description is retained.
  • --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 without additional information.

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

Example:

The command below updates the name of a project:


olp project update hrn:here:authorization::myrealm:project/myproject --name "my updated name"

Output:


Project hrn:here:authorization::myrealm:project/myproject has been updated.

project show

Shows the details of a project.


olp project show <project HRN>

Required parameters:

  • <project HRN> The HRN of the project.

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 Display the project name.
  • --json Display the command's result in JSON format.

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

Example:

The command below shows the details of a project:


olp project show hrn:here:authorization::myrealm:project/myproject --json

Output:


{
    "hrn": "hrn:here:authorization::myrealm:project/myproject",
    "name": "my-project-name",
    "description": "my project description",
    "id": "myproject"
}

project delete

Deletes a project.


olp project delete <project HRN>

Required parameters:

  • <project HRN> The HRN of the project 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 platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --quiet Display an empty output without additional information.

Warning: Project deletion

Deleting a project could have an impact on all the users, apps, and groups that have project access. If there are resources that have been created from within the project, you must first remove these resources before deleting the project itself.

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

Example:

The command below deletes the project myproject:


olp project delete hrn:here:authorization::myrealm:project/myproject

Output:


Project hrn:here:authorization::myrealm:project/myproject has been deleted.

results matching ""

    No results matching ""