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.

To know basic about RESTAPI

The following example shows how to create a rule 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 allow-1525-connection rule is being created for the service instance Skant.

  • ruleName : allow-1525-connection
  • description : Open port for developers during deployment time
  • source : PUBLIC-INTERNET
  • destination : DB_1
  • ports : 1525
  • status : disabled

cURL Command

[oracle@edvmr1p0 Solution_files]$ curl -X POST -i -H "X-ID-TENANT-NAME: idcs-bac676f0a2c643a281868616b45986da" -H "Content-Type:application/json" --data '{"ruleName":"allow-1525-connection","description":"Open port for developers during deployment time","source":"PUBLIC-INTERNET","destination":"DB_1","ports":"1525","status":"disabled"}' -u "clouduser:Pa$$word" ""

HTTP Status Code and Response Headers

HTTP/1.0 200 Connection established

HTTP/1.1 202 Accepted
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: 005PwZ79FOw6uHFpR05Eid0007FJ0003xM
X-ORACLE-DMS-ECID: 005PwZ79FOw6uHFpR05Eid0007FJ0003xM
Access-Control-Allow-Origin: *
X-Frame-Options: DENY
Content-Type: text/plain
Vary: user-agent
Date: Mon, 19 Mar 2018 19:15:19 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 :

Skant Gupta’s LinkedIn:

Joel Perez’s LinkedIn: Joel Perez’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.