Retrieve Details of all Machine Images in a Container

get

/machineimage/{container}/

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
  • /Compute-identity_domain/user and /Compute-identity_domain/for user-defined machine images and /oracle/public for the Oracle-provided machine images.
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 : MachineImage-list-response
Type: object
Show Source
Nested Schema : result
Type: array
Show Source
Nested Schema : MachineImage-response
Type: object
Show Source
Nested Schema : attributes
Type: object
Additional Properties Allowed
Show Source

An optional JSON object or dictionary of arbitrary attributes to be made available to the instance. These are user-defined tags. After defining attributes, you can view them from within an instance at http://192.0.0.192/. See Retrieving User-Defined Instance Attributes in Using Oracle Cloud Infrastructure Compute Classic.

Nested Schema : checksums
Type: object
Additional Properties Allowed
Show Source
Not used
Nested Schema : hypervisor
Type: object
Additional Properties Allowed
Show Source
A dictionary of hypervisor-specific attributes.
Nested Schema : sizes
Type: object
Size values of the image file.
Nested Schema : additionalProperties
Type: object
Nested Schema : additionalProperties
Type: object
Nested Schema : additionalProperties
Type: object
Back to Top

Examples

cURL Command

The following example shows how to retrieve details about all machine images 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/machineimage/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.

  • acme and jack.jones@example.com are example values. Replace acme with the identity domain ID of your Compute Classic account, and jack.jones@example.com with your user name.

Example of Response Body

The following example shows the response body in JSON format.

{
"result": [
{
   "account": "/Compute-acme/cloud_storage", 
   "name": "/Compute-acme/jack.jones@example.com/oraclelinux-x64", 
   "sizes": {
    "uploaded": 1853334188, 
    "total": 1853334188, 
    "decompressed": 22020096000
   },
   "hypervisor": null, 
   "uri": "http://api-z999.compute.us0.oraclecloud.com/machineimage/Compute-acme/jack.jones@example.com/oraclelinux-x64", 
   "quota": null,
   "platform": "linux", 
   "no_upload": true, 
   "state": "available", 
   "signed_by": null, 
   "file": "http://api-z999.compute.us0.oraclecloud.com:443/machineimage/Compute-acme/jack.jones@example.com/oraclelinux-x64", 
   "signature": "", 
   "checksums": {}, 
   "attributes": {}, 
   "error_reason": "",
   "image_format": "raw", 
   "audited": null
},
{
  "account": "/Compute-acme/cloud_storage",
  "name": "/Compute-acme/jack.jones@example.com/OL6.6_20GB",
  "sizes": {
    "uploaded": 1545137187,
    "total": 1545137187,
    "decompressed": 21474836480
  },
  "hypervisor": null,
  "signature": "",
  "no_upload": true,
  "uri": "https://api-z999.compute.us0.oraclecloud.com/machineimage/Compute-acme/jack.jones@example.com/OL6.6_20GB",
  "quota": null,
  "platform": "linux",  
  "state": "available",
  "signed_by": null,
  "file": "https://api-z999.compute.us0.oraclecloud.com:443/machineimage/Compute-acme/jack.jones@example.com/OL6.6_20GB",
  "attributes": {},
  "checksums": {},
  "error_reason": "",
  "image_format": "raw",
  "audited": null
}
]
}
Back to Top