Description
Queries the host IDC information based on the IDC ID.
Call instructions
Interface constraints
The caller must have the HOST_VIEWER permission.
Request path
GET /api/v2/compute/idcs/{idcId}
Request parameters
path:
Parameter |
Type |
Required |
Example Value |
Description |
|---|---|---|---|---|
| idcId | Integer | Yes | 100 | The ID of the host IDC. |
Return results
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 IDC ID. |
| 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/100
Return example
{
"data": {
"contents": [
{
"createTime": "2021-12-31T18:01:44+08:00",
"description": null,
"id": 1,
"name": "changsha",
"regionId": 1,
"regionName": "OCP_META_REGION",
"updateTime": "2021-12-31T18:01:44+08:00"
}
],
"page": {
"number": 1,
"size": 1,
"totalElements": 2,
"totalPages": 2
}
},
"duration": 12,
"server": "b3b6d90167",
"status": 200,
"successful": true,
"timestamp": "2022-04-27T10:23:11.903+08:00",
"traceId": "33f871031b924b40"
}
