Instance list.
Function
Obtain the list of service instances that meet the search criteria.
URI
GET /v2/{project_id}/instances
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. Minimum: 16 Maximum: 128 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| status | No | String | Instance status. Minimum: 3 Maximum: 128 |
| offset | No | Integer | Offset, which is greater than or equal to 0. Minimum: 0 Maximum: 100 Default: 0 |
| limit | No | Integer | Number of items displayed on each page. Minimum: 0 Maximum: 100 Default: 10 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token, which can be obtained by calling the IAM API (value of X-Subject-Token in the response header). Minimum: 1000 Maximum: 65536 |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total | Integer | Total number of records. Minimum: 0 Maximum: 100 |
| size | Integer | Number of records displayed on the current page. Minimum: 0 Maximum: 100 |
| instances | Array<Object> | Instance list. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Instance ID. |
| name | String | Instance name. |
| description | String | Instance description. |
| flavor_id | String | Instance specification ID. |
| flavor_type | String | Instance specification type. |
| cpu_arch | String | CPU architecture type. The options are as follows:
Default: x86_64 |
| vpc_id | String | VPC ID specified by the instance. |
| subnet_id | String | VPC subnet ID specified by the instance. |
| security_group_id | String | Security group ID specified by the instance. |
| publicip_enable | Boolean | Indicates whether to enable public network access. If the function is enabled, the publicip_id field is mandatory. |
| publicip_id | String | ID of the EIP bound to the instance. |
| publicip_address | String | EIP bound to the instance. |
| status | String | Instance running status. |
| error_code | String | Error code. Minimum: 1 Maximum: 128 |
| error_msg | String | Error message. Minimum: 1 Maximum: 512 |
| charge_type | String | Billing mode of the instance. |
| project_id | String | Project ID. |
| create_time | String | Creation time. |
| update_time | String | Update time. |
| maintain_begin | String | O&M start time. |
| maintain_end | String | O&M end time. |
| available_zone_ids | Array of strings | AZ list used for creating an instance. |
| enterprise_project_id | String | ID of the enterprise project to which the gateway belongs. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. Minimum: 1 Maximum: 128 |
| error_msg | String | Error message. Minimum: 1 Maximum: 128 |
| error_details | String | Error information. Minimum: 1 Maximum: 128 |
| request_id | String | Request ID. Minimum: 1 Maximum: 128 |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. Minimum: 1 Maximum: 128 |
| error_msg | String | Error message. Minimum: 1 Maximum: 128 |
| error_details | String | Error information. Minimum: 1 Maximum: 128 |
| request_id | String | Request ID. Minimum: 1 Maximum: 128 |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. Minimum: 1 Maximum: 128 |
| error_msg | String | Error message. Minimum: 1 Maximum: 128 |
| error_details | String | Error information. Minimum: 1 Maximum: 128 |
| request_id | String | Request ID. Minimum: 1 Maximum: 128 |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. Minimum: 1 Maximum: 128 |
| error_msg | String | Error message. Minimum: 1 Maximum: 128 |
| error_details | String | Error information. Minimum: 1 Maximum: 128 |
| request_id | String | Request ID. Minimum: 1 Maximum: 128 |
Example Requests
None
Example Responses
Status code: 400
Bad Request
{
"error_code" : "ROMA.00013000",
"error_msg" : "Invalid parameter value,parameterName:name. Please refer to the support documentation",
"error_details" : "some error details here",
"request_id" : "13760c1fe8655e61209b75665e9bef43"
} Status code: 401
Unauthorized
{
"error_code" : "ROMA.00012000",
"error_msg" : "Incorrect token or token resolution failed",
"error_details" : "some error details here",
"request_id" : "13760c1fe8655e61209b75665e9bef43"
} Status code: 403
Forbidden
{
"error_code" : "ROMA.00012000",
"error_msg" : "No permissions to request this method",
"error_details" : "some error details here",
"request_id" : "13760c1fe8655e61209b75665e9bef43"
} Status code: 500
Internal Server Error
{
"error_code" : "ROMA.00011000",
"error_msg" : "System error",
"error_details" : "some error details here",
"request_id" : "13760c1fe8655e61209b75665e9bef43"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 500 | Internal Server Error |
Error Codes
See Error Codes.
Last Article: Instance Management
Next Article: FDI APIs
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.