Skip to content

project

project create

project create <PROJECT_NAME> [OPTIONS]

Create a new project.

Arguments

PROJECT_NAME
The name of the project.
Type: text
Required:

Options

--storage-limit <STORAGE_LIMIT>
The storage quota of the project.
Type: integer

--registry-id <REGISTRY_ID>
The ID of referenced registry when creating the proxy cache project
Type: integer

--public <PUBLIC>
The public status of the project.
Type: boolean

--content-trust <ENABLE_CONTENT_TRUST>
Whether content trust is enabled or not. If it is enabled, user can't pull unsigned images from this project.
Type: boolean

--content-trust-cosign <ENABLE_CONTENT_TRUST_COSIGN>
Whether cosign content trust is enabled or not. If it is enabled, user can't pull images without cosign signature from this project.
Type: boolean

--prevent-vul <PREVENT_VUL>
Whether prevent the vulnerable images from running.
Type: boolean

--severity <SEVERITY>
If the vulnerability is high than severity defined here, the images can't be pulled. The valid values are "none", "low", "medium", "high", "critical".
Type: text

--auto-scan <AUTO_SCAN>
Whether scan images automatically when pushing.
Type: boolean

--reuse-sys-cve-allowlist <REUSE_SYS_CVE_ALLOWLIST>
Whether this project reuse the system level CVE allowlist as the allowlist of its own. If it is set to "true" the actual allowlist associate with this project, if any, will be ignored.
Type: boolean

--retention-id <RETENTION_ID>
The ID of the tag retention policy for the project
Type: text

--sbom-generation <AUTO_SBOM_GENERATION>
Whether generating SBOM automatically when pushing a subject artifact.
Type: boolean


project delete

project delete <PROJECT_NAME_OR_ID> [OPTIONS]

Delete a project.

Arguments

PROJECT_NAME_OR_ID
Name or ID of the project to use. Prefix with 'id:' to specify an ID.
Type: text
Required:

Options

--force
Force deletion without confirmation.
Type: boolean (flag)
Default: False


project exists

project exists <PROJECT_NAME>

Check if a project with the given name exists.

Arguments

PROJECT_NAME
Project name to check existence of.
Type: text
Required:


project get

project get <PROJECT_NAME_OR_ID>

Get information about a project.

Arguments

PROJECT_NAME_OR_ID
Name or ID of the project to use. Prefix with 'id:' to specify an ID.
Type: text
Required:


project list

project list [OPTIONS]

Fetch projects.

Options

--query <QUERY>
Query parameters to filter the results.
See harborapi docs for more information.
Type: text

--sort <SORT>
Sort projects by the given field(s). Sortable fields: 'name', 'project_id', 'creation_time'
Type: text
Default: name

--page <PAGE>
(Advanced) Page to begin fetching from.
Type: integer
Default: 1

--page-size <PAGE_SIZE>
(Advanced) Results to fetch per API call.
Type: integer
Default: 10

--limit <LIMIT>
Maximum number of results to fetch.
Type: integer

--public/--no-public
Filter projects by the given public status.
Type: boolean (flag)

--owner <OWNER>
Filter projects by the user who owns them.
Type: text


project logs

project logs <PROJECT_NAME> [OPTIONS]

Fetch logs for a project.

Arguments

PROJECT_NAME
Project name to fetch logs for.
Type: text
Required:

Options

--query <QUERY>
Query parameters to filter the results.
See harborapi docs for more information.
Type: text

--sort <SORT>
Sorting order of the results. Example: 'name,-id' to sort by name ascending and id descending.
Type: text

--page <PAGE>
(Advanced) Page to begin fetching from.
Type: integer
Default: 1

--page-size <PAGE_SIZE>
(Advanced) Results to fetch per API call.
Type: integer
Default: 10

--limit <LIMIT>
Maximum number of results to fetch.
Type: integer


project repos

project repos <PROJECT> [OPTIONS]

List all repositories in a project.

Alternative to repository list

Arguments

PROJECT
Name of project to fetch repositories from.
Type: text
Required:

Options

--query <QUERY>
Query parameters to filter the results.
See harborapi docs for more information.
Type: text

--sort <SORT>
Sorting order of the results. Example: 'name,-id' to sort by name ascending and id descending.
Type: text

--page <PAGE>
(Advanced) Page to begin fetching from.
Type: integer
Default: 1

--page-size <PAGE_SIZE>
(Advanced) Results to fetch per API call.
Type: integer
Default: 10

--limit <LIMIT>
Maximum number of results to fetch.
Type: integer


project summary

project summary <PROJECT_NAME_OR_ID>

Fetch project summary.

Arguments

PROJECT_NAME_OR_ID
Name or ID of the project to use. Prefix with 'id:' to specify an ID.
Type: text
Required:


project update

project update <PROJECT_NAME_OR_ID> [OPTIONS]

Update project information.

Arguments

PROJECT_NAME_OR_ID
Name or ID of the project to use. Prefix with 'id:' to specify an ID.
Type: text
Required:

Options

--storage-limit <STORAGE_LIMIT>
The storage quota of the project.
Type: integer

--registry-id <REGISTRY_ID>
The ID of referenced registry when creating the proxy cache project
Type: integer

--public <PUBLIC>
The public status of the project.
Type: boolean

--content-trust <ENABLE_CONTENT_TRUST>
Whether content trust is enabled or not. If it is enabled, user can't pull unsigned images from this project.
Type: boolean

--content-trust-cosign <ENABLE_CONTENT_TRUST_COSIGN>
Whether cosign content trust is enabled or not. If it is enabled, user can't pull images without cosign signature from this project.
Type: boolean

--prevent-vul <PREVENT_VUL>
Whether prevent the vulnerable images from running.
Type: boolean

--severity <SEVERITY>
If the vulnerability is high than severity defined here, the images can't be pulled. The valid values are "none", "low", "medium", "high", "critical".
Type: text

--auto-scan <AUTO_SCAN>
Whether scan images automatically when pushing.
Type: boolean

--reuse-sys-cve-allowlist <REUSE_SYS_CVE_ALLOWLIST>
Whether this project reuse the system level CVE allowlist as the allowlist of its own. If it is set to "true" the actual allowlist associate with this project, if any, will be ignored.
Type: boolean

--retention-id <RETENTION_ID>
The ID of the tag retention policy for the project
Type: text

--sbom-generation <AUTO_SBOM_GENERATION>
Whether generating SBOM automatically when pushing a subject artifact.
Type: boolean