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
- application/xml
- application/json
Path Parameters
-
uploadRequestId: integer(int64)
ID of the upload request which needs to be deleted.
Provide data center names from which machine image need to be deleted.
Response
Supported Media Types
- application/json;qs=1
- application/xml;qs=.5
200 Response
Successful Operation
400 Response
Invalid Parameter Value
401 Response
Not Authorized
404 Response
Entity Not Found
500 Response
System Error
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