Method | URI | Description |
---|---|---|
GET | /v2/{tenant_id}/servers{?changes-since,image,flavor,name,marker,limit,status,host} | Lists IDs, names, and links for all servers. |
Normal response codes: 200, 203
Error response codes: computeFault (400, 500, …), serviceUnavailable (503), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413)
This table shows the URI parameters for the list servers request:
Name | Type | Description |
---|---|---|
| UUID | The tenant ID in a multi-tenancy cloud. |
This table shows the query parameters for the list servers request:
Name | Type | Description |
---|---|---|
| DateTime (Optional) | A time/date stamp for when the server last changed status. |
| AnyURI (Optional) | Name of the image in URL format. |
| AnyURI (Optional) | Name of the flavor in URL format. |
| String (Optional) | Name of the server as a string. |
| UUID (Optional) | UUID of the server at which you want to set a marker. |
| Int (Optional) | Integer value for the limit of values to return. |
| ServerStatus (Optional) | Value of the status of the server so that you can filter on "ACTIVE" for example. |
| String (Optional) | Name of the host as a string. |
Example 2.1. List servers: JSON response
{ "servers": [ { "id": "616fb98f-46ca-475e-917e-2563e5a8cd19", "links": [ { "href": "http://openstack.example.com/v2/openstack/servers/616fb98f-46ca-475e-917e-2563e5a8cd19", "rel": "self" }, { "href": "http://openstack.example.com/openstack/servers/616fb98f-46ca-475e-917e-2563e5a8cd19", "rel": "bookmark" } ], "name": "new-server-test" } ] }
Example 2.2. List servers: XML response
<?xml version='1.0' encoding='UTF-8'?> <servers xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1"> <server name="new-server-test" id="b626796d-d585-4874-b178-78c65289bba4"> <atom:link href="http://openstack.example.com/v2/openstack/servers/b626796d-d585-4874-b178-78c65289bba4" rel="self"/> <atom:link href="http://openstack.example.com/openstack/servers/b626796d-d585-4874-b178-78c65289bba4" rel="bookmark"/> </server> </servers>