Description
Queries the host region information based on the region ID.
Call instructions
Interface constraints
The caller must have the HOST_VIEWER permission.
Request path
GET /api/v2/compute/regions/{regionId}
Request parameters
path:
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| regionId | Integer | Yes | 100 | The ID of the host region. |
Return results
Basic data structure
Parameter |
Type |
Description |
|---|---|---|
| data | Object | The requested data. |
| ├─ contents | Array | An array of Region objects. For details, see Region data structure. |
| ├─ page | Object | Paging information. |
| ├─ totalElements | Integer | Total number of records. |
| ├─ totalPages | Integer | Total number of pages. |
| ├─ number | Integer | Current page number. |
| ├─ size | Integer | The size of the current page. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | An HTTP status code that conforms to the HTTP standard. |
| traceId | String | The Trace ID of the request, which is used to troubleshoot issues. |
| server | String | The address of the application service that responded to the request. |
Region data structure
Parameter |
Type |
Description |
|---|---|---|
| id | Integer | The ID of the region. |
| name | String | The name of the region. |
| description | String | The description of the region. |
| createTime | String | The creation time of the region information. |
| updateTime | String | The modification time of the region information. |
Examples
Request example
GET /api/v2/compute/regions/100
Return example
{
"data": {
"contents": [
{
"createTime": "2021-12-31T17:53:46+08:00",
"description": null,
"id": 1,
"idcs": [
{
"createTime": "2021-12-31T18:01:44+08:00",
"id": 1,
"name": "changsha",
"region": {
"createTime": "2021-12-31T17:53:46+08:00",
"id": 1,
"name": "OCP_META_REGION",
"updateTime": "2021-12-31T17:53:46+08:00"
},
"updateTime": "2021-12-31T18:01:44+08:00"
},
{
"createTime": "2022-04-25T10:56:27+08:00",
"id": 1000001,
"name": "beijing",
"region": {
"createTime": "2021-12-31T17:53:46+08:00",
"id": 1,
"name": "OCP_META_REGION",
"updateTime": "2021-12-31T17:53:46+08:00"
},
"updateTime": "2022-04-25T10:56:27+08:00"
}
],
"name": "OCP_META_REGION",
"updateTime": "2021-12-31T17:53:46+08:00"
}
],
"page": {
"number": 1,
"size": 5000,
"totalElements": 1,
"totalPages": 1
}
},
"duration": 30333,
"server": "b3b6d90167",
"status": 200,
"successful": true,
"timestamp": "2022-04-25T11:08:21.541+08:00",
"traceId": "68a416f4827bf696"
}
