7. REST API

The RED framework provides a REST interface for all APIs that can be used by the Application Manager or the Security Manager. External schedulers and integration tools can therefore call framework APIs and read monitoring data without a direct JDBC or ODBC connection to the database.

The REST API comprises:

  • the framework APIs (the API_<SCHEMA> scripts),

  • dedicated monitoring endpoints, including endpoints for native Exasol monitoring,

  • a generic SQL endpoint (POST /sql/, SQL over REST).

The documentation of all endpoints (Swagger/OpenAPI) is available at https://<red-server>:<gu_port>/docs, where gu_port is the REST port configured for the environment instance.

7.1. Authentication

Only users of type HU and GU may use the REST API. Each REST user is identified by an application key, which is listed in SCURTY.REP_REST_USERS. The key is passed in the HTTP header app_key of every request.

The REST server connects to the database with its own technical user and impersonates the database user that belongs to the application key. Every request is therefore executed with exactly the privileges of this user, including row and column level security. Optionally, the application key is passed on within a short-lived signed token (JWT) instead of in plain text.

The REST API is only available via HTTPS.

Important

The SQL endpoint executes any SQL statement with the privileges of the user mapped to the application key. Grant REST users only the roles they need and protect application keys like passwords.

Important

API calls via REST cannot be enclosed in transaction brackets. Every single API call is committed immediately.