List Servers¶
Overview¶
This API lists your baremetal servers information.
Classification¶
- List
API Operation Object¶
Synchronous / Asynchronous¶
- Synchronous
Request¶
HTTP Request Method¶
- GET
HTTP Request Path¶
{api_endpoint}/v2/{tenant_id}/servers?limit=10&flavor=http://controller:port/v2/flavors/{flavor_id}
HTTP Request Header¶
Accept: application/json
Content-Type: application/json
X-Auth-Token: <token>
HTTP Request Body¶
Format¶
- none
Request Parameter¶
name | style | format | description | required/optional | default value | action for invalid parameter | response code for invalid parameter |
---|---|---|---|---|---|---|---|
changes-since | query | dateTime | A time/date stamp for when the server last changed status. | optional | - | Terminate | 400 |
marker | query | UUID | UUID of the server at which you want to set a marker. Find servers from the next UUID of the given one. | optional | - | Terminate | 400 |
limit | query | int | Integer value for the limit of values to return. | optional | - | Terminate | 400 |
name | query | String | Name of the server as a string | optional | - | Terminate | 400 |
image | query | URI | Name of the image in URL format. This parameter can be obtained by GET /images API. | optional | - | Terminate | 400 |
flavor | query | URI | Name of the flavor in URL format. This parameter can be obtained by GET /flavors API. | optional | - | Terminate | 400, 404 |
status | query | String | Value of the status of the server so that you can filter on. | optional | - | Terminate | 400 |
Response¶
Sample Request and Response¶
Sample API Request¶
Request URI¶
https://baremetal-server-jp1-ecl.api.ntt.com/v2/b322a85578de48beba0f92acce57869b/servers?limit=10&flavor=http://controller:port/v2/flavors/8b59526b-daf5-46db-9c44-e77c0a34bf2c
HTTP Request Header¶
GET /v2/b322a85578de48beba0f92acce57869b/servers?limit=10&flavor=http://controller:port/v2/flavors/8b59526b-daf5-46db-9c44-e77c0a34bf2c HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.150.51:8774
Accept: application/json
Content-Type: application/json
X-Auth-Token: 62d528dc0cca4827b0ed465efe1c2588
HTTP Request Body¶
- none
Sample API Response¶
HTTP Response Header¶
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: <content-length>
Date: Thu, 17 Jul 2014 04:21:06 GMT
HTTP Response Body¶
{
"servers": [
{
"id": "616fb98f-46ca-475e-917e-2563e5a8cd19",
"links": [
{
"href": "https://baremetal-server-jp1-ecl.api.ntt.com/v2/openstack/servers/616fb98f-46ca-475e-917e-2563e5a8cd19",
"rel": "self"
},
{
"href": "https://baremetal-server-jp1-ecl.api.ntt.com/openstack/servers/616fb98f-46ca-475e-917e-2563e5a8cd19",
"rel": "bookmark"
}
],
"name": "new-server-test"
},
{
"id": "616fb98f-46ca-475e-917e-2563e5a8cd18",
"links": [
{
"href": "https://baremetal-server-jp1-ecl.api.ntt.com/v2/openstack/servers/616fb98f-46ca-475e-917e-2563e5a8cd19",
"rel": "self"
},
{
"href": "https://baremetal-server-jp1-ecl.api.ntt.com/openstack/servers/616fb98f-46ca-475e-917e-2563e5a8cd19",
"rel": "bookmark"
}
],
"name": "new-server-test2"
}
]
}