Querying the IDC List
Function
This API is used to query the IDC list.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/idcs
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Definition: Project ID. Constraints: N/A Value range: Project IDs of the account Default value: N/A |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
region | Yes | String | Definition Region information. Constraints N/A Range Regions. Default Value N/A |
limit | No | String | Definition Number of records on each page for pagination query. Constraints N/A Range [1-2000] Default Value 2000 |
order | No | String | Definition Sorting method. Constraints N/A Range
Default Value N/A |
marker | No | String | Definition Query address of the next page. Constraints N/A Range N/A Default Value N/A |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | Definition: Requests for calling an API can be authenticated using a token. If token-based authentication is used, this parameter is mandatory and must be set to a user token. Constraints: N/A Value range: N/A Default value: N/A |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
idcs | Array of IDc objects | Definition A set of data centers. Constraints N/A |
page_info | PageInfo object | Definition Pagination information. Constraints N/A |
count | Integer | Definition The total number of data centers. Constraints N/A Range N/A Default Value N/A |
Parameter | Type | Description |
|---|---|---|
name | String | Definition Data center name. Constraints N/A Range Maximum length: 256 bytes Default Value N/A |
irack_num | Integer | Definition Number of racks contained. Constraints N/A Range Regions. Default Value N/A |
id | String | Definition IDC ID. Constraints N/A Range Maximum length: 128 bytes Default Value N/A |
region | String | Definition Region information. Constraints N/A Range Regions. Default Value N/A |
description | String | Definition IDC description. Constraints N/A Range Maximum length: 512 characters Default Value N/A |
Parameter | Type | Description |
|---|---|---|
next_marker | String | Definition Query address of the next page. Constraints N/A Range N/A Default Value N/A |
previous_marker | String | Definition Query address of the previous page. Constraints N/A Range N/A Default Value N/A |
current_count | Integer | Definition Number of records returned on this page. Constraints N/A Range N/A Default Value N/A |
Status code: 400
Parameter | Type | Description |
|---|---|---|
error_msg | String | Definition Error description. Constraints N/A Range N/A Default Value N/A |
error_code | String | Definition Error code. Constraints N/A Range N/A |
Status code: 401
Parameter | Type | Description |
|---|---|---|
error_msg | String | Definition Error description. Constraints N/A Range N/A Default Value N/A |
error_code | String | Definition Error code. Constraints N/A Range N/A |
Status code: 429
Parameter | Type | Description |
|---|---|---|
error_msg | String | Definition Error description. Constraints N/A Range N/A Default Value N/A |
error_code | String | Definition Error code. Constraints N/A Range N/A |
Status code: 500
Parameter | Type | Description |
|---|---|---|
error_msg | String | Definition Error description. Constraints N/A Range N/A Default Value N/A |
error_code | String | Definition Error code. Constraints N/A Range N/A |
Example Requests
Querying the IDC list
GET https://{endpoint}/v1/{project_id}/idcs Example Responses
Status code: 200
The IDC list is returned.
{
"idcs" : [ {
"id" : "019674ed-07c1-7496-b6a8-96989d73efa9",
"name" : "EquipmentRoom_001",
"irack_num" : 1016,
"description" : "Describe the IDC.",
"region" : "cn-southwest-242"
} ],
"page_info" : {
"next_marker" : "01981c9a-bf80-7265-b3d3-6e2b34fcced5",
"previous_marker" : "019674ed-07c1-7496-b6a8-96989d73efa9",
"current_count" : 606
},
"count" : 606
} Status Codes
Status Code | Description |
|---|---|
200 | The IDC list is returned. |
400 | Invalid request parameter. |
401 | Request error due to user authorization not granted. |
429 | Request error due to too frequent requests. |
500 | Internal server error. |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
