Querying Enterprise Projects
Function
This API is used to query enterprise projects. Before calling this API:
- Learn how to authenticate it.
- Obtain the required region and endpoint.
URI
GET /v3/{project_id}/enterprise-projects
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints N/A Range The value contains 32 characters. Only letters and digits are allowed. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | No | Integer | Definition Index offset. The query starts from the next piece of data indexed by this parameter. Constraints The value must be an integer and cannot be a negative number. Range ≥ 0 Default Value 0 |
| limit | No | Integer | Definition Number of records to be queried. Constraints The value must be an integer and cannot be a negative number. Range 1–100 Default Value 100 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. To obtain this value, call the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the token value. Constraints N/A Range N/A Default Value N/A |
| X-Language | No | String | Definition Request language type. Constraints N/A Range Default Value en-us |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| enterprise_projects | Array of EnterpriseProjectItem objects | Definition Enterprise project information. |
| total_count | Integer | Definition Total number of enterprise projects. Range N/A |
| 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 |
| created | String | Definition Creation time. Range The value is in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100. |
| updated | String | Definition Update time. Range The value is in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Example Request
Querying Enterprise Projects
GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/enterprise-projects Example Response
Status code: 200
Success.
{
"total_count" : 4,
"enterprise_projects" : [ {
"id" : 0,
"name" : "default",
"description" : null,
"status" : 1,
"created" : null,
"updated" : null
}, {
"id" : "5c7d11e0-3201-4558-bcce-1172137cf7e2",
"name" : "sjw-eps",
"description" : null,
"status" : 1,
"created" : "2023-06-12T02:14:28+0000",
"updated" : "2023-06-12T02:14:28+0000"
}, {
"id" : "12093327-28dc-46c5-8ba6-d42c9236f9d6",
"name" : "adf",
"description" : null,
"status" : 1,
"created" : "2023-05-06T08:33:03+0000",
"updated" : "2023-05-06T08:33:03+0000"
}, {
"id" : "07d90b3f-422b-40c9-b9b3-6d00d1d7a60b",
"name" : "eps-test",
"description" : null,
"status" : 1,
"created" : "2023-03-16T01:38:13+0000",
"updated" : "2023-03-16T01:38:13+0000"
} ]
} Status Code
For details, see Status Codes.
Error Code
For details, see Error Codes.