Updated on 2025-10-20 GMT+08:00

Querying Enterprise Projects

Function

This API is used to query the enterprise projects. Before calling this API:

Constraints

The resource types and operating systems of instances must support the pidstat command.

Debugging

You can debug this API in API Explorer.

URI

GET /v3/{project_id}/enterprise-projects

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance.

Constraints

N/A

Range

The value can contain 36 characters. Only letters and digits are allowed.

Default Value

N/A

name_keyword

No

String

Definition

Keyword of the enterprise project name.

Constraints

N/A

Range

N/A

Default Value

N/A

offset

No

Integer

Definition

Index offset. The query starts from the next piece of data indexed by this parameter.

Constraints

The value must be a non-negative number.

Range

N/A

Default Value

0: The query starts from the first data record.

limit

No

Integer

Definition

Number of records returned by a query.

Constraints

The value cannot be a negative number.

Range

1–1000

Default Value

100

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

After the request is processed, the value of X-Subject-Token in the message header is the token value.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Language.

Constraints

N/A

Range

  • zh-cn
  • en-us

Default Value

en-us

Response Parameters

Table 3 Response parameters

Parameter

Type

Description

enterprise_projects

Array of objects

Definition

Enterprise projects.

total_count

Integer

Definition

Total number of enterprise projects.

Range

N/A

Table 4 enterprise_projects field data structure description

Parameter

Type

Description

id

String

Definition

Enterprise project ID.

Range

N/A

name

String

Definition

Enterprise project name.

Range

N/A

description

String

Definition

Enterprise project description.

Range

N/A

status

String

Definition

Enterprise project status.

Range

  • 1: enabled
  • 2: disabled

created_at

String

Definition

Creation time, in UTC format. For example, 2018-05-18T06:49:06Z.

Range

N/A

updated_at

String

Definition

Update time, in UTC format. For example, 2018-05-28T02:21:36Z.

Range

N/A

Example Request

https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/enterprise-projects?name_keyword=auto&offset=0&limit=100

Example Response

{ 
  "enterprise_projects" : [ { 
    "id" : "6fbcf2f3-3164-4d32-9a3e-a8886dc38c24", 
    "name" : "auto_test", 
    "description" : "auto_test description", 
    "status" : "1", 
    "created_at" : "2018-05-18T06:49:06Z", 
    "updated_at" : "2018-05-28T02:21:36Z" 
  } ], 
  "total_count" : 1 
}

Status Codes

Error Codes

For details, see Error Codes.