Skip to content

REST API Overview

OpsWeave provides a comprehensive REST API. All UI functions are also available via the API.

Base URL

http://localhost:3000/api/v1/

Authentication

All endpoints (except portal auth, webhooks, and /health) require a Bearer token:

bash
curl -H "Authorization: Bearer <jwt-token>" \
  http://localhost:3000/api/v1/tickets

Login:

bash
curl -X POST http://localhost:3000/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "admin@opsweave.local", "password": "changeme"}'

Response Format

Success (List):

json
{
  "data": [...],
  "meta": { "total": 42, "page": 1, "limit": 25 }
}

Success (Single):

json
{ "data": { ... } }

Error:

json
{
  "error": "Ticket not found",
  "code": "NOT_FOUND",
  "status": 404
}

Pagination & Filtering

GET /api/v1/tickets?page=2&limit=10&status=open&sort=created_at&order=desc
ParameterDescription
pagePage (default: 1)
limitEntries per page (default: 25, max: 100)
sortSort field
orderasc or desc
qFull-text search

Tenant Scoping

The tenant is read from the JWT, not from the URL. All data is automatically scoped to the logged-in user's tenant.

Endpoints

Auth

MethodPathDescription
POST/auth/loginLogin, returns JWT
POST/auth/logoutLogout
POST/auth/refreshRefresh JWT
GET/auth/meOwn profile + tenants
POST/auth/switch-tenantSwitch active tenant

Users

MethodPathDescription
GET/usersUser list
POST/usersCreate user
GET/users/:idUser detail
PUT/users/:idUpdate user
DELETE/users/:idDeactivate user
POST/users/importImport users from CSV

Groups

MethodPathDescription
GET/groupsGroup list
POST/groupsCreate group
GET/groups/:idGroup detail
PUT/groups/:idUpdate group
DELETE/groups/:idDelete group
GET/groups/:id/membersMembers
POST/groups/:id/membersAdd member
DELETE/groups/:id/members/:uidRemove member

Tickets

MethodPathDescription
GET/ticketsList (filter: type, status, priority, assignee, q)
POST/ticketsCreate
GET/tickets/:idDetail
PUT/tickets/:idUpdate
PATCH/tickets/:id/statusChange status
PATCH/tickets/:id/assignAssign
GET/tickets/:id/commentsComments
POST/tickets/:id/commentsAdd comment
GET/tickets/:id/historyChange log
PATCH/tickets/batchBatch update (max 100 tickets)
GET/tickets/statsStatistics
GET/tickets/stats/timelineTimeline statistics
GET/tickets/stats/by-customerStatistics per customer
GET/tickets/boardKanban board data
GET/POST/tickets/categoriesTicket categories
PUT/DELETE/tickets/categories/:idEdit/delete category

Assets

MethodPathDescription
GET/assetsList
POST/assetsCreate
GET/assets/:idDetail
PUT/assets/:idUpdate
DELETE/assets/:idDelete
GET/assets/:id/relationsRelations
POST/assets/:id/relationsAdd relation
DELETE/assets/:id/relations/:ridRemove relation
GET/assets/:id/sla-chainSLA inheritance chain
GET/assets/:id/ticketsLinked tickets
GET/assets/statsStatistics

Workflows

MethodPathDescription
GET/workflows/templatesTemplates
POST/workflows/templatesCreate
GET/PUT/DELETE/workflows/templates/:idDetail
POST/workflows/instantiateManually trigger
GET/workflows/instances/:idInstance status
POST/workflows/instances/:id/steps/:sid/completeComplete step
POST/workflows/instances/:id/cancelCancel

Knowledge Base

MethodPathDescription
GET/kb/articlesList (filter: status, visibility, category, q, linked_ticket_id)
POST/kb/articlesCreate
GET/PUT/DELETE/kb/articles/:idDetail
POST/kb/articles/:id/link/:ticketIdLink to ticket
DELETE/kb/articles/:id/link/:ticketIdRemove link

Service Catalog

MethodPathDescription
GET/POST/services/descriptionsService descriptions
GET/PUT/services/descriptions/:idDetail
GET/POST/services/catalogs/horizontalHorizontal catalogs
GET/POST/services/catalogs/verticalVertical catalogs (Enterprise)

Compliance

MethodPathDescription
GET/POST/compliance/frameworksFrameworks
GET/POST/compliance/frameworks/:id/requirementsRequirements
GET/compliance/frameworks/:id/matrixCompliance matrix
GET/compliance/frameworks/:id/gapsGap analysis
POST/DELETE/compliance/mappingsService↔requirement

Email

MethodPathDescription
GET/POST/email/configsConfigurations
GET/PUT/DELETE/email/configs/:idDetail
POST/email/configs/:id/testConnection test
GET/email/messagesReceived emails
POST/email/webhookWebhook ingest (public)

Customer Portal

MethodPathDescription
POST/portal/auth/loginPortal login
GET/portal/auth/mePortal user profile
GET/portal/ticketsOwn tickets
POST/portal/ticketsCreate ticket
GET/portal/tickets/:idTicket detail
POST/portal/tickets/:id/commentsComment
GET/portal/kbPublic KB articles

SLA

MethodPathDescription
GET/sla/definitionsAll SLA definitions
GET/sla/definitions/:idSLA definition detail
POST/sla/definitionsCreate SLA definition
PUT/sla/definitions/:idUpdate SLA definition
DELETE/sla/definitions/:idDelete SLA definition
GET/sla/assignmentsAll SLA assignments
POST/sla/assignmentsCreate SLA assignment
DELETE/sla/assignments/:idRemove SLA assignment
GET/sla/resolveResolve SLA for asset/customer

Customers

MethodPathDescription
GET/customersCustomer list
POST/customersCreate customer
GET/customers/:idCustomer detail
PUT/customers/:idUpdate customer
DELETE/customers/:idDeactivate customer
GET/customers/:id/overviewCustomer overview (tickets, assets, SLAs)

Settings

MethodPathDescription
GET/settingsAll settings
PUT/settings/:keyChange setting
DELETE/settings/:keyDelete setting
GET/settings/runtimeRuntime configuration

System

MethodPathDescription
GET/system/healthHealth check
GET/system/infoApp info (version, DB)
GET/licenseLicense status
POST/license/activateActivate Enterprise key
DELETE/licenseDeactivate license

Released under the AGPL-3.0 License.