Listing Instances

1
GET /instances

Lists instances of the user specified by X-Effective-User-ID and X-Effective-Project-ID. If these headers are omitted, lists instances of all users unless filters are used.

Request parameters:

NameInTypeDescription
filter (Optional)querystringSearch a set of fields for occurences of this substring.
fields (Optional)querystringA comma-separated list of search fields, which are name, uuid, and state. An admin can also search by the user_id and project_id fields.
limit (Optional)querystringThe maximum number of elements to return.
marker (Optional)querystringThe UUID of the last item on the previous page (for pagination).

Request example:

1
2
3
4
# curl -s -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
-H 'X-Effective-User-ID: c3862f44c4bc48358db62ae22d684f33' \
-H 'X-Effective-Project-ID: 04e0d744d0f544c69ff7c17db5c8b4b9' \
https://<controller_hostname>/api/v1/instances?filter=242fae68&fields=uuid

Response example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[
  {
    "backup_limit": "3",
    "backup_mode": "always_full",
    "config": {
      "cpu": "1",
      "hostname": "test2.example.com",
      "memory": "256",
      "os-name": "CentOS Linux",
      "storage": "10240",
      "vnc-encrypted": "False",
      "vnc-key": "",
      "vnc-port": "0",
      "vnc-status": "False"
    },
    "host": "ctrl0.example.com",
    "image": "centos-7",
    "ips": [
      "10.14.10.3"
    ],
    "name": "ve-242fae68-5fd0-4420-a5ec-e7852ed9ba1c",
    "project_id": "04d99efea4464248811f19a9a5b85c83",
    "sdk_name": "10001",
    "state": "running",
    "type": "ct",
    "user_id": "d5fdd55f2280407f9f263532985f11a2",
    "uuid": "242fae68-5fd0-4420-a5ec-e7852ed9ba1c"
  }
]