The following example shows how to view detailed information about a Database Cloud Service instance by submitting a GET request on the REST endpoint using cURL.
The following example shows how to restart a Database Cloud Service instance by submitting a POST request on the REST endpoint using cURL.
In this example, the identity domain is “idcs-bac676f0a2c643a281868616b45986da”, and the Oracle Cloud username and password are “clouduser” and “Pa$$word“. The name of the service instance being restarted is Skant.
cURL Command
[oracle@edvmr1p0 Solution_files]$ curl -X POST -i -H "X-ID-TENANT-NAME: idcs-bac676f0a2c643a281868616b45986da" -H "Content-Type:application/json" --data '{ "lifecycleState" : "Restart" }' -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.92:897599876: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/control/job/23207562 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: 005PwXx861Q6uHFpR0H7id0004NZ0003Cn X-ORACLE-DMS-ECID: 005PwXx861Q6uHFpR0H7id0004NZ0003Cn Service-URI: https://dbaas.oraclecloud.com:443/paas/service/dbcs/api/v1.1/instances/idcs-bac676f0a2c643a281868616b45986da/Skant X-Frame-Options: DENY Content-Type: text/plain Vary: user-agent Date: Mon, 19 Mar 2018 18:54:34 GMT Connection: close
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:
Telegram Channel : https://t.me/helporacle
Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/
Joel Perez’s LinkedIn: Joel Perez’s Profile
LinkedIn Group: Oracle Cloud DBAAS
Facebook Page: OracleHelp