project

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> 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 Displays the command result in JSON format.
  • --quiet Displays the project HRNs, 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-cn:authorization::org: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 Displays 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-cn:authorization::org: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.
  • --scope-access <thisProjectOnly|thisProjectOrNoProject> The scope of access that is allowed when operating within this project's scope (through using a project-scoped token). Available --scope-access values:
    • thisProjectOnly Requests scoped to this project can only access resources and API calls available within this project's scope.
    • thisProjectOrNoProject Requests scoped to this project can access resources and API calls available within this project's scope in addition to resources and API calls associated with no project at all that the calling identity has access to.
  • --default-new-member-policies <list of policies> A comma-separated list with default policies for new project members. The default value all-access-all-project-resources and resource-creation-access-all-project-resources. You can specify an empty parameter to remove the default policies.
  • --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 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-cn:authorization::org:project/myproject --name "my updated name"

Output:


Project hrn:here-cn:authorization::org:project/myproject has been updated

Example:

The command below updates the default policies for new project members:


olp project update hrn:here-cn:authorization::myrealm:project/myproject --default-new-member-policies hrn:here-cn:authorization::HERE:platform:policy/some-policy-id,hrn:here-cn:authorization::HERE:platform:policy/another-policy-id

Output:


Project hrn:here-cn: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 Displays the project 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 project:


olp project show hrn:here-cn:authorization::org:project/myproject --json

Output:


{
    "hrn": "hrn:here-cn:authorization::org:project/myproject",
    "name": "my-project-name",
    "description": "my project description",
    "id": "myproject",
    "scopeAccess": "thisProjectOnly",
    "defaultNewMemberProjectPolicies": [
        "hrn:here-cn:authorization::HERE:platform:policy/all-access-all-project-resources",
        "hrn:here-cn:authorization::HERE:platform:policy/resource-creation-access-all-project-resources"
    ]
}

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 Displays 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-cn:authorization::org:project/myproject

Output:


Project hrn:here-cn:authorization::org:project/myproject has been deleted

results matching ""

    No results matching ""