3.44.1. List servers

 
MethodURIDescription
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)

 3.44.1.1. Request

This table shows the URI parameters for the list servers request:

NameTypeDescription

{tenant_id}

​String

The tenant ID in a multi-tenancy cloud.

This table shows the query parameters for the list servers request:

NameTypeDescription

changes-since

​Date​Time

(Optional)

A time/date stamp for when the server last changed status.

image

​Any​U​RI

(Optional)

Name of the image in URL format.

flavor

​Any​U​RI

(Optional)

Name of the flavor in URL format.

name

​String

(Optional)

Name of the server as a string.

marker

​U​U​ID

(Optional)

UUID of the server at which you want to set a marker.

limit

​Int

(Optional)

Integer value for the limit of values to return.

status

​Server​Status

(Optional)

Value of the status of the server so that you can filter on "ACTIVE" for example.

host

​String

(Optional)

Name of the host as a string.

 3.44.1.2. Response

 

Example 3.374. 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 3.375. 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>

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page


loading table of contents...