Description
Queries the information list of IDCs.
API call instructions
API constraints
The caller must have the HOST_VIEWER permission.
Request path
GET /api/v2/compute/idcs
Request parameters
body:
Parameter |
Type |
Required |
Example Value |
Description |
|---|---|---|---|---|
| page | Integer | No | 1 | The page number for pagination, starting from 1. |
| size | Integer | No | 10 | The size of the data to be requested. Default value: 10, maximum value: 2000. |
| sort | String | No | id,asc | The sorting rule for the requested data. |
Response
Basic data structure
Parameter |
Type |
Description |
|---|---|---|
| data | Object | The requested data. |
| ├─ contents | Array | The array of IDCs. For more information, see Idc data structure. |
| ├─ page | Object | The pagination information. For more information, see page data structure. |
| successful | Boolean | Indicates whether the request is successful. |
| timestamp | Datetime | The timestamp when the server completes the request. |
| duration | Integer | The time taken by the server to process the request (in milliseconds). |
| status | Integer | The HTTP status code that conforms to the HTTP status specification. |
| traceId | String | The Trace ID of the request, which is used to troubleshoot problems. |
| server | String | The address of the application service that responds to the request. |
Idc data structure
Parameter |
Type |
Description |
|---|---|---|
| id | Long | The ID of the IDC. |
| name | String | The name of the IDC. |
| description | String | The description of the IDC. |
| regionId | Long | The ID of the region associated with the IDC. |
| regionName | String | The name of the region associated with the IDC. |
| createTime | String | The creation time of the IDC. |
| updateTime | String | The modification time of the IDC. |
page data structure
Parameter |
Type |
Description |
|---|---|---|
| totalElements | Integer | The total number of records. |
| totalPages | Integer | The total number of pages. |
| number | Integer | The current page number. |
| size | Integer | The size of the current page. |
Examples
Request example
GET /api/v2/compute/idcs?page=1&size=10
Response example
{
"data": {
"contents": [
{
"createTime": "2021-08-03T16:39:24+08:00",
"description": null,
"id": 1,
"name": "beijing",
"regionId": 1,
"updateTime": "2021-08-03T16:39:24+08:00",
"regionName": "OCP_META_REGION"
}
],
"page": {
"number": 1,
"size": 10,
"totalElements": 1,
"totalPages": 1
}
},
"duration": 14,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-08-25T16:24:52.687+08:00",
"traceId": "1500d28ffdc84801"
}
