The following example shows how to delete a Database Cloud Service instance by submitting a DELETE request on the REST endpoint using cURL.

To know basic about RESTAPI

In this example, the identity domain is “idcs-bac676f0a2c643a281868616b45986da” and the Oracle Cloud user name and password are “clouduser” and “Pa$$word“. The service instance being deleted is named Skant

cURL Command

[oracle@edvmr1p0 ~]$ curl -X DELETE -i -H "X-ID-TENANT-NAME: idcs-bac676f0a2c643a281868616b45986da" -u "clouduser:Pa$$word" "https://dbaas.oraclecloud.com/paas/service/dbcs/api/v1.1/instances/idcs-bac676f0a2c643a281868616b45986da/Skant"

HTTP Status Code and Response Headers

HTTP/1.0 200 Connection established
X-RBT-SCAR: 10.135.5.84:897048393:1000

HTTP/1.1 202 Accepted
Server: Oracle-Application-Server-11g
Strict-Transport-Security: max-age=31536000;includeSubDomains
Location: https://dbaas.oraclecloud.com:443/paas/service/dbcs/api/v1.1/instances/idcs-bac676f0a2c643a281868616b45986da/status/delete/job/23067102
Content-Language: en
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Content-Type, api_key, Authorization, X-ID-TENANT-NAME, X-USER-IDENTITY-DOMAIN-NAME
Retry-After: 30
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
X-ORACLE-DMS-ECID: 005PwTXXBEv6uHFpR0H7id0004NZ00041M
X-ORACLE-DMS-ECID: 005PwTXXBEv6uHFpR0H7id0004NZ00041M
Service-URI: https://dbaas.oraclecloud.com:443/paas/service/dbcs/api/v1.1/instances/idcs-bac676f0a2c643a281868616b45986da/Skant
X-Frame-Options: DENY
Content-Type: application/json
Vary: user-agent
Date: Mon, 19 Mar 2018 17:35:16 GMT
Connection: close

Response Body

{
"service_name":"Student015-skant",
"service_uuid":"7DA9A71F34264F23AD2EB644C1E1FC32",
"version":"12.1.0.2",
"status":"Terminating",
"description":"Student015-skant",
"identity_domain":"idcs-bac676f0a2c643a281868616b45986da",
"creation_time":"2018-03-19T14:31:42.176+0000",
"last_modified_time":"2018-03-19T17:35:16.143+0000",
"created_by":"ora015",
"sm_plugin_version":"18.1.6-551",
"tags":"{\"items\":[],\"totalResults\":0,\"hasMore\":false}",
"tools_version":"18.1.6-551",
"backup_supported_version":"16.2.3",
"Service-URI: https://dbaas.oraclecloud.com:443/paas/service/dbcs/api/v1.1/instances/idcs-bac676f0a2c643a281868616b45986da/Student015-skant"
}

Stay tuned for More articles on Oracle Cloud and RESTapi

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

Anuradha’s LinkedIn: Anuradha’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.