HTTP API Reference

KAWA exposes a REST API that lets you manage users, workspaces, datasources, workflows, and more programmatically. All examples use curl.

Base URL: https://<your-kawa-instance>

1. Authentication

KAWA supports two authentication methods:

Method
How

API Key

Pass x-kawa-api-key header on every request

Email / Password

POST /authentication/login → returns an accessToken cookie

For programmatic access, API key authentication is recommended.

1.1 Required headers

Most endpoints require these headers:

Header
Required
When
Description

x-kawa-api-key

Yes

API key authenticated requests

Your API key

x-kawa-workspace-id

Depends

Workspace-scoped endpoints

Target workspace ID (required for workspace-scoped endpoints; optional for some global endpoints like GET /backoffice/workspaces. If provided, must be a workspace you can access.)

Content-Type: application/json

Yes

POST requests

JSON request body

Workspace-scoped endpoints typically include:

  • GET /backoffice/*

  • POST /commands/secured/run

Authentication and health endpoints typically do not require a workspace header:

  • POST /authentication/login

  • GET /health

1.2 Log in with email/password

POST /authentication/login

Use -c to store the returned accessToken cookie, then -b to reuse it in subsequent requests.

Returns an accessToken cookie used in subsequent requests.

1.3 Get current user

GET /authentication/current-user

2. Commands endpoint

Most write operations (create, update, delete) go through a single command bus:

POST /commands/secured/run

Request body:

Example:

Returns 200 OK for most operations. Some operations may return 202 Accepted when an async process is started. Returns 409 Conflict when an entity already exists (depending on the command).

3. Users

3.1 List users

GET /backoffice/principals

3.2 Get user by ID

GET /backoffice/principals/{id}

3.3 Create user

Command: CreateActivePrincipalWithPassword

If a user with this email already exists, the server may return 409 Conflict (behavior depends on command implementation).

3.4 Change user status

Command: ReplaceUserStatus

Set "active": true to reactivate.

3.5 Change user role

Command: ReplaceUserRole

3.6 Change user password

Command: AdminChangeUserPassword

3.7 Generate API key for a user

Command: AdminGenerateApiKeyForPrincipal

Add "expirationDate": 20000 (days since Unix epoch) to set an expiry.

Important: The clearTextApiKey in the response is only returned once and cannot be recovered later.

3.8 Assign user to perimeters

Command: AssignPrincipalToPerimeters

4. Workspaces

Most operations are scoped to a workspace. Include x-kawa-workspace-id for workspace-scoped endpoints. Some endpoints are global (for example GET /backoffice/workspaces) and work without this header. If you provide x-kawa-workspace-id, make sure your API key has access to that workspace — otherwise the server may return 403 Forbidden.

4.1 List workspaces

GET /backoffice/workspaces

Note: This endpoint can be called without x-kawa-workspace-id. If you include x-kawa-workspace-id, use a workspace you have access to; otherwise you may receive 403 Forbidden.

4.2 Get workspace by ID

GET /backoffice/workspaces/{id}

4.3 Create workspace

Command: CreateWorkspace

May return 409 Conflict if a workspace with this name already exists (behavior depends on command implementation).

4.4 Add users to workspace

Command: AddMembersToWorkspace

To also set this as the users' active workspace:

Сommand: SetCurrentWorkspaceForPrincipals

4.5 Remove users from workspace

Command: RemoveWorkspaceMembers

4.6 Set workspace visibility

Command: ToggleWorkspaceVisibility

5. Datasources

5.1 List datasources

GET /backoffice/datasources

5.2 Get datasource schema

GET /backoffice/datasources/{id}/schema

5.3 Get datasource health report

GET /backoffice/datasources/health-report/v2/{id}

5.4 Archive datasource

Command: ArchiveDataSourceAndDeleteAssociatedData

Warning: This permanently deletes the datasource and all its associated data.

5.5 Share datasource

Command: UpdateDataSourceShareStatus

generalAccess values: RESTRICTED, READ, EDIT.

6. Workflows

6.1 List workflows

GET /backoffice/workflows

6.2 Get workflow run history

GET /backoffice/workflows/{workflow_id}/run-history

6.3 Run a workflow

Command: RunWorkflow

Workflow trigger parameters must be prefixed with taskVariable_.

6.4 Delete workflow

Command: DeleteWorkflow

7. Sheets

7.1 List sheets

GET /backoffice/sheets

7.2 Get sheet schema

GET /backoffice/sheets/{id}/schema

7.3 Create sheet

Command: CreateSimpleSheet

7.4 Delete sheet

Command: DeleteSheet

8. Server & Health

8.1 Health check

GET /health

8.2 Server version

GET /backoffice/application-environment

8.3 Usage statistics

GET /backoffice/usage?from={from_date}&to={to_date}&zoneId={timezone}

9. Entity listing

All entity types follow the same URL pattern:

Entity kind
Description

principals

Users

workspaces

Workspaces

datasources

Datasources

sheets

Sheets

dashboards

Dashboards

applications

Applications

extended-applications

Extended applications

workflows

Workflows

data-providers

Data providers

layouts

Layouts / views

attributes

Attributes

scripts

Scripts

script-runners

Script runners

agents

Agents

teams

Teams

perimeters

Perimeters

Example — search by name:

10. Error responses

Status
Meaning

200

Success

202

Accepted (async operation started)

403

Forbidden — API key does not have access to the workspace specified x-kawa-workspace-id

409

Conflict — entity already exists

4xx

Client error — body contains reason

5xx

Server error

Error body format:

The error response body is returned by the server and may vary depending on the endpoint. Use curl with -i to inspect the HTTP status code and response body.

Last updated

Was this helpful?