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:passwordin theAuthorizationheader. See Basic Authentication. - JWT: A Bearer token in the
Authorizationheader, obtained viacreate_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:
| Category | Description | Detailed Docs |
|---|---|---|
| Databases & Tables | Create and manage databases, tables, and attributes | Database Overview |
| NoSQL Operations | Insert, update, upsert, delete, and query records | REST Querying Reference |
| Bulk Operations | CSV/S3 import and export, batch delete | Database Jobs |
| SQL Operations | Execute SQL statements (use for investigation, not production) | — |
| Users & Roles | Manage users and role-based access control | Users & Roles Operations |
| Token Authentication | Create and refresh JWT tokens | JWT Authentication |
| Components | Deploy and manage Harper components | Components Overview |
| Replication & Clustering | Configure cluster topology and replication | Replication & Clustering |
| Configuration | Read and update Harper configuration | — |
| System | Restart, system information, status management | — |
| Jobs | Query background job status | Database Jobs |
| Logs | Read standard, transaction, and audit logs | Logging Operations |
| Certificate Management | Manage TLS certificates | Certificate Management |
| Analytics | Query analytics metrics | Analytics Operations |
| Registration & Licensing | License management | — |
Past Release API Documentation
For API documentation prior to v4.0, see olddocs.harperdb.io.