The following example shows how to view information about all Database Cloud Service instances by submitting a GET 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 response shows two running services, with name of Skant and test2.

cURL Command

[oracle@edvmr1p0 ~]$ curl -X GET -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"

HTTP Status Code and Response Headers

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

HTTP/1.1 200 OK
Server: Oracle-Application-Server-11g
Strict-Transport-Security: max-age=31536000;includeSubDomains
Content-Language: en
Access-Control-Allow-Headers: Content-Type, api_key, Authorization, X-ID-TENANT-NAME, X-USER-IDENTITY-DOMAIN-NAME
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
X-ORACLE-DMS-ECID: 005PwT9IKp76uHFpR0H7id0004NZ0003yV
X-ORACLE-DMS-ECID: 005PwT9IKp76uHFpR0H7id0004NZ0003yV
Access-Control-Allow-Origin: *
X-Frame-Options: DENY
Content-Type: application/json
Vary: user-agent
Date: Mon, 19 Mar 2018 17:28:29 GMT
Content-Length: 8806
Connection: keep-alive

Response Body

{
"uri": "https://dbaas.oraclecloud.com:443/paas/service/dbcs/api/v1.1/instances/idcs-bac676f0a2c643a281868616b45986da",
"service_type": "dbaas",
"implementation_version": "1.0",
"services": [
{
"service_name": "Skant",
"service_uuid": "7DA9A71F34264F23AD2EB644C1E1FC32",
"version": "12.1.0.2",
"status": "Running",
"description": "Skant",
"identity_domain": "idcs-bac676f0a2c643a281868616b45986da",
"creation_time": "2018-03-19T14:31:42.176+0000",
"last_modified_time": "2018-03-19T15:01:24.291+0000",
"created_by": "clouduser",
"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/Skant"
},
{
"service_name": "test2",
"service_uuid": "7D58B2E6732D4CEEA4E1E3AEAFBFF922",
"version": "12.1.0.2",
"status": "Running",
"description": "test2",
"identity_domain": "idcs-bac676f0a2c643a281868616b45986da",
"creation_time": "2018-03-19T01:34:59.592+0000",
"last_modified_time": "2018-03-19T02:06:19.200+0000",
"created_by": "ora020",
"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/test2"
}
],
"subscriptions": []
}
[oracle@edvmr1p0 ~]$

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.