Delete Machine Image

delete

/appstore/publisher/v1/machineimages/{uploadRequestId}

Deletes a machine image. This call has two variants. If data center names are passed in body while making the delete request, machine image will be deleted from specified data centers only. If body is not passed, machine image will be deleted from all the date centers.

Request

Supported Media Types
Path Parameters
Body ()
Provide data center names from which machine image need to be deleted.
Root Schema : DataCenterName
Type: object
Show Source
Nested Schema : datacenters
Type: array
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful Operation
Body ()
Root Schema : acknowledgement
Type: object
Show Source

400 Response

Invalid Parameter Value

401 Response

Not Authorized

404 Response

Entity Not Found

500 Response

System Error
Back to Top

Examples

1. Delete from all datacenters

The following example deletes machine image from all the data centers, by submitting a DELETE request on the REST resource using cURL.

cURL Example

curl -X DELETE -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/machineimages/7594652"

Request Header

X-Oracle-UserId: fname.lname@oracle.com 
Authorization: Bearer Access-token 

Request Body

None

HTTP Status Code:

200 OK

JSON Response:

{
  "message": "7594652 was deleted successfully from all data centers.",
  "entityId": "7594652"
}

2. Delete from specified datacenters

The following example deletes machine image from the data centers specified in body, by submitting a DELETE request on the REST resource using cURL.

cURL Example

curl -X DELETE -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/machineimages/7594652"

Request Header

X-Oracle-UserId: fname.lname@oracle.com 
Authorization: Bearer Access-token 

Request Body

{ 
  "datacenters" : ["teak", "ngcmopute","sydney"]
} 

HTTP Status Code:

200 OK

JSON Response:

{
  "message": "7594652 was deleted successfully from teak, ngcmopute, sydney.",
  "entityId": "7594652"
}
Back to Top