Creating an Autonomous Database (ADB) via OCI’s REST API involves a specific endpoint. The correct command is:
POST /20160918/autonomousDatabases (D):This is the official REST API endpoint to create an ADB instance. The POST request to /20160918/autonomousDatabases (versioned at API 20160918) submits a JSON payload defining the database (e.g., compartment, name, workload type). Example:
curl -X POST "https://database.us-ashburn-1.oraclecloud.com/20160918/autonomousDatabases" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"compartmentId": "ocid1.compartment.oc1..example",
"dbName": "MYADB",
"cpuCoreCount": 1,
"dataStorageSizeInTBs": 1,
"dbWorkload": "OLTP",
"adminPassword": "Secure#123"
}'
This creates an ATP instance named MYADB with 1 OCPU and 1 TB storage. The response includes an OCID (e.g., ocid1.autonomousdatabase.oc1..example), and provisioning starts asynchronously, visible in the OCI console as “PROVISIONING.” The endpoint’s plural form (autonomousDatabases) reflects the resource collection, consistent with OCI API conventions.
The incorrect options are:
POST /20160918/createADB (A):No such endpoint exists. OCI APIs use resource-based paths (e.g., /autonomousDatabases), not action-specific ones like createADB.
POST /20160918/createautonomousDatabases (B):Incorrect syntax—APIs don’t prepend “create” to resource paths, and “autonomousDatabases” is lowercase here, matching the real endpoint.
POST /20160918/createDatabases (C):Too generic; it doesn’t specify “autonomous” databases, and no such endpoint exists for ADB creation.
This REST command is a programmatic alternative to console-based provisioning, ideal for automation.
[Reference:Oracle Cloud Infrastructure API Documentation -CreateAutonomousDatabase, ]
Submit