API
The Compeer API allows you to create custom functionality for your agenetic workflow. All endpoints are served under /api/v1 and return JSON.
Authentication
Authentication is not enabled by default for Compeer.
If you have OIDC enabled, you must provided your JWT in the Authorization Bearer <token> header.
If you have API keys configured, you must provide a valid API key via the X-Api-Key header.
System Endpoints
GET /api/v1/alive
Returns the health status of the API.
Response:
{
"alive": true
}
GET /api/v1/backup
Returns a backup of the SQLite database.
Response: application/octet-stream (binary file)
Workspace Endpoints
GET /api/v1/workspaces
Returns all workspaces.
Response:
[
{
"id": "1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6",
"name": "default"
}
]
GET /api/v1/:workspace/stores
Returns all stores for a specific workspace.
Response:
[
{
"id": "7b5f23f7-3c7b-4a8d-9c49-6d7ef4f1324d",
"name": "My Store"
}
]
GET /api/v1/:workspace/search
Searches captures within a workspace with a required query string and optional store filter.
Query parameters:
query(string, required): Search query.store(string, optional): Limit results to a single store by its name.
Response:
[
{
"captureId": "2c3a6c5d-2d4b-4b52-9f2e-4f07c8b9e3e1",
"content": "Launch checklist"
}
]
POST /api/v1/:workspace/capture
Creates a new capture in the specified workspace.
Fields:
type(string, required): One oftext,data,url.content(string, required): Capture content.store(string, required): The name of the store to attach the capture to.
Request body:
{
"type": "text",
"content": "My note",
"store": "My Store"
}
Response:
{
"success": true
}