Querying Enterprise Projects
Function
This API is used to query the enterprise projects. Before calling this API:
- Learn how to authenticate this API.
Constraints
The resource type and operating system of instances must support the pidstat command.
URI
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Explanation: Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. Restrictions: None Value range: The value can contain 32 characters. Only letters and digits are allowed. Default value: None |
| instance_id | Yes | String | Instance ID. |
| name_keyword | No | String | Keyword of the enterprise project name. |
| offset | No | Integer | Index offset. If offset is set to N, the resource query starts from the N+1 data entry. The default value is 0, indicating that the query starts from the first data entry. The value cannot be a negative number. |
| limit | No | Integer | Number of records to be queried. The default value is 100. The value cannot be a negative number. The minimum value is 1 and the maximum value is 1000. |
Request Parameters
None
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| enterprise_projects | Array of objects | Enterprise projects. |
| total_count | Integer | Total number of enterprise projects. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Enterprise project ID. |
| name | String | Enterprise project name. |
| description | String | Enterprise project description. |
| status | String | Enterprise project status 1: enabled. 2: disabled |
| created_at | String | Creation time, in UTC format, for example, 2018-05-18T06:49:06Z. |
| updated_at | String | Modification time, in UTC format, for example, 2018-05-28T02:21:36Z. |
Example Request
https://gaussdb-opengauss.eu-west-101.myhuaweicloud.eu/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 Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.