Retrieve Details of all Instances in a Container

get

/instance/{container}/

Retrieves details of the instances that are in the specified container and match the specified query criteria. If you don't specify any query criteria, then details of all the instances in the container are displayed. To filter the search results, you can pass one or more of the following query parameters, by appending them to the URI in the following syntax:

?parameter1=value1&parameter2=value2&parameterN=valueN

Required Role: To complete this task, you must have the Compute_Monitor or Compute_Operations role. If this role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

Request

Supported Media Types
Path Parameters
Query Parameters
  • The availability domain the instance is in
  • Strings used to tag the instance. When you specify tags, only instances tagged with the specified value are displayed.
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

OK. See Status Codes for information about other possible HTTP status codes.
Headers
Body ()
Root Schema : Instance-list-response
Type: object
Show Source
Nested Schema : result
Type: array
Show Source
Nested Schema : Instance-response
Type: object
Show Source
Nested Schema : attributes
Type: object
Additional Properties Allowed
Show Source
A dictionary of attributes to be made available to the instance. A value with the key "userdata" will be made available in an EC2-compatible manner.
Nested Schema : boot_order
Type: array
Boot order list.
Show Source
Nested Schema : hypervisor
Type: object
Additional Properties Allowed
Show Source
A dictionary of hypervisor-specific attributes.
Nested Schema : networking
Type: object
Additional Properties Allowed
Show Source
Mapping of to network specifiers for virtual NICs to be attached to this instance.
Nested Schema : placement_requirements
Type: array
A list of strings specifying arbitrary tags on nodes to be matched on placement.
Show Source
Nested Schema : relationships
Type: array
A list of relationship specifications to be satisfied on this instance's placement
Show Source
Nested Schema : resolvers
Type: array
Resolvers to use instead of the default resolvers.
Show Source
Nested Schema : sshkeys
Type: array
SSH keys that will be exposed to the instance.
Show Source
Nested Schema : storage_attachments
Type: array
List of dictionaries containing storage attachment Information.
Show Source
Nested Schema : tags
Type: array
Comma-separated list of strings used to tag the instance.
Show Source
Nested Schema : additionalProperties
Type: object
Nested Schema : additionalProperties
Type: object
Nested Schema : additionalProperties
Type: object
Nested Schema : items
Type: object
Additional Properties Allowed
Show Source
Nested Schema : additionalProperties
Type: object
Back to Top

Examples

cURL Command

The following example shows how to retrieve details about all the instances in the /Compute-acme/jack.jones@example.com/ container by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -X GET 
     -H "Cookie: $COMPUTE_COOKIE"
     -H "Accept: application/oracle-compute-v3+json"
     https://api-z999.compute.us0.oraclecloud.com/instance/Compute-acme/jack.jones@example.com/
  • COMPUTE_COOKIE is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authentication.

  • api-z999.compute.us0.oraclecloud.com is an example REST endpoint URL. Change this value to the REST endpoint URL of your Compute Classic site. For information about finding out REST endpoint URL for your site, see Send Requests.

Example of Response Body

The following example shows the response body in JSON format for an instance.

The response is similar to the output of GET /instance/{name} (Retrieve Details of an Instance), but for all the instances in the container.

Some lines may be truncated with ellipses (...) for readability.

{
 "list": [
  {
   "domain": "acme...",
   "placement_requirements": [
    "/system/compute/placement/default",
    "/system/compute/allow_instances"
   ],
   "ip": "10...",
   "site": "",
   "shape": "oc5",
   "imagelist": "/oracle/public/oel_6.4_60GB",
   "attributes": {
    "network": {
     "nimbula_vcable-eth0": {
      "vethernet_id": "0",
      "vethernet": "/oracle/public/default",
      "address": [
       "c6:b0:09:f4:bc:c0",
       "0.0.0.0"
      ],
      "model": "",
      "vethernet_type": "vlan",
      "id": "/Compute-acme/jack.jones@example.com/016e75e7-e911-42d1-bfe1-6a7f1b3f7908",
      "dhcp_options": []
     }
    },
    "dns": {
     "domain": "acme...",
     "hostname": "d06886.compute-acme...",
     "nimbula_vcable-eth0": "d06886.acme..."
    },
    "sshkeys": [
     "ssh-rsa AAAAB3NzaC1yc2EAAA..."
    ]
   },
   "networking": {
    "eth0": {
     "model": "",
     "dns": [
      "d06886.acme..."
     ],
     "seclists": [
      "/Compute-acme/default/default",
      "/Compute-acme/jack.jones@example.com/prod-ng"
     ],
     "vethernet": "/oracle/public/default",
     "nat": "ipreservation:/Compute-acme/jack.jones@example.com/prod-vm1"
    }
   },
   "hostname": "d06886.acme...",
   "quota_reservation": "/Compute-acme/ffc8e6d4-8f93-41f3-a062-bdbb042c3191",
   "disk_attach": "",
   "label": "Production instance 1",
   "priority": "/oracle/public/default",
   "state": "running",
   "vnc": "10...",
   "storage_attachments": [
    {
     "index": 1,
     "storage_volume_name": "/Compute-acme/jack.jones@example.com/prod-vol1",
     "name": "/Compute-acme/admin/dev1/f653a677-b566-4f92-8e93-71d47b364119/f1a67244-9abc-45d5-af69-8..."
    }
   ],
   "start_time": "2014-06-24T17:51:35Z",
   "quota": "/acme",
   "fingerprint": "19:c4:3f:2d:dc:76:b1:06:e8:88:bd:7f:a3:3b:3c:93",
   "error_reason": "",
   "sshkeys": [
    "/Compute-acme/jack.jones@example.com/acme-prod-admin"
   ],
   "tags": [
    "prod2"
   ],
   "resolvers": null,
   "account": "/Compute-acme/default",
   "name": "/Compute-acme/jack.jones@example.com/dev1/f653a677-b566-4f92-8e93-71d47b364119",
   "vcable_id": "/Compute-acme/jack.jones@example.com/016e75e7-e911-42d1-bfe1-6a7f1b3f7908",
   "uri": "http://10....",
   "reverse_dns": true,
   "entry": 1,
   "boot_order": []
  }
 ]
}
Back to Top