ORDSwatch

Hosted edition

Metrics and REST API docs

ORDS publishes runtime metrics — connection pools, requests, response times — through its Instance API. ORDSwatch can switch it on for you and read it through the agent, so the API never has to be exposed beyond the ORDS server. Available on the Professional and Enterprise plans, in both the hosted and the self-hosted edition.

Enabling metrics on an instance

  1. Make sure the instance's agent is connected (ORDSwatch agent 2.0 or later).
  2. On the instance, click Enable metrics. The agent runs the instance's own ords command to turn on the Instance API and create a dedicated API user. The user's password stays in the agent's configuration on the ORDS server; it is never sent to ORDSwatch.
  3. The instance shows Metrics: restart ORDS until ORDS is restarted — use Restart in ORDSwatch or your usual procedure.

Already have an Instance API user? Add it to the instance in the agent's instances.json as instanceApiUser and instanceApiPass, and restart the agent.

Metrics

Once enabled, the instance's Metrics view shows the live values the Instance API reports for each database connection pool and for ORDS as a whole. Each value is coloured by the thresholds shown in its ? help, and every pool shows its type (for example lo · Local, a pool configured in the instance's own configuration folder) and how long it has been up.

Instance insights

Above the pools, Instance insights shows what the agent reads locally on the ORDS server (ORDSwatch agent 2.2 or later). It is refreshed every 30 seconds:

  • Process: ORDS uptime, memory (with the configured maximum heap), CPU, threads and open files, plus the server's free memory, swap and load. Linux servers.
  • Requests: requests per minute over the last hour, server (5xx) and client (4xx) errors, the error rate, and the paths that fail most often. Read from ORDS's access log. Turn it on by setting standalone.access.log to a folder and restarting ORDS.
  • Configuration advice: the instance's settings checked against ORDS's own production profile and common pitfalls. Examples: debug output left on, pools so large that a restart can exhaust the database's connection limit, a malformed JVM option, or certificate checks turned off.

The agent also reports an instance as degraded when the Instance API says one of its connection pools is invalid, so your alerts fire for it.

REST API documentation (Web Services)

ORDS generates an OpenAPI 3.0 description of every REST module it serves. The Web Services tab shows them as interactive documentation (Swagger UI): every endpoint, method, parameter and response, as ORDS defines it.

  1. Open Web Services and choose the instance.
  2. An admin adds the schema aliases to document — the alias is the part of the REST URL right after the ORDS base path: in https://host/ords/sales/orders/latest/, sales is the schema alias and orders a module in it. ORDS has no public list of its REST schemas, so they are listed here once.
  3. Each schema shows its modules. Click a module to read its documentation, or download it as JSON or YAML for Postman, API gateways or code generators.

The documents are read by the agent from the local ORDS, so ORDS doesn't have to be reachable from ORDSwatch. Web Services is documentation only: ORDSwatch never sends requests to your APIs. Note that ORDS publishes these descriptions even for modules protected by a privilege — the data stays protected, but the API shape is visible to anyone who can reach …/open-api-catalog/. To hide it, protect the catalog itself, for example with a procedure.rest.preHook function (see below).

Requires ORDSwatch agent 2.1 or later and the Professional or Enterprise plan.

Protected schemas

If ORDS refuses to show a schema's documentation, the schema shows "This schema is protected (HTTP 401)". When ORDS checks requests with a custom PL/SQL function (procedure.rest.preHook in settings.xml), the message names that function. An admin clicks Authentication on the schema and chooses how the agent signs in:

Method Use it when Enter
Custom headers A custom pre-hook checks a header — an API key, a fixed token Up to 10 header names and values, e.g. X-API-Key
Basic ORDS Basic authentication, or a pre-hook that checks Basic credentials itself Username and password
OAuth client credentials An ORDS OAuth client (OAUTH.create_client, grant type client_credentials) holds the privilege that protects the modules, or ORDS trusts an external identity provider (JWT profile) Client ID, client secret and, for an external provider, its token URL — left blank, the agent uses this ORDS's own …/<alias>/oauth/token

The credentials are stored on the agent, in its instances.json (readable only by the agent's user), the same way as the Instance API password. ORDSwatch never stores or shows them: when you edit them later, secret fields are blank and a blank field keeps the saved value. They are used only to read the documentation. The agent gets a new OAuth token when the old one expires.

Not supported yet: pre-hooks that need a signature computed for each request, one-time codes, a browser login session, or that allow only certain client IP addresses (the agent connects from the ORDS server itself). For those, have your function also accept a dedicated key for ORDSwatch and use Custom headers.

Requires ORDSwatch agent 2.11 or later.