Querying the Enterprise Project IDs of All Clusters
Function
This API is used to query the enterprise project IDs of all clusters in the current project.
Calling Method
For details, see Calling APIs.
URI
GET /v1.1/{project_id}/enterprise-projects
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Project ID and Account ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. This parameter is mandatory when token authentication is used. You can obtain it from the value of X-Subject-Token in the response message header returned by the "Obtaining a User Token" API of the IAM service. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
resources |
Array of CdmClusterEnterpriseProject objects |
Enterprise projects of the cluster |
|
Parameter |
Type |
Description |
|---|---|---|
|
cluster_id |
String |
Cluster ID |
|
sys_tags |
Array of sys_tags objects |
Enterprise projects |
Example Requests
GET /v1.1/1551c7f6c808414d8e9f3c514a170f2e/enterprise-projects
Example Responses
Status code: 200
Request succeeded.
{
"resources" : [ {
"cluster_id" : "2b2a676f-0b91-4ad5-8c24-ec61be586fd1",
"sys_tags" : [ {
"key" : "_sys_enterprise_project_id",
"value" : "1ce45885-4033-40d2-bdde-d4dbaceb387d"
} ]
}, {
"cluster_id" : "387f8b24-c4b0-4211-97fe-745d0e88dc88",
"sys_tags" : [ {
"key" : "_sys_enterprise_project_id",
"value" : 0
} ]
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. |
|
400 |
Request error. |
|
401 |
Authentication failed. |
|
403 |
No operation permissions. |
|
404 |
No resources found. |
|
500 |
Internal service error. For details about the returned error code, see Error Codes. |
|
503 |
Service unavailable. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.