Delete a Backup (Asynchronous)
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/jaas/instances/{serviceId}/deletedbackups
Request
- application/json
-
identityDomainId: string
Identity domain ID for the Oracle Java Cloud Service account.
-
serviceId: string
Name of the Oracle Java Cloud Service instance.
-
Authorization: string
Base64 encoded user name and password separated by a colon or OAuth access token obtained from Oracle Identity Cloud Service. See Authenticate.
-
X-ID-TENANT-NAME: string
Identity domain ID for the Oracle Java Cloud Service account.
object
-
backupId(optional):
string
ID of the backup that you want to delete. To retrieve the backup ID, see View All Backups.
-
backupIdList(optional):
array backupIdList
List of backup IDs that you want to delete. To retrieve the backup IDs, see View All Backups. If the list contains the ID for a full backup, all of its related (non-deleted) incremental backups must be included the list. Use the
?includeLinkedDetails
query parameter to retrieve related backups for a backup as described in View a Backup. -
force(optional):
boolean
Flag that specifies whether to delete an automatic backup that was created prior to applying a patch.
Default value is
false
, which means the operation will not delete a specified backup if it is associated with a previously applied patch. The following error message is returned:JAAS-BR-5176: This backup was taken prior to applying a patch to this instance. If you delete this backup, you will not be able to roll back this patch at a later time.
You can set the value to
true
to force the deletion, however, you will not be able to roll back the patch if the need arises.
array
?includeLinkedDetails
query parameter to retrieve related backups for a backup as described in View a Backup.Response
- application/json
202 Response
The Location
header returns a URI that can be used to view the job status, as described in View the Status of an Operation by Job Id.
object
-
job_id(optional):
string
Job ID for the delete backup (asynchronous) operation.
-
operationName(optional):
string
Name of operation performed. Set to:
delete-backup
ordelete-backups
when deleting a list. -
target_uri(optional):
string
URI of the delete backup (asynchronous) resource.
404 Response
Examples
The following example shows how to delete a backup asynchronously for an Oracle Java Cloud Service instance by submitting a POST request on the REST resource using cURL.
Note: The command in this example uses the URL structure https://rest_server_url/resource-path
, where rest_server_url
is the REST server to contact for your identity domain (or Cloud Account). See Send Requests.
cURL Command
curl -i -X POST -u username:password --data @delete.json -H "Content-Type:application/json" -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance/deletedbackups
Example of Request Body
The following shows an example of the request document in JSON format, using a single backup ID in backupId
.
{
"backupId": "1449597929855"
}
The following shows an example of the request document in JSON format, using an array of backup IDs in backupIdList
.
{
"backupIdList":[
"1449418500036",
"1449504900028",
"1449591300044"
]
}
Example of Response Header
The following shows an example of the response header when deleting a single backup ID. The Location
header returns the URI that can be used to view the job status. See View the Status of an Operation by Job Id.
HTTP/1.1 202 Accepted
Date: Sat, 22 Apr 2017 20:31:24 GMT
Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/1881037
Content-Type: application/json
The following shows an example of the response header when deleting a list of backup IDs:
HTTP/1.1 202 Accepted
Date: Sat, 22 Apr 2017 20:21:08 GMT
Transfer-Encoding: chunked
Content-Type: application/json
Example of Response Body
The following example shows the response returned in JSON format, for a request using backupId
.
{
"operationName":"delete-backup",
"target_uri":"https:\/\/rest_server_url\/paas\/service\/jcs\/api\/v1.1\/instances\/ExampleIdentityDomain\/ExampleInstance\/deletedbackups\/1881037",
"job_id":"1881037"
}
The following example shows the response returned in JSON format, for a request using backupIdList
.
{
"operationName":"delete-backups",
"target_uri":"https:\/\/rest_server_url\/paas\/service\/jcs\/api\/v1.1\/instances\/ExampleIdentityDomain\/ExampleInstance\/deletedbackups\/1882098",
"job_id":"1882098"
}