Platform database API

Use the database APIs to query your Genorbex data and inspect available resources. Platform retains the /api/orbexdb namespace for these endpoints.

Authentication and database access

For programmatic connections, use the native query endpoint with a Platform API key or a valid session token in the Authorization bearer header. Obtain your database ID and connection details from Platform. The account must have access to the database and the relevant service.

The workspace query, database-listing, and query-history endpoints use your authenticated Genorbex session. Keep tokens in backend configuration or secret settings.

Set up your Platform database

Execute a native SQL query

POST /api/orbexdb/native-query accepts databaseId and query. Optional fields include schemaName (default PUBLIC), limit (1โ€“100,000 rows, default 1,000), timeout (1โ€“300 seconds, default 60), useCache, and warehouseId.

curl 'https://www.genorbex.com/api/orbexdb/native-query' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  --data '{
    "databaseId": "YOUR_DATABASE_ID",
    "schemaName": "PUBLIC",
    "query": "SELECT 1 AS connection_test",
    "limit": 10,
    "timeout": 60
  }'

A successful response includes success, data, columns, rowCount, executionTime, and metadata describing the database, schema, and cache status.

Execute a workspace SQL query

POST /api/orbexdb/query uses a session token and the sql field. You can supply databaseId, warehouseId, and schemaName. Its optional limit is 1โ€“10,000 rows and timeout is 1,000โ€“300,000 milliseconds. Query execution can start or resume compute and consume your accountโ€™s usage allowance.

POST /api/orbexdb/query
Authorization: Bearer YOUR_SESSION_TOKEN
Content-Type: application/json

{
  "sql": "SELECT 1 AS connection_test",
  "databaseId": "YOUR_DATABASE_ID",
  "schemaName": "PUBLIC",
  "limit": 10,
  "timeout": 60000
}

The response includes success, queryId, and a result object with rows, columns, execution details, and usage information.

List databases and query history

GET /api/orbexdb/databases
Returns accessible databases and pagination. Supports page, limit, search, shared, and scope filters. The response contains databases and pagination.
GET /api/orbexdb/query
Returns your query history and pagination. Supports page, limit, warehouseId, databaseId, and status filters. The response contains queries and pagination.

Response errors

  • 400: Check required fields, SQL, and parameter limits in the request.
  • 401: Supply a valid, active API key or session token for the endpoint you are using.
  • 403: Review service access, account permissions, and applicable resource policies.
  • 404: Confirm the database exists and is accessible to your account.
  • 500: Inspect the returned error and query or connection details before retrying.

See the Platform guide for database workflows and the security documentation for access controls.

Need help with your setup? Visit the Help Center or contact Genorbex.