project list

Return a list of projects that meet the provided query parameters. By default, the list returns projects of which the authenticated user is a member. The command lists only Analytics projects (Data Quality projects are not supported).

Syntax

cpd-cli project list \
--profile=<cpd-profile-name> \
[--bookmark=<pagination-bookmark>] \
[--bss-account-id=<bss-account-id>] \
[--guids=<comma-separated-list-of-project-ids>] \
[--include=<comma-separated-list-of-project-metadata-sections>] \
[--jmes-query=<jmespath-query>] \
[--limit=<project-limit>] \
[--match=<text-matching-type>] \
[--member=<project-member-filter>] \
[--name=<full-or-partial-project-name>] \
[--output=json|yaml|table] \
[--output-file=<output-file-location>] \
[--raw-output=true|false] \
[--roles=<comma-separated-list-of-project-roles>]

Arguments

The project list command has no arguments.

Options

Table 1: Command options
Option Description
--bookmark Specify a bookmark for results
pagination.
Status
Optional.
Syntax
--bookmark=<pagination-bookmark>
Default value
No default.
Valid values
Any valid pagination bookmark.
--bss-account-id Specify the BSS account ID. Filtering by 'bss_account_id' is allowed only for accredited services.
Status
Optional.
Syntax
--bss-account-id=<bss-account-id>
Default value
No default.
Valid values
A valid BSS account ID.
--guids Specify a list of comma-separated project IDs to use to filter the query results.
Status
Optional.
Syntax
--guids=<comma-separated-list-of-project-ids>
Default value
No default.
Valid values
A comma-separated list of project IDs.

--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.
--include Specify list of comma-separated project metadata sections to include in the query results.
Status
Optional.
Syntax
--include=<comma-separated-list-of-response-fields>
Default value
No default.
Valid values
A comma-separated list of project metadata sections to include in the query results.
--jmes-query Provide a JMESPath query to customize the output.
Status
Optional. This option has effect only when --output is set to json or yaml.
Syntax
--jmes-query=<jmespath-query>
Default value
No default.
Valid values
A valid JMESPath query.
--limit Specify a value that is used to specify the maximum number of projects that are returned in the query results. The option is used for pagination in conjunction with the 'bookmark' query parameter.
Status
Optional.
Syntax
--limit=<project-limit>
Default value
100
Valid values
An integer value in the range 0 - 200.
--match Specify the text matching type to perform. This query parameter must be used in conjunction with the 'name' query parameter. The 'exact' value matches projects if the specified text matches the exact project name. The 'keyword' value matches projects if the specified text matches any keyword that is parsed from the project name.
Status
Optional.
Syntax
--match=<text-matching-type>
Default value
exact
Valid values
exact
Matches projects when the specified text matches the exact project name.
keyword
Matched projects when the specified text matches any keyword that is parsed from the project name.
--member Specify a project member to use when filtering the query results by membership.
Status
Optional.
Syntax
--member=<project-member-filter>
Default value
No default.
Valid values
A valid project member.
--name Specify a full or partial project name to use when filtering the query results. This option must be used with the 'bss_account_id' option. Use the 'match' option to control what type of text matching is performed. Project names are not unique and should not be used in place of project IDs.
Status
Optional.
Syntax
--name=<full-or-partial-project-name>
Default value
No default.
Valid values
A valid full or partial project name.
--output Specify an output format.
Status
Optional.
Syntax
--output=json|yaml|text
Default value
text
Valid values
Valid formats include JSON, YAML, or text (the default format).
--output-file Specify a file path where all output is redirected.
Status
Optional.
Syntax
--output-file=<output-file-location>
Default value
No default.
Valid values
A valid output file path location.
--profile The name of the profile that you created to store information about an instance of Cloud Pak for Data and your credentials for the instance.
Status
Required.
Syntax
--profile=<cpd-profile-name>
Default value
No default.
Valid values

The name of the profile that you created.

--raw-output When set to true, single values are not surrounded by quotation marks in
 JSON output mode.
Status
Optional. This option has effect only when --output is set to json or yaml.
Syntax
--raw-output=true|false
Default value
false
Valid values
false
Single values in JSON output mode are surrounded by quotation marks.
true
Single values in JSON output mode are not surrounded by quotation marks.
--roles Specify a list of comma-separated project roles to use when filtering the query results. The option must be used in conjunction with the 'member' option.
Status
Optional.
Syntax
--roles=<comma-separated-list-of-project-roles>
Default value
No default.
Valid values
A comma-separated list of project roles.

Examples

Note: The following examples use environment variables. Use a script to create environment variables with the correct values for your environment. You can add the listed environment variables to the installation variables script. For more information, see Setting up installation environment variables.
List available projects for the specified Cloud Pak for Data configuration profile name.
cpd-cli project list \
--profile=${CPD_PROFILE_NAME}
Example results.

ID                                     Name                               Created                    Description   Tags   
0cabb425-56d9-48fc-a178-f30d22737778   git-demo-project                   2021-02-19T13:47:11.811Z                 []   
45f48375-4cdf-4354-8f51-3dbe933dc0aa   Clustering Demo (git integrated)   2021-05-20T06:31:48.099Z                 []   
7fb76cf7-25be-435d-818e-bd6e9b5254f5   cpdctl-demo                        2021-01-29T08:01:23.363Z                 []