
How to Generate OpenAPI Documentation for ORDS Modules
Use the OpenAPI documents ORDS generates for your REST modules, add good descriptions, and view them in Swagger UI.

Use the OpenAPI documents ORDS generates for your REST modules, add good descriptions, and view them in Swagger UI.

Send SQL to ORDS over HTTP and get JSON results, with bind variables and scripts, using an OAuth client instead of a password.

Run one PL/SQL function before every ORDS REST call to log requests and refuse them during maintenance.

Let web applications on other origins call your ORDS APIs, restrict a module to the origins you trust, and test preflights.

Keep ORDS OAuth clients under control: shorter tokens, rotated secrets, revoked roles, and deleted clients.

Let other systems call protected ORDS APIs with an OAuth2 client ID, secret, and short-lived access token.

Stop anonymous access to an ORDS API by mapping a privilege with a required role to its URLs.

Publish PL/SQL functions, procedures, and packages as POST endpoints, pass parameters as JSON, and read results and OUT values.

Serve query results as CSV from ORDS, and add the header row and download file name that the CSV source type leaves out.

Serve stored files over REST with the right MIME type, show images in the browser, and send downloads with a proper file name.

Receive files over REST in an ORDS PL/SQL handler, store them as BLOBs with their MIME type and name, and avoid reading :body twice.

Put related rows and JSON documents into one ORDS response with CURSOR expressions and JSON-typed columns, and avoid the traps.

Return JSON documents of your own design from ORDS, built with SQL/JSON functions and written out with HTP in pieces.

Return 400 errors with JSON messages and add your own response headers from ORDS PL/SQL handlers.

Let one resource URL answer GET, PUT, and DELETE, update and delete rows by the path parameter, and return the right status.

Read a JSON request body through bind variables, insert the row, and return 201 Created with the new resource and its URL.

Answer GET requests for one resource with a single JSON object, and let ORDS return 404 when the row does not exist.

Read values from the URL path and query string in ORDS handlers, and declare parameter types so bad input gets a clear error.