project
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 thefilterstring.--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 theolpcli.inifile.--jsonDisplays the command result in JSON format.--quietDisplays 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 --jsonOutput:
{"projects": [
{
"hrn": "hrn:here: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.
NoteProject 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-userflag 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-userDo 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 theolpcli.inifile.--quietDisplays 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::org:project/myproject has been createdproject 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-accessvalues:thisProjectOnlyRequests scoped to this project can only access resources and API calls available within this project's scope.thisProjectOrNoProjectRequests 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 valueall-access-all-project-resourcesandresource-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 theolpcli.inifile.--quietDisplays 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::org:project/myproject --name "my updated name"Output:
Project hrn:here:authorization::org:project/myproject has been updatedExample:
The command below updates the default policies for new project members:
olp project update hrn:here:authorization::myrealm:project/myproject --default-new-member-policies hrn:here:authorization::HERE:platform:policy/some-policy-id,hrn:here:authorization::HERE:platform:policy/another-policy-idOutput:
Project hrn:here:authorization::myrealm:project/myproject has been updatedproject 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 theolpcli.inifile.--quietDisplays the project name.--jsonDisplays 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:authorization::org:project/myproject --jsonOutput:
{
"hrn": "hrn:here:authorization::org:project/myproject",
"name": "my-project-name",
"description": "my project description",
"id": "myproject",
"scopeAccess": "thisProjectOnly",
"defaultNewMemberProjectPolicies": [
"hrn:here:authorization::HERE:platform:policy/all-access-all-project-resources",
"hrn:here: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 theolpcli.inifile.--quietDisplays an empty output without additional information.
WarningProject 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::org:project/myprojectOutput:
Project hrn:here:authorization::org:project/myproject has been deletedUpdated 22 days ago