Use SODA for REST with Autonomous Database

Autonomous Transaction Processing supports Simple Oracle Document Access (SODA) for REST.

SODA for REST is a predeployed REST service that can be used to store JSON documents in an Autonomous Transaction Processing database. SODA enables flexible, NoSQL-style application development without having to use SQL. With SODA, JSON documents are stored in named collections and managed using simple CRUD operations (create, read, update and delete). And while SQL isn't required, JSON stored in SODA collections is still fully accessible from SQL when needed. For example, an operational application may be fully built using SODA (without SQL) but then the data may be later analyzed using SQL from outside of the application. Autonomous Database SODA gives application developers the best of the NoSQL and SQL worlds - fast, flexible, and scalable application development without losing the ability to leverage SQL for analytics and reporting.

SODA for REST is deployed in ORDS under the following URL pattern, where schema corresponds to a REST-enabled database schema.


The following examples use the cURL command line tool ( to submit REST requests to the Autonomous Transaction Processing database. However, other 3rd party REST clients and libraries should work as well. The examples use database schema ADMIN, which is REST-enabled.

This command creates a new collection named "fruit" in the ADMIN schema:

> curl -X PUT -u 'ADMIN:password' \

These commands insert three JSON documents into the fruit collection:

> curl -X POST -u 'ADMIN:password' \
 -H "Content-Type: application/json" --data '{"name":"orange", "count":42}' \

> curl -X POST -u 'ADMIN:password' \
 -H "Content-Type: application/json" --data '{"name":"pear", "count":5}' \

> curl -X POST -u 'ADMIN:password' \
 -H "Content-Type: application/json" \
 --data '{"name":"apple", "count":12, "color":"red"}' \


This example retrieves a stored JSON document from the collection:

> curl -X POST -u 'ADMIN:password' \
 -H "Content-Type: application/json" --data '{"name":"orange"}' \

  "items": [
      "value":{"name":"orange", "count":42}

This SQL query accesses the fruit collection:

FROM fruit f;

The query returns thse three rows:

name      count     color
--------- --------- -------
orange    42        null
pear      5         null
apple     12        red

These examples show a small subset of the SODA and SQL/JSON features. See: