Skip to main content
Version: v5

Operations API

The Operations API provides a comprehensive set of capabilities for configuring, deploying, administering, and controlling Harper. It is the primary programmatic interface for all administrative and operational tasks that are not handled through the REST interface.

Endpoint

All Operations API requests are sent as HTTP POST requests to the Operations API endpoint. By default, this listens on port 9925 on the root path:

POST http://<host>:9925/

See Configuration Overview for how to change the port and other network settings (operationsApi.network.port, operationsApi.network.securePort).

Request Format

Each request body must be a JSON object with an operation field that identifies the operation to perform:

POST https://my-harper-server:9925/
Authorization: Basic YourBase64EncodedUser:Pass
Content-Type: application/json

{
"operation": "create_table",
"table": "my-table"
}

Authentication

Operations API requests must be authenticated. Harper supports two authentication methods:

  • Basic Auth: Base64-encoded username:password in the Authorization header. See Basic Authentication.
  • JWT: A Bearer token in the Authorization header, obtained via create_authentication_tokens. See JWT Authentication.

The create_authentication_tokens operation itself does not require prior authentication — it accepts a username and password and returns an operation token and refresh token.

Example with curl

curl --location --request POST 'https://my-harper-server:9925/' \
--header 'Authorization: Basic YourBase64EncodedUser:Pass' \
--header 'Content-Type: application/json' \
--data-raw '{
"operation": "create_table",
"table": "my-table"
}'

Authorization

Most operations are restricted to super_user roles. This is noted in the documentation for each operation. Some operations (such as user_info, get_job, and create_authentication_tokens) are available to all authenticated users.

Operations Reference

Operations are grouped by topic. See Operations for the complete reference list.

Topic categories:

CategoryDescriptionDetailed Docs
Databases & TablesCreate and manage databases, tables, and attributesDatabase Overview
NoSQL OperationsInsert, update, upsert, delete, and query recordsREST Querying Reference
Bulk OperationsCSV/S3 import and export, batch deleteDatabase Jobs
SQL OperationsExecute SQL statements (use for investigation, not production)
Users & RolesManage users and role-based access controlUsers & Roles Operations
Token AuthenticationCreate and refresh JWT tokensJWT Authentication
ComponentsDeploy and manage Harper componentsComponents Overview
Replication & ClusteringConfigure cluster topology and replicationReplication & Clustering
ConfigurationRead and update Harper configuration
SystemRestart, system information, status management
JobsQuery background job statusDatabase Jobs
LogsRead standard, transaction, and audit logsLogging Operations
Certificate ManagementManage TLS certificatesCertificate Management
AnalyticsQuery analytics metricsAnalytics Operations
Registration & LicensingLicense management

Past Release API Documentation

For API documentation prior to v4.0, see olddocs.harperdb.io.