The provides an HTTP Query API that enables the execution of SQL statements. This page uses command-line examples usingDocumentation Index
Fetch the complete documentation index at: https://docs.ocient.com/llms.txt
Use this file to discover all available pages before exploring further.
curl.
The HTTP Query API returns data in JSON format by default. The default header value is Accept: application/json.
API Documentation
The API follows OpenAPI Specification () guidelines, which you can access in these formats from any SQL Node address{sql_node_address}:
- YAML format:
/openapi.yamlendpoint - JSON format:
/openapi.jsonendpoint
CURL
CURL
Connection Setup
Before using the API, you must establish an open port for a SQL Node. The connectivity pool defines connection settings for SQL Nodes, including their open port and address. For details, see CONNECTIVITY POOL.All the examples assume that the
openapi_port is the standard SSL port 443. If your connectivity pool openapi_port has a different port setting, you must specify it in the request URL. For example, this URL specifies using port 8443: https://sql_node_address:8443/v1/execute/.SQL
Check Port Configuration
Verify your port configuration by executing this query.SQL
SSL Certificate Setup
The HTTP Query API supports two options for handling SSL certificates. Secure Connection Using TLS You can use your own certificates for TLS-secured connections by configuring certificate files in your Ocient install. For details, see Secure Connections Using TLS. Unsecured Connection For quick testing or in non-production environments, you can bypass certificate validation by adding the-k or --insecure flag to your curl command.
Example
SQL
Authentication Methods
The Ocient HTTP Query API accepts user credentials in various formats designed for different use cases. Simple API Requests For simple queries, you can include user credentials in the request. In this example, the request includes credentials after the-u flag.
CURL
login endpoint. Replace the text in this example with the address of your SQL Node, your username, your password, and the name of your database.
CURL
CURL
sso_authentication endpoint with a callback path. Replace the text in this example with the name of your instance, the name of your database, and your callback path.
CURL
CURL
API Endpoint Documentation
The Ocient HTTP Query API supports these endpoints. For API requests, JSON data must use double quotes (") for all keys and string values. Single quotes should enclose the JSON payload, as shown in this example (see the payload section following the -d flag).
CURL

