Developer platforms · active

Oracle Cloud Infrastructure API

REST APIs for provisioning and managing Oracle Cloud Infrastructure resources including compute instances, networking, and storage.

Oracle Cloud Infrastructure API

Oracle Cloud’s REST API for infrastructure automation. Notable for a generous Always Free tier including ARM-based Ampere A1 compute.

Authentication

API requests are signed with an RSA private key. Register the public key in the OCI Console (Identity > Users > API Keys) and note the fingerprint.

# Key fingerprint format
fingerprint: "64:e8:46:46:b2:76:70:4b:0e:0d:a2:b4:25:ff:ce:14"

The OCI CLI handles signing automatically once configured.

Launching an A1 instance

oci compute instance launch \
  --availability-domain "ncBE:US-SANJOSE-1-AD-1" \
  --compartment-id "ocid1.tenancy.oc1..aaaa..." \
  --shape "VM.Standard.A1.Flex" \
  --shape-config '{"ocpus":2,"memoryInGBs":12}' \
  --image-id "ocid1.image.oc1.us-sanjose-1.aaaa..." \
  --subnet-id "ocid1.subnet.oc1.us-sanjose-1.aaaa..." \
  --assign-public-ip true \
  --display-name "a1-free-tier" \
  --ssh-authorized-keys-file ~/.ssh/id_ed25519.pub

Key endpoints

Endpoint Description
POST /20160918/instances Launch compute instance
GET /20160918/instances List instances
GET /20160918/instances/{id} Instance details
DELETE /20160918/instances/{id} Terminate instance
POST /20160918/instances/{id}/actions Instance actions (start/stop)
GET /20160918/shapes List available shapes
GET /20160918/images List images
GET /20160918/vnicAttachments List VNIC attachments

Real-world notes

Availability domains. Use the availability domain name returned for your tenancy and region by oci iam availability-domain list.

Always Free A1. The current allowance for Always Free tenancies is 2 OCPUs and 12 GB memory total. A1 capacity in the home region can be temporarily unavailable. Handle throttling with exponential backoff.

API endpoints. OCI uses service-specific regional endpoints; iaas is one example, not a universal base URL.

Pagination

List operations return an opc-next-page header. Pass it as the page query parameter to fetch the next page.

Integration surface

Versioning
Service-specific API versions in endpoint paths
Resource groups
Compute, Networking, Block Storage, Identity, Database
Pagination
opc-next-page response header for list operations
Errors
OCI error codes with opc-request-id for tracking
Webhooks
Events service with Notifications integration
Official SDKs
Python, Java, Go, TypeScript, Ruby, .NET