# MGProject – API reference

*MGProject 5.1.2 · 2026-11-21 · 301 endpoints*

## Overview

Everything the MGProject interface shows and does goes through this API - the screens use exactly these
endpoints, with the rights of the person signed in. Requests and answers are JSON (UTF-8) unless an
endpoint says otherwise (CSV, PDF, Excel, files, the AI's stream).

The address is the installation's own, e.g. `https://mgproject.example.com`; on the server itself
`http://127.0.0.1:6633`. All paths below begin with `/api/`. Administration is under `/api/system/…`.

## Signing in

**API token (for scripts and other systems).** A person creates a token under *Account → API tokens*;
it is shown once. Send it in every request:

```
Authorization: Bearer <token>
```

A token carries exactly the rights of the person who made it - an administrator's token may do what an
administrator may, nothing more. *Who may* below names what an endpoint demands before anything else; on
top of that, an endpoint checks the rights on the very item (a project's permissions, a space's, a page's
restrictions) and answers 403 or 404 where they are missing. A revoked token is refused at once. Keep tokens out of logs and scripts
that others read.

**Session (the browser).** `POST /api/auth/login` with `{"username": "…", "password": "…"}` sets a
session cookie; `POST /api/auth/logout` ends it. Passkeys and the sign-in through identity providers
(Microsoft Entra, Google, Okta) go through the sign-in page, Active Directory accounts through the same
`POST /api/auth/login`.

## Errors

An error is an HTTP status with a JSON body:

```json
{"error": "A sentence that says what is wrong", "code": "optional_machine_readable_code"}
```

| Status | Meaning |
|---|---|
| 400 | The request is not right - the sentence says what. |
| 401 | Not signed in, or the token is not valid. |
| 403 | Signed in, but not allowed - or, for changes, no valid licence (`code: license_required`). |
| 404 | Not there, or not visible to this person (the API does not tell the two apart). |
| 409 | In conflict with what is there (e.g. a name taken). |
| 413 | Too big - send big files in pieces (see below). |
| 429 | Too many requests - wait as long as `Retry-After` says. |
| 500 | Unexpected; the answer carries `ref`, a reference that is in the server's log with the details. |

## Limits

Requests without a session are limited to 300 a minute per address, signed-in clients and tokens to
1200 a minute (each counted per worker process; an installation can change both,
`<PRODUCT>_RATE_LIMIT_ANON` and `<PRODUCT>_RATE_LIMIT`). Above it the answer is `429` with `Retry-After`
in seconds. `/api/health` is never limited; signing in (`/api/auth/…`) has a lockout after failed
attempts of its own instead.

## Formats

- Times are ISO 8601 in UTC, e.g. `2026-11-06T14:30:00Z`; plain dates `2026-11-06`.
- Durations are seconds (`seconds`), or text where an endpoint says so (`timeSpent: "1h 30m"`).
- Lists that can be long take `limit` and `offset` where they say so; the answer says how many there are.
- Searching uses **MQL**, the query language of the issue search, e.g.
  `project = ORB AND statusCategory != done ORDER BY updated DESC` (`GET /api/search?mql=…`).

## Big files in pieces

Proxies in front of a server often take only so much per request (Cloudflare: 100 MB). Big files go in
pieces of up to 50 MB:

1. `POST /api/uploads` with `{"filename": "…", "size": <bytes>}` → `{"id": "<upload id>", …}`
2. `PUT /api/uploads/<id>/<n>` with the bytes of piece `n` (0, 1, 2 …) as the body, in order
3. `GET /api/uploads/<id>` says how far it got - ask before sending a piece again after a break
4. attach the finished file with `"uploadId": "<id>"` in place of a form file; `DELETE /api/uploads/<id>`
   gives up

An upload belongs to whoever began it; one not finished within a day is removed.

## The AI assistant's answers

`POST /api/ai/ask` with `{"question": "…", "conversation": "<any id of the conversation>"}` answers as a
stream of JSON lines (`application/x-ndjson`), one event per line, as the work goes on:

| `type` | What it carries |
|---|---|
| `start` | the log id of this question |
| `step` | a tool the assistant used: `tool`, `input`, `summary` |
| `sources` | what it found and opened: `items` |
| `list` | a list from the database, with the query that made it |
| `chart` | a chart to draw: `chart` = `{type, title, labels, series[{name, values}], unit}` |
| `draft` | a change prepared for the person to confirm |
| `text` | the answer, in pieces |
| `error` | what went wrong, in a sentence |
| `end` | the answer is complete |

Every number in a chart comes from a tool result of the same answer; the assistant acts with the rights
of the person who asks.


## Contents

- [ai](#area-ai) – 8
- [applinks](#area-applinks) – 4
- [attachments](#area-attachments) – 3
- [auth](#area-auth) – 18
- [automation](#area-automation) – 6
- [bitbucket](#area-bitbucket) – 3
- [boards](#area-boards) – 14
- [bootstrap](#area-bootstrap) – 1
- [comments](#area-comments) – 2
- [custom-fields](#area-custom-fields) – 5
- [dashboard](#area-dashboard) – 1
- [dashboards](#area-dashboards) – 6
- [default-workflows](#area-default-workflows) – 2
- [filters](#area-filters) – 3
- [gadgets](#area-gadgets) – 1
- [global-permissions](#area-global-permissions) – 2
- [groups](#area-groups) – 4
- [health](#area-health) – 2
- [helpdesk](#area-helpdesk) – 1
- [issue-types](#area-issue-types) – 3
- [issues](#area-issues) – 27
- [links](#area-links) – 4
- [mql](#area-mql) – 2
- [notification-schemes](#area-notification-schemes) – 5
- [notifications](#area-notifications) – 3
- [permission-schemes](#area-permission-schemes) – 7
- [projects](#area-projects) – 19
- [reports](#area-reports) – 13
- [routines](#area-routines) – 6
- [screen-schemes](#area-screen-schemes) – 5
- [search](#area-search) – 2
- [sprints](#area-sprints) – 7
- [statuses](#area-statuses) – 3
- [structures](#area-structures) – 10
- [system/accent](#area-system-accent) – 2
- [system/ai](#area-system-ai) – 14
- [system/announcement](#area-system-announcement) – 2
- [system/applinks](#area-system-applinks) – 6
- [system/audit](#area-system-audit) – 1
- [system/audit.csv](#area-system-audit-csv) – 1
- [system/bitbucket](#area-system-bitbucket) – 3
- [system/branding](#area-system-branding) – 3
- [system/database](#area-system-database) – 2
- [system/db](#area-system-db) – 4
- [system/deactivated-tickets](#area-system-deactivated-tickets) – 1
- [system/entra](#area-system-entra) – 4
- [system/identity](#area-system-identity) – 5
- [system/instance](#area-system-instance) – 2
- [system/jsm](#area-system-jsm) – 5
- [system/license](#area-system-license) – 3
- [system/mail](#area-system-mail) – 3
- [system/mail-queue](#area-system-mail-queue) – 1
- [system/mgservice](#area-system-mgservice) – 4
- [third-party](#area-third-party) – 1
- [timeclock](#area-timeclock) – 8
- [uploads](#area-uploads) – 4
- [users](#area-users) – 7
- [webhooks](#area-webhooks) – 5
- [workflows](#area-workflows) – 6
- [worklogs](#area-worklogs) – 2

## Area: `ai`

<a id="area-ai"></a>

The AI assistant: asking a question (answered as a stream of events), searching, drafts the assistant prepared and the person confirms, and feedback on answers.

### `POST /api/ai/ask`

**Ask – AI assistant**

Answers as lines of JSON: first what was found, then the answer piece by
piece, then the end - so the box shows what was found at once.

- **Who may:** Anybody signed in
- **JSON body:** `question`, `previous`, `history`, `conversation`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/ai/ask' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"question": "…", "previous": "…", "history": "…", "conversation": "…"}'
```

**Returns**

A stream of JSON lines (application/x-ndjson), one event per line - see “The AI assistant's answers”.

### `POST /api/ai/drafts/{draft_id}/carry-out`

**Carry out – draft**

The button on a draft: the person confirms, and it is carried out as them.

- **Who may:** Anybody signed in
- **Path parameters:** `draft_id` (integer)

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/ai/drafts/{draft_id}/carry-out' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`ok`, `message`, `url`, `draft`

### `POST /api/ai/drafts/{draft_id}/discard`

**Discard – draft**

- **Who may:** Anybody signed in
- **Path parameters:** `draft_id` (integer)

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/ai/drafts/{draft_id}/discard' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`draft`

### `POST /api/ai/feedback`

**Give feedback – AI assistant**

- **Who may:** Anybody signed in
- **JSON body:** `question`, `refs`, `good`, `logId`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/ai/feedback' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"question": "…", "refs": "…", "good": "…", "logId": "…"}'
```

**Returns**

`ok`

### `POST /api/ai/query`

**Send query**

The assistant's read-only query, for a caller with the same rights: the probe run (tools/ai_eval.py)
works out the right answers with it, and MGHub can ask a tool for exact numbers. Only what the person may
see; checked and run exactly as the assistant's own (ai_query.py).

- **Who may:** Anybody signed in
- **JSON body:** `sql`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/ai/query' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"sql": "…"}'
```

**Returns**

JSON.

### `GET /api/ai/schema`

**Read schema**

The views the assistant queries, as it is told about them - for this person.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/ai/schema' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `views` | string | `"issues(key: the item's key, e.g. ABC-12, summary: its title` |

<details><summary>Example answer</summary>

```json
{
  "views": "issues(key: the item's key, e.g. ABC-12, summary: its title, type: Task, Bug,…"
}
```

</details>

### `POST /api/ai/search`

**Send search**

The issues alone, without an answer - also when the AI cannot be reached.

- **Who may:** Anybody signed in
- **JSON body:** `question`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/ai/search' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"question": "…"}'
```

**Returns**

`items`

### `GET /api/ai/state`

**Read the state – AI assistant**

For a client (the Mac app; the box): who this token or session is, and whether the AI assistant
answers them - one call to set a connection up.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/ai/state' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `signedIn` | boolean | `true` |
| `user` | string | `"Administrator"` |
| `product` | string | `"mgproject"` |
| `box` | boolean | `false` |

<details><summary>Example answer</summary>

```json
{
  "signedIn": true,
  "user": "Administrator",
  "product": "mgproject",
  "box": false
}
```

</details>


## Area: `applinks`

<a id="area-applinks"></a>

Application links between MGWiki, MGProject and MGService: what an installation is, the key exchange when an administrator links two of them, removing a link, and as whom a linked request is seen.

### `GET /api/applinks/about`

**Read what this is – applinks**

What this installation is - the first question of an application setting up a link. Open to all.

- **Who may:** No sign-in needed

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/applinks/about' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `product` | string | `"mgproject"` |
| `product_name` | string | `"MGProject"` |
| `applinks` | integer | `1` |

<details><summary>Example answer</summary>

```json
{
  "product": "mgproject",
  "product_name": "MGProject",
  "applinks": 1
}
```

</details>

### `POST /api/applinks/handshake`

**Exchange the keys – applinks**

The other side of setting up a link: an administrator of this installation (by API token or signed in)
accepts the other application's key and hands over this one's.

- **Who may:** Administrators
- **JSON body:** `base_url`, `product`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/applinks/handshake' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"base_url": "…", "product": "…"}'
```

**Returns**

JSON.

### `POST /api/applinks/unlink`

**Remove the link – applinks**

The linked application removed the link - signed by the link itself.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/applinks/unlink' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`ok`

### `GET /api/applinks/whoami`

**Read as whom – applinks**

As whom a request over an application link is seen here - the test of a link.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/applinks/whoami' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `product` | string | `"mgproject"` |
| `product_name` | string | `"MGProject"` |
| `username` | string | `"admin"` |
| `display_name` | string | `"Administrator"` |
| `email` | string | `""` |
| `matched_by` | null | `null` |

<details><summary>Example answer</summary>

```json
{
  "product": "mgproject",
  "product_name": "MGProject",
  "username": "admin",
  "display_name": "Administrator",
  "email": "",
  "matched_by": null
}
```

</details>


## Area: `attachments`

<a id="area-attachments"></a>

Files attached to issues or pages: reading, downloading, the preview of office documents, changing who may see them and removing them.

### `GET /api/attachments/{aid}`

**Read attachment**

- **Who may:** Permission: `browse`
- **Path parameters:** `aid` (integer)
- **Query parameters:** `download` (string), `inline` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/attachments/{aid}?download=…&inline=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.

### `DELETE /api/attachments/{aid}`

**Delete attachment**

- **Who may:** Anybody signed in
- **Path parameters:** `aid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/attachments/{aid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `GET /api/attachments/{aid}/preview`

**Preview – attachment**

An office document as PDF, so the viewer can show it as it really is.

Converted by LibreOffice on the server and kept beside the attachment, so
the same file is converted once. Without LibreOffice, or for a format it
cannot read, this answers 415 and the viewer offers the download instead.

- **Who may:** Permission: `browse`
- **Path parameters:** `aid` (integer)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/attachments/{aid}/preview' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`error`, `libreoffice`, `mime`, `detail`


## Area: `auth`

<a id="area-auth"></a>

Signing in and out, the own account: password, passkeys, API tokens and personal settings.

### `POST /api/auth/avatar`

**Send avatar**

Store a profile picture, squared and scaled down to a sensible size.

- **Who may:** Anybody signed in
- **JSON body:** `(multipart form: file)`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/auth/avatar' \
  -H 'Authorization: Bearer $TOKEN' \
  -F 'file=@/path/to/file'
```

**Returns**

JSON.

### `DELETE /api/auth/avatar`

**Delete avatar**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/auth/avatar' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.

### `POST /api/auth/login`

**Sign in – sign-in**

- **Who may:** No sign-in needed
- **JSON body:** `username`, `password`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/auth/login' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"username": "…", "password": "…"}'
```

**Returns**

`user`, `mustChangePassword`

### `POST /api/auth/logout`

**Sign out – sign-in**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/auth/logout' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`ok`

### `GET /api/auth/me`

**Read own account**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/auth/me' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `user` | object |  |
| `user.id` | integer | `6` |
| `user.username` | string | `"admin"` |
| `user.displayName` | string | `"Administrator"` |
| `user.email` | string | `""` |
| `user.avatarColor` | string | `"#007FA0"` |
| `user.isAdmin` | boolean | `true` |
| `user.active` | boolean | `true` |
| `user.clockPrompt` | boolean | `true` |
| `user.avatarUrl` | null | `null` |
| `user.hasPassword` | boolean | `true` |
| `user.mustChangePassword` | boolean | `false` |
| `user.lastLogin` | string | `"2026-11-21T21:18:53Z"` |
| `user.preferences` | object |  |
| `user.passkeys` | integer | `0` |
| `user.locked` | boolean | `false` |
| `method` | string | `"password"` |
| `passkeys` | array |  |
| `passkeysSupported` | boolean | `true` |
| `passkeyHint` | string | `""` |

<details><summary>Example answer</summary>

```json
{
  "user": {
    "id": 6,
    "username": "admin",
    "displayName": "Administrator",
    "email": "",
    "avatarColor": "#007FA0",
    "isAdmin": true,
    "active": true,
    "clockPrompt": true,
    "avatarUrl": null,
    "hasPassword": true,
    "mustChangePassword": false,
    "lastLogin": "2026-11-21T21:18:53Z",
    "preferences": {},
    "passkeys": 0,
    "locked": false
  },
  "method": "password",
  "passkeys": [],
  "passkeysSupported": true,
  "passkeyHint": ""
}
```

</details>

### `GET /api/auth/passkeys`

**List passkeys**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/auth/passkeys' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

```json
[]
```

### `POST /api/auth/passkeys/login/begin`

**Begin – login**

- **Who may:** No sign-in needed
- **JSON body:** `username`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/auth/passkeys/login/begin' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"username": "…"}'
```

**Returns**

JSON.

### `POST /api/auth/passkeys/login/finish`

**Finish – login**

- **Who may:** No sign-in needed
- **JSON body:** `credential`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/auth/passkeys/login/finish' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"credential": "…"}'
```

**Returns**

`user`, `mustChangePassword`

### `POST /api/auth/passkeys/register/begin`

**Begin – register**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/auth/passkeys/register/begin' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.

### `POST /api/auth/passkeys/register/finish`

**Finish – register**

- **Who may:** Anybody signed in
- **JSON body:** `credential`, `name`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/auth/passkeys/register/finish' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"credential": "…", "name": "…"}'
```

**Returns**

`passkeys`

### `DELETE /api/auth/passkeys/{cid}`

**Delete passkey**

- **Who may:** Anybody signed in
- **Path parameters:** `cid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/auth/passkeys/{cid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `POST /api/auth/password`

**Send password**

- **Who may:** Anybody signed in
- **JSON body:** `currentPassword`, `newPassword`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/auth/password' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"currentPassword": "…", "newPassword": "…"}'
```

**Returns**

`ok`

### `GET /api/auth/preferences`

**List personal settings**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/auth/preferences' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

```json
{}
```

### `PUT /api/auth/preferences`

**Change personal settings**

Small per person settings blob, currently the remembered dialog sizes.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/auth/preferences' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

The same as `GET /api/auth/preferences`.

### `GET /api/auth/state`

**Read the state – sign-in**

- **Who may:** No sign-in needed

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/auth/state' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `authenticated` | boolean | `true` |
| `user` | object |  |
| `user.id` | integer | `6` |
| `user.username` | string | `"admin"` |
| `user.displayName` | string | `"Administrator"` |
| `user.email` | string | `""` |
| `user.avatarColor` | string | `"#007FA0"` |
| `user.isAdmin` | boolean | `true` |
| `user.active` | boolean | `true` |
| `user.clockPrompt` | boolean | `true` |
| `user.avatarUrl` | null | `null` |
| `user.hasPassword` | boolean | `true` |
| `user.mustChangePassword` | boolean | `false` |
| `user.lastLogin` | string | `"2026-11-21T21:18:53Z"` |
| `user.preferences` | object |  |
| `user.passkeys` | integer | `0` |
| `user.locked` | boolean | `false` |
| `passkeysSupported` | boolean | `true` |
| `passkeyHint` | string | `""` |
| `rpId` | string | `"localhost"` |
| `origin` | string | `"http://localhost"` |
| `version` | string | `"5.1.2"` |

<details><summary>Example answer</summary>

```json
{
  "authenticated": true,
  "user": {
    "id": 6,
    "username": "admin",
    "displayName": "Administrator",
    "email": "",
    "avatarColor": "#007FA0",
    "isAdmin": true,
    "active": true,
    "clockPrompt": true,
    "avatarUrl": null,
    "hasPassword": true,
    "mustChangePassword": false,
    "lastLogin": "2026-11-21T21:18:53Z",
    "preferences": {},
    "passkeys": 0,
    "locked": false
  },
  "passkeysSupported": true,
  "passkeyHint": "",
  "rpId": "localhost",
  "origin": "http://localhost",
  "version": "5.1.2"
}
```

</details>

### `GET /api/auth/tokens`

**List API tokens**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/auth/tokens' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `tokens` | array |  |

<details><summary>Example answer</summary>

```json
{
  "tokens": []
}
```

</details>

### `POST /api/auth/tokens`

**Create API token**

Hand out one token, once.

The value is shown here and never again: only its hash is stored, so a
database that falls into the wrong hands does not hand over anybody's access.

- **Who may:** Anybody signed in
- **JSON body:** `name`, `expires`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/auth/tokens' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "expires": "…"}'
```

**Returns**

`token`, `name`, `expires`, `username`

### `DELETE /api/auth/tokens/{tid}`

**Delete API token**

- **Who may:** Anybody signed in
- **Path parameters:** `tid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/auth/tokens/{tid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`revoked`


## Area: `automation`

<a id="area-automation"></a>

Automation rules: when something happens to an issue, do something - and the log of what they did.

### `GET /api/automation`

**List automation rules**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/automation' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `rules` | array |  |
| `rules[].id` | integer | `1` |
| `rules[].name` | string | `"Take the version from the new epic"` |
| `rules[].description` | string | `"When an issue moves into another epic, its fix version foll` |
| `rules[].enabled` | boolean | `true` |
| `rules[].projectId` | null | `null` |
| `rules[].projectKey` | null | `null` |
| `rules[].trigger` | string | `"issue.epicChanged"` |
| `rules[].triggerConfig` | object |  |
| `rules[].conditions` | array |  |
| `rules[].actions` | array |  |
| `rules[].question` | string | `""` |
| `rules[].created` | string | `"2026-11-21T21:18:53Z"` |
| `rules[].runs` | integer | `0` |
| `catalogue` | object |  |
| `catalogue.events` | object |  |
| `catalogue.events.issue.created` | string | `"Issue created"` |
| `catalogue.events.issue.transitioned` | string | `"Status changed"` |
| `catalogue.events.issue.assigned` | string | `"Assignee changed"` |
| `catalogue.events.issue.epicChanged` | string | `"Epic changed"` |
| `catalogue.events.issue.updated` | string | `"Any field changed"` |
| `catalogue.events.issue.deleted` | string | `"Issue deleted"` |
| `catalogue.events.issue.deleting` | string | `"Issue is about to be deleted"` |
| `catalogue.events.comment.added` | string | `"Comment added"` |
| `catalogue.events.worklog.added` | string | `"Work logged"` |
| `catalogue.events.attachment.added` | string | `"Attachment added"` |
| `catalogue.events.sprint.started` | string | `"Sprint started"` |
| `catalogue.events.sprint.completed` | string | `"Sprint completed"` |
| `catalogue.events.issue.released` | string | `"Issue released"` |
| `catalogue.watchableFields` | object |  |
| `catalogue.watchableFields.summary` | string | `"Summary"` |
| `catalogue.watchableFields.description` | string | `"Description"` |
| `catalogue.watchableFields.statusId` | string | `"Status"` |
| `catalogue.watchableFields.assigneeId` | string | `"Assignee"` |
| `catalogue.watchableFields.bitbucketProject` | string | `"Bitbucket project"` |
| `catalogue.watchableFields.bitbucketRepo` | string | `"Bitbucket repository"` |
| `catalogue.watchableFields.reporterId` | string | `"Reporter"` |
| `catalogue.watchableFields.priorityId` | string | `"Priority"` |
| `catalogue.watchableFields.storyPoints` | string | `"Story points"` |
| `catalogue.watchableFields.estimate` | string | `"Estimate"` |

<details><summary>Example answer</summary>

```json
{
  "rules": [
    {
      "id": 1,
      "name": "Take the version from the new epic",
      "description": "When an issue moves into another epic, its fix version follows the epic it no…",
      "enabled": true,
      "projectId": null,
      "projectKey": null,
      "trigger": "issue.epicChanged",
      "triggerConfig": {},
      "conditions": [],
      "actions": [
        {
          "type": "setField",
          "scope": "self",
          "field": "fixVersion",
          "from": "epic"
        }
      ],
      "question": "",
      "created": "2026-11-21T21:18:53Z",
      "runs": 0
    },
    {
      "id": 2,
      "name": "Ask whether to delete everything below an issue",
      "description": "Before an issue with sub-tasks or issues in it is deleted, asks whether those…",
      "enabled": true,
      "projectId": null,
      "projectKey": null,
      "trigger": "issue.deleting",
      "triggerConfig": {},
      "conditions": [],
      "actions": [
        {
          "type": "deleteChildren",
          "scope": "self"
        }
      ],
      "question": "Delete everything below this issue as well?",
      "created": "2026-11-21T21:18:53Z",
      "runs": 0
    },
    "…"
  ],
  "catalogue": {
    "events": {
      "issue.created": "Issue created",
      "issue.transitioned": "Status changed",
      "issue.assigned": "Assignee changed",
      "issue.epicChanged": "Epic changed",
      "issue.updated": "Any field changed",
      "issue.deleted": "Issue deleted",
      "issue.deleting": "Issue is about to be deleted",
      "comment.added": "Comment added",
      "worklog.added": "Work logged",
      "attachment.added": "Attachment added",
      "sprint.started": "Sprint started",
      "sprint.completed": "Sprint completed",
      "issue.released": "Issue release
…
```

</details>

### `POST /api/automation`

**Create automation rule**

- **Who may:** Administrators
- **JSON body:** `name`, `trigger`, `description`, `enabled`, `projectId`, `triggerConfig`, `conditions`, `actions`, `question`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/automation' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "trigger": "…", "description": "…", "enabled": "…", "projectId": "…", "triggerConfig": "…", "conditions": "…", "actions": "…"}'
```

**Returns**

The same as `GET /api/automation`.

### `GET /api/automation/log`

**List log**

Every evaluation, across all rules - the place to look when a rule
seems not to fire.

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/automation/log' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

```json
[]
```

### `PUT /api/automation/{rid}`

**Change automation rule**

- **Who may:** Administrators
- **Path parameters:** `rid` (integer)
- **JSON body:** `name`, `description`, `enabled`, `projectId`, `trigger`, `question`, `triggerConfig`, `conditions`, `actions`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/automation/{rid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "enabled": "…", "projectId": "…", "trigger": "…", "question": "…", "triggerConfig": "…", "conditions": "…"}'
```

**Returns**

JSON.

### `DELETE /api/automation/{rid}`

**Delete automation rule**

- **Who may:** Administrators
- **Path parameters:** `rid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/automation/{rid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `GET /api/automation/{rid}/runs`

**List runs (automation rule)**

- **Who may:** Administrators
- **Path parameters:** `rid` (integer)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/automation/{rid}/runs' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

```json
[]
```


## Area: `bitbucket`

<a id="area-bitbucket"></a>

The connection to Bitbucket: commits, branches and pull requests shown with the issues they name.

### `GET /api/bitbucket/projects`

**List projects**

- **Who may:** Anybody signed in
- **Query parameters:** `workspace` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/bitbucket/projects?workspace=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`workspace`, `projects`

### `GET /api/bitbucket/repositories`

**List repositories**

- **Who may:** Anybody signed in
- **Query parameters:** `workspace` (string), `project` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/bitbucket/repositories?workspace=…&project=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`workspace`, `project`, `repositories`

### `GET /api/bitbucket/workspaces`

**Read workspaces**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/bitbucket/workspaces' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`workspaces`


## Area: `boards`

<a id="area-boards"></a>

Boards - Scrum and Kanban: their columns, the issues on them, the backlog, and the charts of a board.

### `GET /api/boards`

**List boards**

All boards, or those covering one project.

- **Who may:** Anybody signed in
- **Query parameters:** `project` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/boards?project=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `[].id` | integer | `3` |
| `[].name` | string | `"HLP board"` |
| `[].type` | string | `"kanban"` |
| `[].quickFilters` | array |  |
| `[].swimlanes` | string | `"none"` |
| `[].project` | object |  |
| `[].project.workflow` | object |  |
| `[].project.id` | integer | `3` |
| `[].project.key` | string | `"HLP"` |
| `[].project.name` | string | `"Helpdesk"` |
| `[].project.description` | string | `"Demo project Helpdesk"` |
| `[].project.type` | string | `"kanban"` |
| `[].project.avatarColor` | string | `"#00875A"` |
| `[].project.lead` | object |  |
| `[].project.boardId` | integer | `3` |
| `[].project.issueCount` | integer | `6` |
| `[].project.doneCount` | integer | `2` |
| `[].project.created` | string | `"2026-11-21T21:18:53Z"` |
| `[].project.iconUrl` | null | `null` |
| `[].project.may` | object |  |
| `[].projects` | array |  |
| `[].projects[].workflow` | object |  |
| `[].projects[].id` | integer | `3` |
| `[].projects[].key` | string | `"HLP"` |
| `[].projects[].name` | string | `"Helpdesk"` |
| `[].projects[].description` | string | `"Demo project Helpdesk"` |
| `[].projects[].type` | string | `"kanban"` |
| `[].projects[].avatarColor` | string | `"#00875A"` |
| `[].projects[].lead` | object |  |
| `[].projects[].boardId` | integer | `3` |
| `[].projects[].issueCount` | integer | `6` |
| `[].projects[].doneCount` | integer | `2` |
| `[].projects[].created` | string | `"2026-11-21T21:18:53Z"` |
| `[].projects[].iconUrl` | null | `null` |
| `[].projects[].may` | object |  |
| `[].projectKeys` | array |  |
| `[].multiProject` | boolean | `false` |
| `[].columns` | array |  |
| `[].columns[].id` | integer | `9` |
| `[].columns[].name` | string | `"To Do"` |

<details><summary>Example answer</summary>

```json
[
  {
    "id": 3,
    "name": "HLP board",
    "type": "kanban",
    "quickFilters": [],
    "swimlanes": "none",
    "project": {
      "workflow": {
        "id": 2,
        "name": "Default workflow"
      },
      "id": 3,
      "key": "HLP",
      "name": "Helpdesk",
      "description": "Demo project Helpdesk",
      "type": "kanban",
      "avatarColor": "#00875A",
      "lead": {
        "id": 3,
        "username": "lfrei",
        "displayName": "Lena Frei",
        "email": "lena.frei@example.invalid",
        "avatarColor": "#BF2600",
        "isAdmin": false,
        "active": true,
        "clockPrompt": true,
        "avatarUrl": null
      },
      "boardId": 3,
      "issueCount": 6,
      "doneCount": 2,
      "created": "2026-11-21T21:18:53Z",
      "iconUrl": null,
      "may": {
        "create": true,
        "edit": true,
        "manage": true,
        "transition": true,
        "assign": true
      }
    },
    "projects": [
      {
        "workflow": {
          "id": 2,
          "name": "Default workflow"
        },
        "id": 3,
        "key": "HLP",
        "name": "Helpdesk",
        "description": "Demo project Helpdesk",
        "type": "kanban",
        "avatarColor": "#00875A",
        "lead": {
          "id": 3,
          "username": "lfrei",
          "displayName": "Lena Frei",
          "email": "lena.frei@example.invalid",
          "avatarColor": "#BF2600",
          "isAdmin": false,
          "active": true,
          "clockPrompt": true,
          "avatarUrl": null
        },
        "boardId": 3,
        "issueCount": 6,
        "doneCount": 2,
        "created": "2026-11-21T21:18:53Z",
        "iconUrl": null,
        "may": {
          "create": true,
          "edit": true,
          "manage": true,
          "trans
…
```

</details>

### `POST /api/boards`

**Create board**

- **Who may:** Anybody signed in
- **JSON body:** `name`, `type`, `projectIds`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/boards' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "type": "…", "projectIds": "…"}'
```

**Returns**

The same as `GET /api/boards`.

### `GET /api/boards/{bid}`

**Read board**

- **Who may:** Anybody signed in
- **Path parameters:** `bid` (integer)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/boards/{bid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `id` | integer | `1` |
| `name` | string | `"ORB board"` |
| `type` | string | `"scrum"` |
| `quickFilters` | array |  |
| `swimlanes` | string | `"none"` |
| `project` | object |  |
| `project.workflow` | object |  |
| `project.workflow.id` | integer | `2` |
| `project.workflow.name` | string | `"Default workflow"` |
| `project.id` | integer | `1` |
| `project.key` | string | `"ORB"` |
| `project.name` | string | `"Orbit Portal"` |
| `project.description` | string | `"Demo project Orbit Portal"` |
| `project.type` | string | `"scrum"` |
| `project.avatarColor` | string | `"#0052CC"` |
| `project.lead` | object |  |
| `project.lead.id` | integer | `1` |
| `project.lead.username` | string | `"mkoch"` |
| `project.lead.displayName` | string | `"Marie Koch"` |
| `project.lead.email` | string | `"marie.koch@example.invalid"` |
| `project.lead.avatarColor` | string | `"#0052CC"` |
| `project.lead.isAdmin` | boolean | `true` |
| `project.lead.active` | boolean | `true` |
| `project.lead.clockPrompt` | boolean | `true` |
| `project.lead.avatarUrl` | null | `null` |
| `project.boardId` | integer | `1` |
| `project.issueCount` | integer | `25` |
| `project.doneCount` | integer | `9` |
| `project.created` | string | `"2026-11-21T21:18:53Z"` |
| `project.iconUrl` | null | `null` |
| `project.may` | object |  |
| `project.may.create` | boolean | `true` |
| `project.may.edit` | boolean | `true` |
| `project.may.manage` | boolean | `true` |
| `project.may.transition` | boolean | `true` |
| `project.may.assign` | boolean | `true` |
| `projects` | array |  |
| `projects[].workflow` | object |  |
| `projects[].id` | integer | `1` |
| `projects[].key` | string | `"ORB"` |

<details><summary>Example answer</summary>

```json
{
  "id": 1,
  "name": "ORB board",
  "type": "scrum",
  "quickFilters": [],
  "swimlanes": "none",
  "project": {
    "workflow": {
      "id": 2,
      "name": "Default workflow"
    },
    "id": 1,
    "key": "ORB",
    "name": "Orbit Portal",
    "description": "Demo project Orbit Portal",
    "type": "scrum",
    "avatarColor": "#0052CC",
    "lead": {
      "id": 1,
      "username": "mkoch",
      "displayName": "Marie Koch",
      "email": "marie.koch@example.invalid",
      "avatarColor": "#0052CC",
      "isAdmin": true,
      "active": true,
      "clockPrompt": true,
      "avatarUrl": null
    },
    "boardId": 1,
    "issueCount": 25,
    "doneCount": 9,
    "created": "2026-11-21T21:18:53Z",
    "iconUrl": null,
    "may": {
      "create": true,
      "edit": true,
      "manage": true,
      "transition": true,
      "assign": true
    }
  },
  "projects": [
    {
      "workflow": {
        "id": 2,
        "name": "Default workflow"
      },
      "id": 1,
      "key": "ORB",
      "name": "Orbit Portal",
      "description": "Demo project Orbit Portal",
      "type": "scrum",
      "avatarColor": "#0052CC",
      "lead": {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "email": "marie.koch@example.invalid",
        "avatarColor": "#0052CC",
        "isAdmin": true,
        "active": true,
        "clockPrompt": true,
        "avatarUrl": null
      },
      "boardId": 1,
      "issueCount": 25,
      "doneCount": 9,
      "created": "2026-11-21T21:18:53Z",
      "iconUrl": null,
      "may": {
        "create": true,
        "edit": true,
        "manage": true,
        "transition": true,
        "assign": true
      }
    }
  ],
  "projectKeys": [
    "ORB"
  ],
  "multiProject": false,
  "columns": [
   
…
```

</details>

### `PUT /api/boards/{bid}`

**Change board**

- **Who may:** Anybody signed in
- **Path parameters:** `bid` (integer)
- **JSON body:** `name`, `type`, `quickFilters`, `swimlanes`, `projectIds`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/boards/{bid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "type": "…", "quickFilters": "…", "swimlanes": "…", "projectIds": "…"}'
```

**Returns**

The same as `GET /api/boards/{bid}`.

### `DELETE /api/boards/{bid}`

**Delete board**

- **Who may:** Anybody signed in
- **Path parameters:** `bid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/boards/{bid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`, `sprintsRemoved`

### `GET /api/boards/{bid}/backlog`

**Read backlog (board)**

- **Who may:** Anybody signed in
- **Path parameters:** `bid` (integer)
- **Query parameters:** `closed` (string), `limit` (int, default 200), `offset` (int, default 0)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/boards/{bid}/backlog?closed=…&limit=…&offset=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `board` | object |  |
| `board.id` | integer | `1` |
| `board.name` | string | `"ORB board"` |
| `board.type` | string | `"scrum"` |
| `board.quickFilters` | array |  |
| `board.swimlanes` | string | `"none"` |
| `board.project` | object |  |
| `board.project.workflow` | object |  |
| `board.project.id` | integer | `1` |
| `board.project.key` | string | `"ORB"` |
| `board.project.name` | string | `"Orbit Portal"` |
| `board.project.description` | string | `"Demo project Orbit Portal"` |
| `board.project.type` | string | `"scrum"` |
| `board.project.avatarColor` | string | `"#0052CC"` |
| `board.project.lead` | object |  |
| `board.project.boardId` | integer | `1` |
| `board.project.issueCount` | integer | `25` |
| `board.project.doneCount` | integer | `9` |
| `board.project.created` | string | `"2026-11-21T21:18:53Z"` |
| `board.project.iconUrl` | null | `null` |
| `board.project.may` | object |  |
| `board.projects` | array |  |
| `board.projects[].workflow` | object |  |
| `board.projects[].id` | integer | `1` |
| `board.projects[].key` | string | `"ORB"` |
| `board.projects[].name` | string | `"Orbit Portal"` |
| `board.projects[].description` | string | `"Demo project Orbit Portal"` |
| `board.projects[].type` | string | `"scrum"` |
| `board.projects[].avatarColor` | string | `"#0052CC"` |
| `board.projects[].lead` | object |  |
| `board.projects[].boardId` | integer | `1` |
| `board.projects[].issueCount` | integer | `25` |
| `board.projects[].doneCount` | integer | `9` |
| `board.projects[].created` | string | `"2026-11-21T21:18:53Z"` |
| `board.projects[].iconUrl` | null | `null` |
| `board.projects[].may` | object |  |
| `board.projectKeys` | array |  |
| `board.multiProject` | boolean | `false` |
| `board.columns` | array |  |
| `board.columns[].id` | integer | `1` |

<details><summary>Example answer</summary>

```json
{
  "board": {
    "id": 1,
    "name": "ORB board",
    "type": "scrum",
    "quickFilters": [],
    "swimlanes": "none",
    "project": {
      "workflow": {
        "id": 2,
        "name": "Default workflow"
      },
      "id": 1,
      "key": "ORB",
      "name": "Orbit Portal",
      "description": "Demo project Orbit Portal",
      "type": "scrum",
      "avatarColor": "#0052CC",
      "lead": {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "email": "marie.koch@example.invalid",
        "avatarColor": "#0052CC",
        "isAdmin": true,
        "active": true,
        "clockPrompt": true,
        "avatarUrl": null
      },
      "boardId": 1,
      "issueCount": 25,
      "doneCount": 9,
      "created": "2026-11-21T21:18:53Z",
      "iconUrl": null,
      "may": {
        "create": true,
        "edit": true,
        "manage": true,
        "transition": true,
        "assign": true
      }
    },
    "projects": [
      {
        "workflow": {
          "id": 2,
          "name": "Default workflow"
        },
        "id": 1,
        "key": "ORB",
        "name": "Orbit Portal",
        "description": "Demo project Orbit Portal",
        "type": "scrum",
        "avatarColor": "#0052CC",
        "lead": {
          "id": 1,
          "username": "mkoch",
          "displayName": "Marie Koch",
          "email": "marie.koch@example.invalid",
          "avatarColor": "#0052CC",
          "isAdmin": true,
          "active": true,
          "clockPrompt": true,
          "avatarUrl": null
        },
        "boardId": 1,
        "issueCount": 25,
        "doneCount": 9,
        "created": "2026-11-21T21:18:53Z",
        "iconUrl": null,
        "may": {
          "create": true,
          "edit": true,
          "manag
…
```

</details>

### `GET /api/boards/{bid}/board`

**Read board (board)**

- **Who may:** Anybody signed in
- **Path parameters:** `bid` (integer)
- **Query parameters:** `sprint` (int)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/boards/{bid}/board?sprint=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `id` | integer | `1` |
| `name` | string | `"ORB board"` |
| `type` | string | `"scrum"` |
| `quickFilters` | array |  |
| `swimlanes` | string | `"none"` |
| `project` | object |  |
| `project.workflow` | object |  |
| `project.workflow.id` | integer | `2` |
| `project.workflow.name` | string | `"Default workflow"` |
| `project.id` | integer | `1` |
| `project.key` | string | `"ORB"` |
| `project.name` | string | `"Orbit Portal"` |
| `project.description` | string | `"Demo project Orbit Portal"` |
| `project.type` | string | `"scrum"` |
| `project.avatarColor` | string | `"#0052CC"` |
| `project.lead` | object |  |
| `project.lead.id` | integer | `1` |
| `project.lead.username` | string | `"mkoch"` |
| `project.lead.displayName` | string | `"Marie Koch"` |
| `project.lead.email` | string | `"marie.koch@example.invalid"` |
| `project.lead.avatarColor` | string | `"#0052CC"` |
| `project.lead.isAdmin` | boolean | `true` |
| `project.lead.active` | boolean | `true` |
| `project.lead.clockPrompt` | boolean | `true` |
| `project.lead.avatarUrl` | null | `null` |
| `project.boardId` | integer | `1` |
| `project.issueCount` | integer | `25` |
| `project.doneCount` | integer | `9` |
| `project.created` | string | `"2026-11-21T21:18:53Z"` |
| `project.iconUrl` | null | `null` |
| `project.may` | object |  |
| `project.may.create` | boolean | `true` |
| `project.may.edit` | boolean | `true` |
| `project.may.manage` | boolean | `true` |
| `project.may.transition` | boolean | `true` |
| `project.may.assign` | boolean | `true` |
| `projects` | array |  |
| `projects[].workflow` | object |  |
| `projects[].id` | integer | `1` |
| `projects[].key` | string | `"ORB"` |

<details><summary>Example answer</summary>

```json
{
  "id": 1,
  "name": "ORB board",
  "type": "scrum",
  "quickFilters": [],
  "swimlanes": "none",
  "project": {
    "workflow": {
      "id": 2,
      "name": "Default workflow"
    },
    "id": 1,
    "key": "ORB",
    "name": "Orbit Portal",
    "description": "Demo project Orbit Portal",
    "type": "scrum",
    "avatarColor": "#0052CC",
    "lead": {
      "id": 1,
      "username": "mkoch",
      "displayName": "Marie Koch",
      "email": "marie.koch@example.invalid",
      "avatarColor": "#0052CC",
      "isAdmin": true,
      "active": true,
      "clockPrompt": true,
      "avatarUrl": null
    },
    "boardId": 1,
    "issueCount": 25,
    "doneCount": 9,
    "created": "2026-11-21T21:18:53Z",
    "iconUrl": null,
    "may": {
      "create": true,
      "edit": true,
      "manage": true,
      "transition": true,
      "assign": true
    }
  },
  "projects": [
    {
      "workflow": {
        "id": 2,
        "name": "Default workflow"
      },
      "id": 1,
      "key": "ORB",
      "name": "Orbit Portal",
      "description": "Demo project Orbit Portal",
      "type": "scrum",
      "avatarColor": "#0052CC",
      "lead": {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "email": "marie.koch@example.invalid",
        "avatarColor": "#0052CC",
        "isAdmin": true,
        "active": true,
        "clockPrompt": true,
        "avatarUrl": null
      },
      "boardId": 1,
      "issueCount": 25,
      "doneCount": 9,
      "created": "2026-11-21T21:18:53Z",
      "iconUrl": null,
      "may": {
        "create": true,
        "edit": true,
        "manage": true,
        "transition": true,
        "assign": true
      }
    }
  ],
  "projectKeys": [
    "ORB"
  ],
  "multiProject": false,
  "columns": [
   
…
```

</details>

### `PUT /api/boards/{bid}/columns`

**Change columns (board)**

- **Who may:** Anybody signed in
- **Path parameters:** `bid` (integer)
- **JSON body:** `columns`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/boards/{bid}/columns' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"columns": "…"}'
```

**Returns**

JSON.

### `GET /api/boards/{bid}/match`

**Read match (board)**

The issues of the board an MQL query keeps - their ids, for the backlog's own filter (MQL mode). Within the
board's projects and what this person may see; an ORDER BY in the query does no harm.

- **Who may:** Anybody signed in
- **Path parameters:** `bid` (integer)
- **Query parameters:** `mql` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/boards/{bid}/match?mql=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `ids` | array |  |

<details><summary>Example answer</summary>

```json
{
  "ids": [
    18,
    16,
    "…"
  ]
}
```

</details>

### `GET /api/boards/{bid}/quick-filters/{index}`

**Read quick filters (board)**

The issues of the board one of its quick filters keeps - their ids, for the board and the backlog to show
only those. Within the board's projects and what this person may see.

- **Who may:** Anybody signed in
- **Path parameters:** `bid` (integer), `index` (integer)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/boards/{bid}/quick-filters/{index}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`ids`

### `GET /api/boards/{bid}/sprints`

**List sprints (board)**

- **Who may:** Anybody signed in
- **Path parameters:** `bid` (integer)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/boards/{bid}/sprints' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `[].id` | integer | `1` |
| `[].boardId` | integer | `1` |
| `[].name` | string | `"Orbit Sprint 12"` |
| `[].goal` | string | `""` |
| `[].state` | string | `"closed"` |
| `[].startDate` | string | `"2026-10-19T21:18:53Z"` |
| `[].endDate` | string | `"2026-11-02T21:18:53Z"` |
| `[].completeDate` | string | `"2026-11-02T21:18:53Z"` |
| `[].committedPoints` | number | `21.0` |
| `[].completedPoints` | number | `21.0` |
| `[].issueCount` | integer | `4` |
| `[].points` | number | `21.0` |
| `[].donePoints` | number | `21.0` |
| `[].doneCount` | integer | `4` |

<details><summary>Example answer</summary>

```json
[
  {
    "id": 1,
    "boardId": 1,
    "name": "Orbit Sprint 12",
    "goal": "",
    "state": "closed",
    "startDate": "2026-10-19T21:18:53Z",
    "endDate": "2026-11-02T21:18:53Z",
    "completeDate": "2026-11-02T21:18:53Z",
    "committedPoints": 21.0,
    "completedPoints": 21.0,
    "issueCount": 4,
    "points": 21.0,
    "donePoints": 21.0,
    "doneCount": 4
  },
  {
    "id": 2,
    "boardId": 1,
    "name": "Orbit Sprint 13",
    "goal": "",
    "state": "closed",
    "startDate": "2026-11-02T21:18:53Z",
    "endDate": "2026-11-16T21:18:53Z",
    "completeDate": "2026-11-16T21:18:53Z",
    "committedPoints": 10.0,
    "completedPoints": 10.0,
    "issueCount": 3,
    "points": 10.0,
    "donePoints": 10.0,
    "doneCount": 3
  },
  "…"
]
```

</details>

### `POST /api/boards/{bid}/sprints`

**Create sprint (board)**

- **Who may:** Anybody signed in
- **Path parameters:** `bid` (integer)
- **JSON body:** `name`, `goal`, `startDate`, `endDate`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/boards/{bid}/sprints' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "goal": "…", "startDate": "…", "endDate": "…"}'
```

**Returns**

The same as `GET /api/boards/{bid}/sprints`.

### `GET /api/boards/{bid}/stats`

**Read statistics (board)**

- **Who may:** Anybody signed in
- **Path parameters:** `bid` (integer)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/boards/{bid}/stats' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `board` | object |  |
| `board.id` | integer | `1` |
| `board.name` | string | `"ORB board"` |
| `board.type` | string | `"scrum"` |
| `board.quickFilters` | array |  |
| `board.swimlanes` | string | `"none"` |
| `board.project` | object |  |
| `board.project.workflow` | object |  |
| `board.project.id` | integer | `1` |
| `board.project.key` | string | `"ORB"` |
| `board.project.name` | string | `"Orbit Portal"` |
| `board.project.description` | string | `"Demo project Orbit Portal"` |
| `board.project.type` | string | `"scrum"` |
| `board.project.avatarColor` | string | `"#0052CC"` |
| `board.project.lead` | object |  |
| `board.project.boardId` | integer | `1` |
| `board.project.issueCount` | integer | `25` |
| `board.project.doneCount` | integer | `9` |
| `board.project.created` | string | `"2026-11-21T21:18:53Z"` |
| `board.project.iconUrl` | null | `null` |
| `board.project.may` | object |  |
| `board.projects` | array |  |
| `board.projects[].workflow` | object |  |
| `board.projects[].id` | integer | `1` |
| `board.projects[].key` | string | `"ORB"` |
| `board.projects[].name` | string | `"Orbit Portal"` |
| `board.projects[].description` | string | `"Demo project Orbit Portal"` |
| `board.projects[].type` | string | `"scrum"` |
| `board.projects[].avatarColor` | string | `"#0052CC"` |
| `board.projects[].lead` | object |  |
| `board.projects[].boardId` | integer | `1` |
| `board.projects[].issueCount` | integer | `25` |
| `board.projects[].doneCount` | integer | `9` |
| `board.projects[].created` | string | `"2026-11-21T21:18:53Z"` |
| `board.projects[].iconUrl` | null | `null` |
| `board.projects[].may` | object |  |
| `board.projectKeys` | array |  |
| `board.multiProject` | boolean | `false` |
| `board.columns` | array |  |
| `board.columns[].id` | integer | `1` |

<details><summary>Example answer</summary>

```json
{
  "board": {
    "id": 1,
    "name": "ORB board",
    "type": "scrum",
    "quickFilters": [],
    "swimlanes": "none",
    "project": {
      "workflow": {
        "id": 2,
        "name": "Default workflow"
      },
      "id": 1,
      "key": "ORB",
      "name": "Orbit Portal",
      "description": "Demo project Orbit Portal",
      "type": "scrum",
      "avatarColor": "#0052CC",
      "lead": {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "email": "marie.koch@example.invalid",
        "avatarColor": "#0052CC",
        "isAdmin": true,
        "active": true,
        "clockPrompt": true,
        "avatarUrl": null
      },
      "boardId": 1,
      "issueCount": 25,
      "doneCount": 9,
      "created": "2026-11-21T21:18:53Z",
      "iconUrl": null,
      "may": {
        "create": true,
        "edit": true,
        "manage": true,
        "transition": true,
        "assign": true
      }
    },
    "projects": [
      {
        "workflow": {
          "id": 2,
          "name": "Default workflow"
        },
        "id": 1,
        "key": "ORB",
        "name": "Orbit Portal",
        "description": "Demo project Orbit Portal",
        "type": "scrum",
        "avatarColor": "#0052CC",
        "lead": {
          "id": 1,
          "username": "mkoch",
          "displayName": "Marie Koch",
          "email": "marie.koch@example.invalid",
          "avatarColor": "#0052CC",
          "isAdmin": true,
          "active": true,
          "clockPrompt": true,
          "avatarUrl": null
        },
        "boardId": 1,
        "issueCount": 25,
        "doneCount": 9,
        "created": "2026-11-21T21:18:53Z",
        "iconUrl": null,
        "may": {
          "create": true,
          "edit": true,
          "manag
…
```

</details>

### `GET /api/boards/{bid}/velocity`

**Read velocity (board)**

- **Who may:** Anybody signed in
- **Path parameters:** `bid` (integer)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/boards/{bid}/velocity' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `sprints` | array |  |
| `sprints[].name` | string | `"Orbit Sprint 12"` |
| `sprints[].state` | string | `"closed"` |
| `sprints[].committed` | number | `21.0` |
| `sprints[].completed` | number | `21.0` |

<details><summary>Example answer</summary>

```json
{
  "sprints": [
    {
      "name": "Orbit Sprint 12",
      "state": "closed",
      "committed": 21.0,
      "completed": 21.0
    },
    {
      "name": "Orbit Sprint 13",
      "state": "closed",
      "committed": 10.0,
      "completed": 10.0
    },
    "…"
  ]
}
```

</details>


## Area: `bootstrap`

<a id="area-bootstrap"></a>

What the browser needs to start: the person signed in, projects, statuses, types, the features they may use.

### `GET /api/bootstrap`

**Read start data**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/bootstrap' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `instanceName` | string | `""` |
| `version` | string | `"5.1.2"` |
| `me` | object |  |
| `me.id` | integer | `6` |
| `me.username` | string | `"admin"` |
| `me.displayName` | string | `"Administrator"` |
| `me.email` | string | `""` |
| `me.avatarColor` | string | `"#007FA0"` |
| `me.isAdmin` | boolean | `true` |
| `me.active` | boolean | `true` |
| `me.clockPrompt` | boolean | `true` |
| `me.avatarUrl` | null | `null` |
| `me.hasPassword` | boolean | `true` |
| `me.mustChangePassword` | boolean | `false` |
| `me.lastLogin` | string | `"2026-11-21T21:18:53Z"` |
| `me.preferences` | object |  |
| `me.passkeys` | integer | `0` |
| `me.locked` | boolean | `false` |
| `users` | array |  |
| `users[].id` | integer | `6` |
| `users[].username` | string | `"admin"` |
| `users[].displayName` | string | `"Administrator"` |
| `users[].email` | string | `""` |
| `users[].avatarColor` | string | `"#007FA0"` |
| `users[].isAdmin` | boolean | `true` |
| `users[].active` | boolean | `true` |
| `users[].clockPrompt` | boolean | `true` |
| `users[].avatarUrl` | null | `null` |
| `users[].hasPassword` | boolean | `true` |
| `users[].mustChangePassword` | boolean | `false` |
| `users[].lastLogin` | string | `"2026-11-21T21:18:53Z"` |
| `users[].preferences` | object |  |
| `users[].passkeys` | integer | `0` |
| `users[].locked` | boolean | `false` |
| `projects` | array |  |
| `projects[].workflow` | object |  |
| `projects[].id` | integer | `3` |
| `projects[].key` | string | `"HLP"` |
| `projects[].name` | string | `"Helpdesk"` |
| `projects[].description` | string | `"Demo project Helpdesk"` |

<details><summary>Example answer</summary>

```json
{
  "instanceName": "",
  "version": "5.1.2",
  "me": {
    "id": 6,
    "username": "admin",
    "displayName": "Administrator",
    "email": "",
    "avatarColor": "#007FA0",
    "isAdmin": true,
    "active": true,
    "clockPrompt": true,
    "avatarUrl": null,
    "hasPassword": true,
    "mustChangePassword": false,
    "lastLogin": "2026-11-21T21:18:53Z",
    "preferences": {},
    "passkeys": 0,
    "locked": false
  },
  "users": [
    {
      "id": 6,
      "username": "admin",
      "displayName": "Administrator",
      "email": "",
      "avatarColor": "#007FA0",
      "isAdmin": true,
      "active": true,
      "clockPrompt": true,
      "avatarUrl": null,
      "hasPassword": true,
      "mustChangePassword": false,
      "lastLogin": "2026-11-21T21:18:53Z",
      "preferences": {},
      "passkeys": 0,
      "locked": false
    },
    {
      "id": 4,
      "username": "jnovak",
      "displayName": "Jan Novak",
      "email": "jan.novak@example.invalid",
      "avatarColor": "#5243AA",
      "isAdmin": false,
      "active": true,
      "clockPrompt": true,
      "avatarUrl": null,
      "hasPassword": false,
      "mustChangePassword": false,
      "lastLogin": null,
      "preferences": {},
      "passkeys": 0,
      "locked": false
    },
    "…"
  ],
  "projects": [
    {
      "workflow": {
        "id": 2,
        "name": "Default workflow"
      },
      "id": 3,
      "key": "HLP",
      "name": "Helpdesk",
      "description": "Demo project Helpdesk",
      "type": "kanban",
      "avatarColor": "#00875A",
      "lead": {
        "id": 3,
        "username": "lfrei",
        "displayName": "Lena Frei",
        "email": "lena.frei@example.invalid",
        "avatarColor": "#BF2600",
        "isAdmin": false,
        "active": true,
        "clock
…
```

</details>


## Area: `comments`

<a id="area-comments"></a>

Comments: changing and deleting them. New comments are added under the issue or page.

### `PUT /api/comments/{cid}`

**Change comment**

- **Who may:** Permission: `edit`
- **Path parameters:** `cid` (integer)

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/comments/{cid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.

### `DELETE /api/comments/{cid}`

**Delete comment**

- **Who may:** Permission: `edit`
- **Path parameters:** `cid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/comments/{cid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`


## Area: `custom-fields`

<a id="area-custom-fields"></a>

Custom fields: their definition, the values to choose from, where they appear.

### `GET /api/custom-fields`

**List custom fields**

Readable for anybody signed in - a form will need them later.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/custom-fields' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `fields` | array |  |
| `kinds` | object |  |
| `kinds.text` | string | `"One line of text"` |
| `kinds.textarea` | string | `"Several lines of text"` |
| `kinds.number` | string | `"A number"` |
| `kinds.date` | string | `"A date"` |
| `kinds.select` | string | `"One of a list"` |
| `kinds.multiselect` | string | `"Several from a list"` |
| `kinds.checkbox` | string | `"Yes or no"` |
| `kinds.user` | string | `"A person"` |
| `kinds.url` | string | `"A link"` |

<details><summary>Example answer</summary>

```json
{
  "fields": [],
  "kinds": {
    "text": "One line of text",
    "textarea": "Several lines of text",
    "number": "A number",
    "date": "A date",
    "select": "One of a list",
    "multiselect": "Several from a list",
    "checkbox": "Yes or no",
    "user": "A person",
    "url": "A link"
  }
}
```

</details>

### `POST /api/custom-fields`

**Create custom field**

- **Who may:** Administrators
- **JSON body:** `name`, `kind`, `key`, `options`, `description`, `required`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/custom-fields' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "kind": "…", "key": "…", "options": "…", "description": "…", "required": "…"}'
```

**Returns**

The same as `GET /api/custom-fields`.

### `POST /api/custom-fields/order`

**Send order**

- **Who may:** Administrators
- **JSON body:** `ids`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/custom-fields/order' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"ids": "…"}'
```

**Returns**

`ok`

### `PUT /api/custom-fields/{fid}`

**Change custom field**

- **Who may:** Administrators
- **Path parameters:** `fid` (integer)
- **JSON body:** `kind`, `options`, `name`, `description`, `required`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/custom-fields/{fid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"kind": "…", "options": "…", "name": "…", "description": "…", "required": "…"}'
```

**Returns**

JSON.

### `DELETE /api/custom-fields/{fid}`

**Delete custom field**

- **Who may:** Administrators
- **Path parameters:** `fid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/custom-fields/{fid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`


## Area: `dashboard`

<a id="area-dashboard"></a>

The start page of a person: what is waiting for them.

### `GET /api/dashboard`

**Read dashboard**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/dashboard' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `assigned` | array |  |
| `reported` | array |  |
| `recent` | array |  |
| `recent[].id` | integer | `23` |
| `recent[].key` | string | `"ORB-23"` |
| `recent[].seq` | integer | `23` |
| `recent[].summary` | string | `"Prepare screenshots"` |
| `recent[].description` | string | `""` |
| `recent[].descriptionHtml` | null | `null` |
| `recent[].flagged` | boolean | `false` |
| `recent[].project` | object |  |
| `recent[].type` | object |  |
| `recent[].status` | object |  |
| `recent[].priority` | object |  |
| `recent[].assignee` | object |  |
| `recent[].reporter` | object |  |
| `recent[].sprint` | object |  |
| `recent[].epic` | null | `null` |
| `recent[].parent` | object |  |
| `recent[].storyPoints` | null | `null` |
| `recent[].labels` | array |  |
| `recent[].components` | array |  |
| `recent[].fixVersion` | string | `""` |
| `recent[].epicColor` | string | `"#6554C0"` |
| `recent[].rank` | number | `24000.0` |
| `recent[].dueDate` | null | `null` |
| `recent[].releaseDate` | null | `null` |
| `recent[].bitbucketProject` | null | `null` |
| `recent[].participants` | array |  |
| `recent[].bitbucketRepo` | null | `null` |
| `recent[].startDate` | null | `null` |
| `recent[].disturbanceSprintId` | null | `null` |
| `recent[].sourceKey` | null | `null` |
| `recent[].releaseDescription` | string | `""` |
| `recent[].releaseDescriptionHtml` | null | `null` |
| `recent[].endDate` | null | `null` |
| `recent[].estimate` | null | `null` |
| `recent[].timeLeft` | null | `null` |
| `recent[].progress` | null | `null` |
| `recent[].created` | string | `"2026-11-13T21:18:53Z"` |

<details><summary>Example answer</summary>

```json
{
  "assigned": [],
  "reported": [],
  "recent": [
    {
      "id": 23,
      "key": "ORB-23",
      "seq": 23,
      "summary": "Prepare screenshots",
      "description": "",
      "descriptionHtml": null,
      "flagged": false,
      "project": {
        "id": 1,
        "key": "ORB",
        "name": "Orbit Portal",
        "color": "#0052CC"
      },
      "type": {
        "id": 5,
        "name": "Sub-task",
        "icon": "subtask",
        "color": "#4BADE8",
        "subtask": true
      },
      "status": {
        "id": 1,
        "name": "To Do",
        "category": "todo"
      },
      "priority": {
        "id": 3,
        "name": "Medium",
        "icon": "eq",
        "color": "#E97F33"
      },
      "assignee": {
        "id": 2,
        "username": "tbauer",
        "displayName": "Tom Bauer",
        "avatarColor": "#00875A",
        "active": true
      },
      "reporter": {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "avatarColor": "#0052CC",
        "active": true
      },
      "sprint": {
        "id": 3,
        "name": "Orbit Sprint 14",
        "state": "active"
      },
      "epic": null,
      "parent": {
        "id": 7,
        "key": "ORB-7",
        "summary": "Listing text for the first tool"
      },
      "storyPoints": null,
      "labels": [],
      "components": [],
      "fixVersion": "",
      "epicColor": "#6554C0",
      "rank": 24000.0,
      "dueDate": null,
      "releaseDate": null,
      "bitbucketProject": null
    },
    {
      "id": 25,
      "key": "ORB-25",
      "seq": 25,
      "summary": "Legal review",
      "description": "",
      "descriptionHtml": null,
      "flagged": false,
      "project": {
        "id": 1,
        "key": "ORB",
        "name": "Orbi
…
```

</details>


## Area: `dashboards`

<a id="area-dashboards"></a>

Dashboards with gadgets: creating, sharing, arranging.

### `GET /api/dashboards`

**List dashboards**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/dashboards' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `dashboards` | array |  |
| `dashboards[].id` | integer | `1` |
| `dashboards[].name` | string | `"Team overview"` |
| `dashboards[].shared` | string | `"read"` |
| `dashboards[].layout` | array |  |
| `dashboards[].owner` | object |  |
| `dashboards[].shares` | array |  |
| `dashboards[].permission` | string | `"owner"` |
| `dashboards[].canEdit` | boolean | `true` |
| `dashboards[].isOwner` | boolean | `true` |
| `dashboards[].created` | string | `"2026-11-21T21:18:53Z"` |
| `dashboards[].updated` | null | `null` |
| `lastId` | null | `null` |

<details><summary>Example answer</summary>

```json
{
  "dashboards": [
    {
      "id": 1,
      "name": "Team overview",
      "shared": "read",
      "layout": [
        {
          "id": "g1",
          "type": "stats",
          "size": "full"
        },
        {
          "id": "g2",
          "type": "assigned",
          "size": "half",
          "title": "Assigned to me"
        },
        "…"
      ],
      "owner": {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "email": "marie.koch@example.invalid",
        "avatarColor": "#0052CC",
        "isAdmin": true,
        "active": true,
        "clockPrompt": true,
        "avatarUrl": null
      },
      "shares": [
        {
          "userId": 2,
          "displayName": "Tom Bauer",
          "avatarColor": "#00875A",
          "permission": "edit"
        }
      ],
      "permission": "owner",
      "canEdit": true,
      "isOwner": true,
      "created": "2026-11-21T21:18:53Z",
      "updated": null
    }
  ],
  "lastId": null
}
```

</details>

### `POST /api/dashboards`

**Create dashboard**

- **Who may:** Anybody signed in
- **JSON body:** `name`, `layout`, `copyFrom`, `shared`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/dashboards' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "layout": "…", "copyFrom": "…", "shared": "…"}'
```

**Returns**

The same as `GET /api/dashboards`.

### `GET /api/dashboards/current`

**List current ones**

The dashboard last opened by this person, or a sensible fallback.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/dashboards/current' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `id` | integer | `1` |
| `name` | string | `"Team overview"` |
| `shared` | string | `"read"` |
| `layout` | array |  |
| `layout[].id` | string | `"g1"` |
| `layout[].type` | string | `"stats"` |
| `layout[].size` | string | `"full"` |
| `owner` | object |  |
| `owner.id` | integer | `1` |
| `owner.username` | string | `"mkoch"` |
| `owner.displayName` | string | `"Marie Koch"` |
| `owner.email` | string | `"marie.koch@example.invalid"` |
| `owner.avatarColor` | string | `"#0052CC"` |
| `owner.isAdmin` | boolean | `true` |
| `owner.active` | boolean | `true` |
| `owner.clockPrompt` | boolean | `true` |
| `owner.avatarUrl` | null | `null` |
| `shares` | array |  |
| `shares[].userId` | integer | `2` |
| `shares[].displayName` | string | `"Tom Bauer"` |
| `shares[].avatarColor` | string | `"#00875A"` |
| `shares[].permission` | string | `"edit"` |
| `permission` | string | `"owner"` |
| `canEdit` | boolean | `true` |
| `isOwner` | boolean | `true` |
| `created` | string | `"2026-11-21T21:18:53Z"` |
| `updated` | null | `null` |

<details><summary>Example answer</summary>

```json
{
  "id": 1,
  "name": "Team overview",
  "shared": "read",
  "layout": [
    {
      "id": "g1",
      "type": "stats",
      "size": "full"
    },
    {
      "id": "g2",
      "type": "assigned",
      "size": "half",
      "title": "Assigned to me"
    },
    "…"
  ],
  "owner": {
    "id": 1,
    "username": "mkoch",
    "displayName": "Marie Koch",
    "email": "marie.koch@example.invalid",
    "avatarColor": "#0052CC",
    "isAdmin": true,
    "active": true,
    "clockPrompt": true,
    "avatarUrl": null
  },
  "shares": [
    {
      "userId": 2,
      "displayName": "Tom Bauer",
      "avatarColor": "#00875A",
      "permission": "edit"
    }
  ],
  "permission": "owner",
  "canEdit": true,
  "isOwner": true,
  "created": "2026-11-21T21:18:53Z",
  "updated": null
}
```

</details>

### `GET /api/dashboards/{did}`

**Read dashboard**

- **Who may:** Anybody signed in
- **Path parameters:** `did` (integer)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/dashboards/{did}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `id` | integer | `1` |
| `name` | string | `"Team overview"` |
| `shared` | string | `"read"` |
| `layout` | array |  |
| `layout[].id` | string | `"g1"` |
| `layout[].type` | string | `"stats"` |
| `layout[].size` | string | `"full"` |
| `owner` | object |  |
| `owner.id` | integer | `1` |
| `owner.username` | string | `"mkoch"` |
| `owner.displayName` | string | `"Marie Koch"` |
| `owner.email` | string | `"marie.koch@example.invalid"` |
| `owner.avatarColor` | string | `"#0052CC"` |
| `owner.isAdmin` | boolean | `true` |
| `owner.active` | boolean | `true` |
| `owner.clockPrompt` | boolean | `true` |
| `owner.avatarUrl` | null | `null` |
| `shares` | array |  |
| `shares[].userId` | integer | `2` |
| `shares[].displayName` | string | `"Tom Bauer"` |
| `shares[].avatarColor` | string | `"#00875A"` |
| `shares[].permission` | string | `"edit"` |
| `permission` | string | `"owner"` |
| `canEdit` | boolean | `true` |
| `isOwner` | boolean | `true` |
| `created` | string | `"2026-11-21T21:18:53Z"` |
| `updated` | null | `null` |

<details><summary>Example answer</summary>

```json
{
  "id": 1,
  "name": "Team overview",
  "shared": "read",
  "layout": [
    {
      "id": "g1",
      "type": "stats",
      "size": "full"
    },
    {
      "id": "g2",
      "type": "assigned",
      "size": "half",
      "title": "Assigned to me"
    },
    "…"
  ],
  "owner": {
    "id": 1,
    "username": "mkoch",
    "displayName": "Marie Koch",
    "email": "marie.koch@example.invalid",
    "avatarColor": "#0052CC",
    "isAdmin": true,
    "active": true,
    "clockPrompt": true,
    "avatarUrl": null
  },
  "shares": [
    {
      "userId": 2,
      "displayName": "Tom Bauer",
      "avatarColor": "#00875A",
      "permission": "edit"
    }
  ],
  "permission": "owner",
  "canEdit": true,
  "isOwner": true,
  "created": "2026-11-21T21:18:53Z",
  "updated": null
}
```

</details>

### `PUT /api/dashboards/{did}`

**Change dashboard**

- **Who may:** Permission: `manageDashboards`
- **Path parameters:** `did` (integer)
- **JSON body:** `layout`, `name`, `shared`, `shares`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/dashboards/{did}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"layout": "…", "name": "…", "shared": "…", "shares": "…"}'
```

**Returns**

The same as `GET /api/dashboards/{did}`.

### `DELETE /api/dashboards/{did}`

**Delete dashboard**

- **Who may:** Anybody signed in
- **Path parameters:** `did` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/dashboards/{did}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`


## Area: `default-workflows`

<a id="area-default-workflows"></a>

Which workflow a new project gets for each issue type.

### `GET /api/default-workflows`

**List default workflows**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/default-workflows' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `types` | array |  |
| `types[].id` | integer | `1` |
| `types[].name` | string | `"Epic"` |
| `types[].icon` | string | `"epic"` |
| `types[].color` | string | `"#904EE2"` |
| `types[].subtask` | boolean | `false` |
| `types[].workflowId` | null | `null` |
| `workflows` | array |  |
| `workflows[].id` | integer | `2` |
| `workflows[].name` | string | `"Default workflow"` |
| `workflows[].isDefault` | boolean | `true` |
| `fallback` | object |  |
| `fallback.id` | integer | `2` |
| `fallback.name` | string | `"Default workflow"` |

<details><summary>Example answer</summary>

```json
{
  "types": [
    {
      "id": 1,
      "name": "Epic",
      "icon": "epic",
      "color": "#904EE2",
      "subtask": false,
      "workflowId": null
    },
    {
      "id": 2,
      "name": "Story",
      "icon": "story",
      "color": "#63BA3C",
      "subtask": false,
      "workflowId": null
    },
    "…"
  ],
  "workflows": [
    {
      "id": 2,
      "name": "Default workflow",
      "isDefault": true
    },
    {
      "id": 1,
      "name": "Software delivery",
      "isDefault": false
    }
  ],
  "fallback": {
    "id": 2,
    "name": "Default workflow"
  }
}
```

</details>

### `PUT /api/default-workflows`

**Change default workflows**

- **Who may:** Administrators
- **JSON body:** `types`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/default-workflows' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"types": "…"}'
```

**Returns**

`types`


## Area: `filters`

<a id="area-filters"></a>

Saved filters: an MQL query with a name, shared or private.

### `GET /api/filters`

**List saved filters**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/filters' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `[].id` | integer | `2` |
| `[].name` | string | `"All bugs"` |
| `[].mql` | string | `"type = Bug ORDER BY created DESC"` |
| `[].owner_id` | integer | `1` |
| `[].created` | string | `"2026-11-21T21:18:53Z"` |

<details><summary>Example answer</summary>

```json
[
  {
    "id": 2,
    "name": "All bugs",
    "mql": "type = Bug ORDER BY created DESC",
    "owner_id": 1,
    "created": "2026-11-21T21:18:53Z"
  },
  {
    "id": 1,
    "name": "My open issues",
    "mql": "assignee = currentUser() AND statusCategory != done ORDER BY priority",
    "owner_id": 1,
    "created": "2026-11-21T21:18:53Z"
  }
]
```

</details>

### `POST /api/filters`

**Create saved filter**

- **Who may:** Anybody signed in
- **JSON body:** `name`, `mql`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/filters' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "mql": "…"}'
```

**Returns**

The same as `GET /api/filters`.

### `DELETE /api/filters/{fid}`

**Delete saved filter**

Filters are seen by everybody (boards and dashboards are built on them) - deleted only by the one
who saved it, or an administrator. There was no check: anybody could delete anybody's filter, and the
boards and gadgets built on it with it.

- **Who may:** Anybody signed in
- **Path parameters:** `fid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/filters/{fid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`


## Area: `gadgets`

<a id="area-gadgets"></a>

The data behind one gadget of a dashboard.

### `GET /api/gadgets/{kind}`

**Read gadget**

Data for one dashboard gadget.

- **Who may:** Anybody signed in
- **Path parameters:** `kind` (string)
- **Query parameters:** `limit` (int, default 8), `mql` (string, default ""), `group` (string, default "status"), `project` (string, default "")

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/gadgets/{kind}?limit=…&mql=…&group=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`issues`, `total`, `items`


## Area: `global-permissions`

<a id="area-global-permissions"></a>

General permissions: who may create projects, see everybody's time, use the AI and more.

### `GET /api/global-permissions`

**List general permissions**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/global-permissions' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `permissions` | array |  |
| `permissions[].key` | string | `"createProject"` |
| `permissions[].label` | string | `"Create projects"` |
| `permissions[].legacyGroup` | null | `null` |
| `permissions[].grants` | array |  |
| `groups` | array |  |
| `groups[].id` | integer | `1` |
| `groups[].name` | string | `"Developers"` |
| `users` | array |  |
| `users[].id` | integer | `6` |
| `users[].displayName` | string | `"Administrator"` |

<details><summary>Example answer</summary>

```json
{
  "permissions": [
    {
      "key": "createProject",
      "label": "Create projects",
      "legacyGroup": null,
      "grants": []
    },
    {
      "key": "manageProjects",
      "label": "Change any project's settings",
      "legacyGroup": null,
      "grants": []
    },
    "…"
  ],
  "groups": [
    {
      "id": 1,
      "name": "Developers"
    },
    {
      "id": 5,
      "name": "helpdesk-agent"
    },
    "…"
  ],
  "users": [
    {
      "id": 6,
      "displayName": "Administrator"
    },
    {
      "id": 4,
      "displayName": "Jan Novak"
    },
    "…"
  ]
}
```

</details>

### `PUT /api/global-permissions`

**Change general permissions**

- **Who may:** Administrators
- **JSON body:** `permission`, `grants`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/global-permissions' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"permission": "…", "grants": "…"}'
```

**Returns**

`permission`


## Area: `groups`

<a id="area-groups"></a>

Groups of people, and who is in them.

### `GET /api/groups`

**List groups**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/groups' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `[].id` | integer | `1` |
| `[].name` | string | `"Developers"` |
| `[].description` | string | `"Everyone who works on the products"` |
| `[].created` | string | `"2026-11-21T21:18:53Z"` |
| `[].members` | array |  |
| `[].members[].id` | integer | `4` |
| `[].members[].username` | string | `"jnovak"` |
| `[].members[].displayName` | string | `"Jan Novak"` |
| `[].members[].email` | string | `"jan.novak@example.invalid"` |
| `[].members[].avatarColor` | string | `"#5243AA"` |
| `[].members[].isAdmin` | boolean | `false` |
| `[].members[].active` | boolean | `true` |
| `[].members[].clockPrompt` | boolean | `true` |
| `[].members[].avatarUrl` | null | `null` |

<details><summary>Example answer</summary>

```json
[
  {
    "id": 1,
    "name": "Developers",
    "description": "Everyone who works on the products",
    "created": "2026-11-21T21:18:53Z",
    "members": [
      {
        "id": 4,
        "username": "jnovak",
        "displayName": "Jan Novak",
        "email": "jan.novak@example.invalid",
        "avatarColor": "#5243AA",
        "isAdmin": false,
        "active": true,
        "clockPrompt": true,
        "avatarUrl": null
      },
      {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "email": "marie.koch@example.invalid",
        "avatarColor": "#0052CC",
        "isAdmin": true,
        "active": true,
        "clockPrompt": true,
        "avatarUrl": null
      },
      "…"
    ]
  },
  {
    "id": 5,
    "name": "helpdesk-agent",
    "description": "May look into the connected service desk and bring tickets over.",
    "created": "2026-11-21T21:18:53Z",
    "members": []
  },
  "…"
]
```

</details>

### `POST /api/groups`

**Create group**

- **Who may:** Administrators
- **JSON body:** `name`, `description`, `memberIds`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/groups' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "memberIds": "…"}'
```

**Returns**

The same as `GET /api/groups`.

### `PUT /api/groups/{gid}`

**Change group**

- **Who may:** Administrators
- **Path parameters:** `gid` (integer)
- **JSON body:** `name`, `description`, `memberIds`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/groups/{gid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "memberIds": "…"}'
```

**Returns**

JSON.

### `DELETE /api/groups/{gid}`

**Delete group**

- **Who may:** Administrators
- **Path parameters:** `gid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/groups/{gid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`


## Area: `health`

<a id="area-health"></a>

For monitoring: whether the service answers, and in detail how it stands.

### `GET /api/health`

**Read health check**

Is the service there at all - the question a load balancer asks.

Deliberately thin: the details live one level down, so that something a
monitoring system wants to see cannot make a deployment or a balancer
believe the service is unwell.

- **Who may:** No sign-in needed

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/health' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `status` | string | `"ok"` |
| `product` | string | `"mgproject"` |
| `version` | string | `"5.1.2"` |

<details><summary>Example answer</summary>

```json
{
  "status": "ok",
  "product": "mgproject",
  "version": "5.1.2"
}
```

</details>

### `GET /api/health/details`

**Read details**

For monitoring: answers to an administrator, or to the server itself.

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/health/details' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `status` | string | `"degraded"` |
| `version` | string | `"5.1.2"` |
| `instance` | string | `""` |
| `checks` | object |  |
| `checks.database` | object |  |
| `checks.database.ok` | boolean | `true` |
| `checks.database.backend` | string | `"postgres"` |
| `checks.database.latencyMs` | number | `8.1` |
| `checks.migrations` | object |  |
| `checks.migrations.ok` | boolean | `true` |
| `checks.migrations.current` | integer | `14` |
| `checks.migrations.latest` | integer | `14` |
| `checks.backgroundJobs` | object |  |
| `checks.backgroundJobs.ok` | boolean | `false` |
| `checks.backgroundJobs.leaseUntil` | null | `null` |
| `checks.backgroundJobs.holder` | null | `null` |
| `checks.backgroundJobs.note` | string | `"no background process has reported yet"` |
| `checks.licence` | object |  |
| `checks.licence.ok` | boolean | `true` |
| `checks.disk` | object |  |
| `checks.disk.ok` | boolean | `true` |
| `checks.disk.freeMb` | integer | `85617` |

<details><summary>Example answer</summary>

```json
{
  "status": "degraded",
  "version": "5.1.2",
  "instance": "",
  "checks": {
    "database": {
      "ok": true,
      "backend": "postgres",
      "latencyMs": 8.1
    },
    "migrations": {
      "ok": true,
      "current": 14,
      "latest": 14
    },
    "backgroundJobs": {
      "ok": false,
      "leaseUntil": null,
      "holder": null,
      "note": "no background process has reported yet"
    },
    "licence": {
      "ok": true
    },
    "disk": {
      "ok": true,
      "freeMb": 85617
    }
  }
}
```

</details>


## Area: `helpdesk`

<a id="area-helpdesk"></a>

Tickets of the connected helpdesk, shown in a project.

### `GET /api/helpdesk/tickets`

**List tickets**

The service desk tickets, for the agents.

Two boundaries: the desks ticked in the settings, and membership of the
helpdesk group - customer tickets are not for everybody with a login.

- **Who may:** Anybody signed in
- **Query parameters:** `source` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/helpdesk/tickets?source=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`tickets`, `site`, `sources`, `atlassian`, `mgservice`, `warnings`


## Area: `issue-types`

<a id="area-issue-types"></a>

Issue types: Bug, Task, Story and your own, with their icons.

### `POST /api/issue-types/move`

**Move – issue type**

Change issues from one type to another, in one project or in all of them.

- **Who may:** Administrators
- **JSON body:** `fromTypeId`, `toTypeId`, `project`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issue-types/move' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"fromTypeId": "…", "toTypeId": "…", "project": "…"}'
```

**Returns**

`moved`, `scope`, `from`, `to`

### `PUT /api/issue-types/{tid}`

**Change issue type**

Rename a type or change its colour.

- **Who may:** Administrators
- **Path parameters:** `tid` (integer)
- **JSON body:** `name`, `color`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/issue-types/{tid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "color": "…"}'
```

**Returns**

JSON.

### `DELETE /api/issue-types/{tid}`

**Delete issue type**

Remove a type nothing uses any more.

- **Who may:** Administrators
- **Path parameters:** `tid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/issue-types/{tid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`


## Area: `issues`

<a id="area-issues"></a>

Issues (tickets): creating, reading, changing, moving through the workflow, comments, worklogs, links, attachments, watchers and history.

### `POST /api/issues`

**Create issue**

- **Who may:** Permission: `create`, `attach`
- **JSON body:** `project`, `projectId`, `summary`, `uploads`, `typeId`, `type`, `statusId`, `status`, `priorityId`, `priority`, `description`, `assigneeId`, `reporterId`, `parentId`, `epicId`, `sprintId`, `storyPoints`, `labels`, `components`, `fixVersion`, `epicColor`, `dueDate`, `estimate`, `releaseDescription`, `descriptionHtml`, `releaseDescriptionHtml`, `disturbanceSprintId`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"project": "…", "projectId": "…", "summary": "…", "uploads": "…", "typeId": "…", "type": "…", "statusId": "…", "status": "…"}'
```

**Returns**

JSON.

### `POST /api/issues/bulk`

**Change several at once – issue**

Change many tickets at once - giving away the tickets of somebody who
has left, moving a batch to another status.

Built for thousands. The batch is read in one query; a permission is
asked once per project, and per ticket only where the project does not
grant it outright (being the assignee or the reporter can); the changes
and their history are written in one transaction. Before, every ticket
was read in full, checked from scratch and committed twice on its own -
some eight thousand commits for four thousand tickets.

- **Who may:** Anybody signed in
- **JSON body:** `keys`, `changes`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/bulk' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"keys": "…", "changes": "…"}'
```

**Returns**

`updated`, `refused`

### `POST /api/issues/import-from-jsm`

**Import from Jira Service Management – issue**

Bring chosen tickets in as disturbances of one sprint.

The reporter becomes whoever is doing the import, because the person who
raised the ticket has no account here; their name goes into a comment so the
origin is not lost. A ticket already imported is skipped rather than
duplicated.

- **Who may:** Permission: `create`
- **JSON body:** `source`, `keys`, `project`, `sprintId`, `epicId`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/import-from-jsm' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"source": "…", "keys": "…", "project": "…", "sprintId": "…", "epicId": "…"}'
```

**Returns**

`created`, `skipped`

### `GET /api/issues/{key}`

**Read issue**

- **Who may:** Permission: `browse`
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/issues/{key}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `id` | integer | `1` |
| `key` | string | `"ORB-1"` |
| `seq` | integer | `1` |
| `summary` | string | `"Collection based licensing"` |
| `description` | string | `"Move licensing from per-app to collection based entitlement` |
| `descriptionHtml` | null | `null` |
| `flagged` | boolean | `false` |
| `project` | object |  |
| `project.id` | integer | `1` |
| `project.key` | string | `"ORB"` |
| `project.name` | string | `"Orbit Portal"` |
| `project.color` | string | `"#0052CC"` |
| `type` | object |  |
| `type.id` | integer | `1` |
| `type.name` | string | `"Epic"` |
| `type.icon` | string | `"epic"` |
| `type.color` | string | `"#904EE2"` |
| `type.subtask` | boolean | `false` |
| `status` | object |  |
| `status.id` | integer | `2` |
| `status.name` | string | `"In Progress"` |
| `status.category` | string | `"inprogress"` |
| `priority` | object |  |
| `priority.id` | integer | `2` |
| `priority.name` | string | `"High"` |
| `priority.icon` | string | `"up"` |
| `priority.color` | string | `"#E9494A"` |
| `assignee` | object |  |
| `assignee.id` | integer | `1` |
| `assignee.username` | string | `"mkoch"` |
| `assignee.displayName` | string | `"Marie Koch"` |
| `assignee.avatarColor` | string | `"#0052CC"` |
| `assignee.active` | boolean | `true` |
| `reporter` | object |  |
| `reporter.id` | integer | `1` |
| `reporter.username` | string | `"mkoch"` |
| `reporter.displayName` | string | `"Marie Koch"` |
| `reporter.avatarColor` | string | `"#0052CC"` |
| `reporter.active` | boolean | `true` |
| `sprint` | null | `null` |

<details><summary>Example answer</summary>

```json
{
  "id": 1,
  "key": "ORB-1",
  "seq": 1,
  "summary": "Collection based licensing",
  "description": "Move licensing from per-app to collection based entitlements.",
  "descriptionHtml": null,
  "flagged": false,
  "project": {
    "id": 1,
    "key": "ORB",
    "name": "Orbit Portal",
    "color": "#0052CC"
  },
  "type": {
    "id": 1,
    "name": "Epic",
    "icon": "epic",
    "color": "#904EE2",
    "subtask": false
  },
  "status": {
    "id": 2,
    "name": "In Progress",
    "category": "inprogress"
  },
  "priority": {
    "id": 2,
    "name": "High",
    "icon": "up",
    "color": "#E9494A"
  },
  "assignee": {
    "id": 1,
    "username": "mkoch",
    "displayName": "Marie Koch",
    "avatarColor": "#0052CC",
    "active": true
  },
  "reporter": {
    "id": 1,
    "username": "mkoch",
    "displayName": "Marie Koch",
    "avatarColor": "#0052CC",
    "active": true
  },
  "sprint": null,
  "epic": null,
  "parent": null,
  "storyPoints": null,
  "labels": [
    "licensing"
  ],
  "components": [],
  "fixVersion": "",
  "epicColor": "#904EE2",
  "rank": 2000.0,
  "dueDate": null,
  "releaseDate": null,
  "bitbucketProject": null
}
```

</details>

### `PUT /api/issues/{key}`

**Change issue**

- **Who may:** Permission: `edit`, `transition`, `assign`
- **Path parameters:** `key` (string)
- **JSON body:** `epicId`, `assigneeId`, `description`, `releaseDescription`, `statusId`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/issues/{key}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"epicId": "…", "assigneeId": "…", "description": "…", "releaseDescription": "…", "statusId": "…"}'
```

**Returns**

`status`, `statusId`, `questions`

### `DELETE /api/issues/{key}`

**Delete issue**

- **Who may:** Permission: `delete`
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/issues/{key}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `GET /api/issues/{key}/attachments`

**List attachments (issue)**

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/issues/{key}/attachments' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

```json
[]
```

### `POST /api/issues/{key}/attachments`

**Create attachment (issue)**

- **Who may:** Permission: `attach`
- **Path parameters:** `key` (string)
- **JSON body:** `(multipart form: file)`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/attachments' \
  -H 'Authorization: Bearer $TOKEN' \
  -F 'file=@/path/to/file'
```

**Returns**

The same as `GET /api/issues/{key}/attachments`.

### `POST /api/issues/{key}/comments`

**Create comment (issue)**

- **Who may:** Permission: `comment`
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/comments' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.

### `GET /api/issues/{key}/creation-questions`

**List questions when creating (issue)**

Rules that want to ask something about an issue just created.

A question needs somebody at a screen, so it cannot be answered while the
issue is being written. The issue exists first, then it is asked, then the
answer runs the rule - which is why a "no" simply leaves the issue as it is.

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/issues/{key}/creation-questions' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `questions` | array |  |
| `questions[].id` | string | `"rule:3"` |
| `questions[].question` | string | `"Create a QA ticket inside this epic?"` |
| `questions[].affects` | integer | `1` |
| `questions[].keys` | array |  |

<details><summary>Example answer</summary>

```json
{
  "questions": [
    {
      "id": "rule:3",
      "question": "Create a QA ticket inside this epic?",
      "affects": 1,
      "keys": [
        "ORB-1"
      ]
    }
  ]
}
```

</details>

### `POST /api/issues/{key}/creation-questions`

**Create question when creating (issue)**

- **Who may:** Permission: `edit`
- **Path parameters:** `key` (string)
- **JSON body:** `answers`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/creation-questions' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"answers": "…"}'
```

**Returns**

`ran`

### `GET /api/issues/{key}/delete-questions`

**List questions when deleting (issue)**

What a rule wants to know before this issue goes.

Asked beforehand, unlike everything else: once the issue is deleted there is
nothing left to ask about, and an answer of "no" has to leave the children
standing.

- **Who may:** Permission: `delete`
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/issues/{key}/delete-questions' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `questions` | array |  |
| `questions[].id` | string | `"rule:2"` |
| `questions[].question` | string | `"Delete everything below this issue as well?"` |
| `questions[].affects` | integer | `1` |
| `questions[].keys` | array |  |
| `children` | array |  |

<details><summary>Example answer</summary>

```json
{
  "questions": [
    {
      "id": "rule:2",
      "question": "Delete everything below this issue as well?",
      "affects": 1,
      "keys": [
        "ORB-1"
      ]
    }
  ],
  "children": [
    "ORB-15",
    "ORB-16",
    "…"
  ]
}
```

</details>

### `POST /api/issues/{key}/duplicate`

**Duplicate – issue**

A copy of an issue, here or in another project.

Copied: summary, description, type, priority, labels, estimate, story
points, due date, the custom fields - and on request the sub-tasks and the
attachments, whose files are copied rather than shared. Not copied:
comments, history, work logs and the assignee. The copy starts at the
beginning of its workflow and is linked to the original as "clones".

- **Who may:** Permission: `duplicateIssues`, `browse`
- **Path parameters:** `key` (string)
- **JSON body:** `withAttachments`, `withSubtasks`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/duplicate' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"withAttachments": "…", "withSubtasks": "…"}'
```

**Returns**

`key`, `project`

### `GET /api/issues/{key}/fields`

**List fields (issue)**

The custom fields this issue's form has, with whatever is in them.

- **Who may:** Permission: `browse`
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/issues/{key}/fields' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `scheme` | string | `"Default screen"` |
| `fields` | array |  |

<details><summary>Example answer</summary>

```json
{
  "scheme": "Default screen",
  "fields": []
}
```

</details>

### `PUT /api/issues/{key}/fields`

**Change fields (issue)**

- **Who may:** Permission: `edit`
- **Path parameters:** `key` (string)
- **JSON body:** `values`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/issues/{key}/fields' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"values": "…"}'
```

**Returns**

`ok`

### `POST /api/issues/{key}/links`

**Create link (issue)**

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)
- **JSON body:** `target`, `type`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/links' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"target": "…", "type": "…"}'
```

**Returns**

`ok`

### `POST /api/issues/{key}/move`

**Move – issue**

Move an issue, with its sub-tasks, to another project.

It takes the next key there; the old key keeps leading to it. Status, type
and sprint stay where the new project allows them, otherwise they start
over; components and the fix version belong to the old project and go.

- **Who may:** Permission: `moveIssues`, `edit`
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/move' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`key`, `moved`, `project`

### `POST /api/issues/{key}/move-sprint`

**Move to another sprint – issue**

Move an issue to another sprint or back to the backlog.

- **Who may:** Permission: `edit`
- **Path parameters:** `key` (string)
- **JSON body:** `sprintId`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/move-sprint' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"sprintId": "…"}'
```

**Returns**

JSON.

### `PUT /api/issues/{key}/participants`

**Change participants (issue)**

Who is helping on this issue.

The whole list is given at once rather than added and removed one by one: the
field is edited as a set, and a half-applied change would be worse than none.

Anybody who may edit the issue may say who helps. Participants themselves get
no more rights than they had - they support the assignee, and the status stays
the assignee's to move.

- **Who may:** Permission: `edit`
- **Path parameters:** `key` (string)
- **JSON body:** `userIds`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/issues/{key}/participants' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"userIds": "…"}'
```

**Returns**

`participants`

### `POST /api/issues/{key}/rank`

**Rank – issue**

Move an issue between two neighbours and optionally into another sprint.

- **Who may:** Permission: `edit`, `transition`
- **Path parameters:** `key` (string)
- **JSON body:** `beforeId`, `afterId`, `statusId`, `sprintId`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/rank' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"beforeId": "…", "afterId": "…", "statusId": "…", "sprintId": "…"}'
```

**Returns**

JSON.

### `POST /api/issues/{key}/refresh-from-jsm`

**Refresh from Jira Service Management – issue**

Pull what changed in the service desk since the import.

Only while the issue is still open here: once it is done, changes over there
are somebody else's business and would reopen a finished record.

- **Who may:** Permission: `edit`
- **Path parameters:** `key` (string)
- **Query parameters:** `source` (string)

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/refresh-from-jsm?source=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`issue`, `comments`, `attachments`, `changed`, `pending`, `sourceStatus`

### `POST /api/issues/{key}/split`

**Split – issue**

Carry the unfinished part of an issue into the next sprint.

The original stays where it is and is marked as split, so the sprint keeps
its record of what happened. The remainder becomes a new issue with the
estimate that is still open.

- **Who may:** Permission: `create`, `edit`
- **Path parameters:** `key` (string)
- **JSON body:** `sprintId`, `estimate`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/split' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"sprintId": "…", "estimate": "…"}'
```

**Returns**

`original`, `copy`

### `GET /api/issues/{key}/sprint-targets`

**List sprint targets (issue)**

Where this issue may be moved or split to.

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/issues/{key}/sprint-targets' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `current` | null | `null` |
| `sprints` | array |  |
| `sprints[].id` | integer | `5` |
| `sprints[].name` | string | `"Delivery Sprint 3"` |
| `sprints[].state` | string | `"active"` |
| `canSplit` | boolean | `false` |
| `splitBlockedBy` | null | `null` |
| `canMove` | boolean | `true` |

<details><summary>Example answer</summary>

```json
{
  "current": null,
  "sprints": [
    {
      "id": 5,
      "name": "Delivery Sprint 3",
      "state": "active"
    },
    {
      "id": 3,
      "name": "Orbit Sprint 14",
      "state": "active"
    },
    "…"
  ],
  "canSplit": false,
  "splitBlockedBy": null,
  "canMove": true
}
```

</details>

### `POST /api/issues/{key}/transition`

**Move to another status – issue**

Move an issue, asking first when an automation wants an answer.

Answering happens in two steps: the first call reports the questions, the
second repeats the request with the answers and carries the move out.

- **Who may:** Permission: `transition`
- **Path parameters:** `key` (string)
- **JSON body:** `statusId`, `viaSplit`, `answers`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/transition' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"statusId": "…", "viaSplit": "…", "answers": "…"}'
```

**Returns**

`status`, `questions`, `statusId`, `issue`

### `GET /api/issues/{key}/transitions`

**List transitions (issue)**

- **Who may:** Permission: `transition`
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/issues/{key}/transitions' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `current` | object |  |
| `current.id` | integer | `2` |
| `current.name` | string | `"In Progress"` |
| `enforced` | boolean | `true` |
| `allowed` | boolean | `true` |
| `transitions` | array |  |
| `transitions[].id` | integer | `9` |
| `transitions[].name` | string | `"To Do"` |
| `transitions[].toStatusId` | integer | `1` |
| `transitions[].toName` | string | `"To Do"` |
| `transitions[].toCategory` | string | `"todo"` |
| `transitions[].description` | string | `""` |
| `transitions[].rules` | object |  |

<details><summary>Example answer</summary>

```json
{
  "current": {
    "id": 2,
    "name": "In Progress"
  },
  "enforced": true,
  "allowed": true,
  "transitions": [
    {
      "id": 9,
      "name": "To Do",
      "toStatusId": 1,
      "toName": "To Do",
      "toCategory": "todo",
      "description": "",
      "rules": {
        "conditions": [],
        "validators": [],
        "postFunctions": []
      }
    },
    {
      "id": 11,
      "name": "In Review",
      "toStatusId": 3,
      "toName": "In Review",
      "toCategory": "inprogress",
      "description": "",
      "rules": {
        "conditions": [],
        "validators": [],
        "postFunctions": []
      }
    },
    "…"
  ]
}
```

</details>

### `POST /api/issues/{key}/watch`

**Watch or stop watching – issue**

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/watch' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`watching`

### `POST /api/issues/{key}/worklog`

**Create worklog (issue)**

- **Who may:** Permission: `worklog`
- **Path parameters:** `key` (string)
- **JSON body:** `seconds`, `timeSpent`, `authorId`, `started`, `comment`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/issues/{key}/worklog' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"seconds": "…", "timeSpent": "…", "authorId": "…", "started": "…", "comment": "…"}'
```

**Returns**

`ok`


## Area: `links`

<a id="area-links"></a>

Links between issues (blocks, relates to …) or the quick links of the navigation.

### `GET /api/links`

**List links**

Readable by everybody who is signed in; only the label is what they see.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/links' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `links` | array |  |

<details><summary>Example answer</summary>

```json
{
  "links": []
}
```

</details>

### `POST /api/links`

**Create link**

- **Who may:** Administrators
- **JSON body:** `label`, `url`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/links' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"label": "…", "url": "…"}'
```

**Returns**

`id`, `label`, `url`

### `DELETE /api/links/{lid}`

**Delete link**

- **Who may:** Administrators
- **Path parameters:** `lid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/links/{lid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `DELETE /api/links/{lid}`

**Delete link**

- **Who may:** Anybody signed in
- **Path parameters:** `lid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/links/{lid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`


## Area: `mql`

<a id="area-mql"></a>

MQL, the query language: which fields exist, and checking a query.

### `GET /api/mql/check`

**Check – MQL query**

Validate a query and report how many issues it matches.

- **Who may:** Anybody signed in
- **Query parameters:** `mql` (string), `jql` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/mql/check?mql=…&jql=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `ok` | boolean | `true` |
| `total` | integer | `38` |

<details><summary>Example answer</summary>

```json
{
  "ok": true,
  "total": 38
}
```

</details>

### `GET /api/mql/meta`

**Read field list**

Field names, operators and the values each field can take.

Projects, sprints, epics and labels only as far as the person may see
them - a suggestion list is a way of reading data as well.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/mql/meta' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `fields` | object |  |
| `fields.project` | string | `"a project key"` |
| `fields.type` | string | `"an issue type"` |
| `fields.status` | string | `"a status"` |
| `fields.statusCategory` | string | `"todo, inprogress or done"` |
| `fields.priority` | string | `"a priority"` |
| `fields.assignee` | string | `"a user name"` |
| `fields.reporter` | string | `"a user name"` |
| `fields.sprint` | string | `"a sprint name"` |
| `fields.epic` | string | `"an epic key"` |
| `fields.labels` | string | `"a label"` |
| `fields.summary` | string | `"free text"` |
| `fields.description` | string | `"free text"` |
| `fields.text` | string | `"free text"` |
| `fields.storyPoints` | string | `"a number"` |
| `fields.created` | string | `"a date"` |
| `fields.updated` | string | `"a date"` |
| `fields.resolved` | string | `"a date"` |
| `fields.duedate` | string | `"a date"` |
| `fields.resolution` | string | `"Done or empty"` |
| `fields.key` | string | `"an issue key"` |
| `fields.parent` | string | `"an issue key"` |
| `fields.fixVersion` | string | `"a version"` |
| `operators` | array |  |
| `keywords` | array |  |
| `values` | object |  |
| `values.project` | array |  |
| `values.type` | array |  |
| `values.issuetype` | array |  |
| `values.status` | array |  |
| `values.statuscategory` | array |  |
| `values.priority` | array |  |
| `values.assignee` | array |  |
| `values.reporter` | array |  |
| `values.sprint` | array |  |
| `values.epic` | array |  |
| `values.resolution` | array |  |
| `values.labels` | array |  |

<details><summary>Example answer</summary>

```json
{
  "fields": {
    "project": "a project key",
    "type": "an issue type",
    "status": "a status",
    "statusCategory": "todo, inprogress or done",
    "priority": "a priority",
    "assignee": "a user name",
    "reporter": "a user name",
    "sprint": "a sprint name",
    "epic": "an epic key",
    "labels": "a label",
    "summary": "free text",
    "description": "free text",
    "text": "free text",
    "storyPoints": "a number",
    "created": "a date",
    "updated": "a date",
    "resolved": "a date",
    "duedate": "a date",
    "resolution": "Done or empty",
    "key": "an issue key",
    "parent": "an issue key",
    "fixVersion": "a version"
  },
  "operators": [
    "=",
    "!=",
    "…"
  ],
  "keywords": [
    "AND",
    "OR",
    "…"
  ],
  "values": {
    "project": [
      "HLP",
      "LNS",
      "…"
    ],
    "type": [
      "Epic",
      "Story",
      "…"
    ],
    "issuetype": [
      "Epic",
      "Story",
      "…"
    ],
    "status": [
      "To Do",
      "In Progress",
      "…"
    ],
    "statuscategory": [
      "todo",
      "inprogress",
      "…"
    ],
    "priority": [
      "Highest",
      "High",
      "…"
    ],
    "assignee": [
      "admin",
      "jnovak",
      "…"
    ],
    "reporter": [
      "admin",
      "jnovak",
      "…"
    ],
    "sprint": [
      "Orbit Sprint 12",
      "Orbit Sprint 13",
      "…"
    ],
    "epic": [
      "LNS-1",
      "ORB-1",
      "…"
    ],
    "resolution": [
      "Done",
      "EMPTY"
    ],
    "labels": [
      "licensing",
      "listing",
      "…"
    ]
  }
}
```

</details>


## Area: `notification-schemes`

<a id="area-notification-schemes"></a>

Notification schemes: who is told by mail when something happens to an issue.

### `GET /api/notification-schemes`

**List notification schemes**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/notification-schemes' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `schemes` | array |  |
| `schemes[].id` | integer | `1` |
| `schemes[].name` | string | `"Default notification scheme"` |
| `schemes[].description` | string | `"The reporter, the assignee and the watchers of an issue."` |
| `schemes[].isDefault` | boolean | `true` |
| `schemes[].rules` | array |  |
| `schemes[].projects` | array |  |
| `events` | object |  |
| `events.issue.created` | string | `"An issue is created"` |
| `events.issue.assigned` | string | `"An issue is assigned to somebody"` |
| `events.issue.transitioned` | string | `"An issue changes status"` |
| `events.issue.participants` | string | `"Somebody is added as a participant"` |
| `events.comment.added` | string | `"Somebody comments"` |
| `events.issue.mentioned` | string | `"Somebody is mentioned in a comment"` |
| `events.sprint.started` | string | `"A sprint is started"` |
| `events.sprint.completed` | string | `"A sprint is completed"` |
| `recipients` | object |  |
| `recipients.reporter` | string | `"The reporter"` |
| `recipients.assignee` | string | `"The assignee"` |
| `recipients.watchers` | string | `"The watchers"` |
| `recipients.participants` | string | `"The participants"` |
| `recipients.mentioned` | string | `"Whoever is named with @"` |
| `recipients.lead` | string | `"The project lead"` |
| `recipients.actor` | string | `"Whoever did it"` |
| `recipients.group` | string | `"A group"` |
| `recipients.user` | string | `"One person"` |
| `groups` | array |  |
| `groups[].id` | integer | `1` |
| `groups[].name` | string | `"Developers"` |
| `users` | array |  |
| `users[].id` | integer | `6` |
| `users[].displayName` | string | `"Administrator"` |
| `projects` | array |  |
| `projects[].key` | string | `"HLP"` |
| `projects[].name` | string | `"Helpdesk"` |
| `projects[].schemeId` | integer | `1` |

<details><summary>Example answer</summary>

```json
{
  "schemes": [
    {
      "id": 1,
      "name": "Default notification scheme",
      "description": "The reporter, the assignee and the watchers of an issue.",
      "isDefault": true,
      "rules": [
        {
          "event": "issue.created",
          "recipient": "reporter",
          "subjectId": null
        },
        {
          "event": "issue.created",
          "recipient": "assignee",
          "subjectId": null
        },
        "…"
      ],
      "projects": [
        "HLP",
        "LNS",
        "…"
      ]
    }
  ],
  "events": {
    "issue.created": "An issue is created",
    "issue.assigned": "An issue is assigned to somebody",
    "issue.transitioned": "An issue changes status",
    "issue.participants": "Somebody is added as a participant",
    "comment.added": "Somebody comments",
    "issue.mentioned": "Somebody is mentioned in a comment",
    "sprint.started": "A sprint is started",
    "sprint.completed": "A sprint is completed"
  },
  "recipients": {
    "reporter": "The reporter",
    "assignee": "The assignee",
    "watchers": "The watchers",
    "participants": "The participants",
    "mentioned": "Whoever is named with @",
    "lead": "The project lead",
    "actor": "Whoever did it",
    "group": "A group",
    "user": "One person"
  },
  "groups": [
    {
      "id": 1,
      "name": "Developers"
    },
    {
      "id": 5,
      "name": "helpdesk-agent"
    },
    "…"
  ],
  "users": [
    {
      "id": 6,
      "displayName": "Administrator"
    },
    {
      "id": 4,
      "displayName": "Jan Novak"
    },
    "…"
  ],
  "projects": [
    {
      "key": "HLP",
      "name": "Helpdesk",
      "schemeId": 1
    },
    {
      "key": "LNS",
      "name": "Lantern Sync",
      "schemeId": 1
    },
    "…"
  ]
}
```

</details>

### `POST /api/notification-schemes`

**Create notification scheme**

- **Who may:** Administrators
- **JSON body:** `name`, `description`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/notification-schemes' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…"}'
```

**Returns**

`id`, `name`

### `PUT /api/notification-schemes/{sid}`

**Change notification scheme**

- **Who may:** Administrators
- **Path parameters:** `sid` (integer)
- **JSON body:** `name`, `description`, `rules`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/notification-schemes/{sid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "rules": "…"}'
```

**Returns**

`id`

### `DELETE /api/notification-schemes/{sid}`

**Delete notification scheme**

- **Who may:** Administrators
- **Path parameters:** `sid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/notification-schemes/{sid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `POST /api/notification-schemes/{sid}/apply`

**Apply – notification scheme**

- **Who may:** Administrators
- **Path parameters:** `sid` (integer)
- **JSON body:** `projects`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/notification-schemes/{sid}/apply' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"projects": "…"}'
```

**Returns**

`scheme`, `projects`


## Area: `notifications`

<a id="area-notifications"></a>

Notices in the browser for the signed-in person.

### `GET /api/notifications/pending`

**List pending items**

What the browser has not shown yet, handed over once.

Marked as delivered as it is read: a message shown twice is worse than one
missed, and a second tab would otherwise repeat everything.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/notifications/pending' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `notices` | array |  |

<details><summary>Example answer</summary>

```json
{
  "notices": []
}
```

</details>

### `POST /api/notifications/seen`

**Create seen marker**

Draw a line under everything waiting.

Switching the notices on means "from now on". Without this, a day's worth of
events would arrive at once the moment somebody turns them on.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/notifications/seen' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`cleared`

### `POST /api/notifications/test`

**Test – notification**

Put one notice in this person's own queue.

The whole chain is otherwise hard to check: whoever creates an issue is left
out of its notices on purpose, so the obvious test - make a ticket and watch
- shows nothing and looks broken.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/notifications/test' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`queued`


## Area: `permission-schemes`

<a id="area-permission-schemes"></a>

Permission schemes: who may do what in the projects that use them.

### `GET /api/permission-schemes`

**List permission schemes**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/permission-schemes' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `schemes` | array |  |
| `schemes[].id` | integer | `1` |
| `schemes[].name` | string | `"Default permission scheme"` |
| `schemes[].description` | string | `"Open to everyone who is signed in - managing the project an` |
| `schemes[].isDefault` | boolean | `true` |
| `schemes[].projects` | array |  |
| `schemes[].grants` | array |  |
| `permissions` | array |  |
| `permissions[].key` | string | `"browse"` |
| `permissions[].label` | string | `"Browse the project and its issues"` |
| `projects` | array |  |
| `projects[].key` | string | `"HLP"` |
| `projects[].name` | string | `"Helpdesk"` |
| `unassigned` | array |  |
| `unassigned[].key` | string | `"HLP"` |
| `unassigned[].name` | string | `"Helpdesk"` |

<details><summary>Example answer</summary>

```json
{
  "schemes": [
    {
      "id": 1,
      "name": "Default permission scheme",
      "description": "Open to everyone who is signed in - managing the project and deleting are the…",
      "isDefault": true,
      "projects": [],
      "grants": [
        {
          "permission": "browse",
          "subjectType": "role",
          "subjectId": null,
          "subjectRole": "anyone"
        },
        {
          "permission": "create",
          "subjectType": "role",
          "subjectId": null,
          "subjectRole": "anyone"
        },
        "…"
      ]
    }
  ],
  "permissions": [
    {
      "key": "browse",
      "label": "Browse the project and its issues"
    },
    {
      "key": "create",
      "label": "Create issues"
    },
    "…"
  ],
  "projects": [
    {
      "key": "HLP",
      "name": "Helpdesk"
    },
    {
      "key": "LNS",
      "name": "Lantern Sync"
    },
    "…"
  ],
  "unassigned": [
    {
      "key": "HLP",
      "name": "Helpdesk"
    },
    {
      "key": "LNS",
      "name": "Lantern Sync"
    },
    "…"
  ]
}
```

</details>

### `POST /api/permission-schemes`

**Create permission scheme**

- **Who may:** Administrators
- **JSON body:** `name`, `description`, `copyOf`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/permission-schemes' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "copyOf": "…"}'
```

**Returns**

`id`, `name`

### `GET /api/permission-schemes/choices`

**List choices**

The schemes a new project can follow, for whoever may create projects.

With who may see a project under each - the one thing worth knowing
before picking.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/permission-schemes/choices' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `[].id` | integer | `1` |
| `[].name` | string | `"Default permission scheme"` |
| `[].isDefault` | boolean | `true` |
| `[].seenBy` | array |  |

<details><summary>Example answer</summary>

```json
[
  {
    "id": 1,
    "name": "Default permission scheme",
    "isDefault": true,
    "seenBy": [
      "anyone signed in"
    ]
  }
]
```

</details>

### `GET /api/permission-schemes/explain`

**Explain – permission scheme**

What one person may do in one project, and why - each permission with
the grant that gives it, or the reason nothing does.

- **Who may:** Administrators
- **Query parameters:** `userId` (int), `project` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/permission-schemes/explain?userId=…&project=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`person`, `project`, `scheme`, `inherited`, `permissions`

### `PUT /api/permission-schemes/{sid}`

**Change permission scheme**

- **Who may:** Administrators
- **Path parameters:** `sid` (integer)
- **JSON body:** `name`, `description`, `grants`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/permission-schemes/{sid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "grants": "…"}'
```

**Returns**

`id`, `name`

### `DELETE /api/permission-schemes/{sid}`

**Delete permission scheme**

- **Who may:** Administrators
- **Path parameters:** `sid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/permission-schemes/{sid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `POST /api/permission-schemes/{sid}/apply`

**Apply – permission scheme**

Attach one scheme to a number of projects at once.

- **Who may:** Administrators
- **Path parameters:** `sid` (integer)
- **JSON body:** `projects`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/permission-schemes/{sid}/apply' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"projects": "…"}'
```

**Returns**

`scheme`, `projects`


## Area: `projects`

<a id="area-projects"></a>

Projects: their settings, components, versions, people, permission and notification schemes, and the SLA settings of service projects.

### `GET /api/projects`

**List projects**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/projects' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `[].workflow` | object |  |
| `[].workflow.id` | integer | `2` |
| `[].workflow.name` | string | `"Default workflow"` |
| `[].id` | integer | `3` |
| `[].key` | string | `"HLP"` |
| `[].name` | string | `"Helpdesk"` |
| `[].description` | string | `"Demo project Helpdesk"` |
| `[].type` | string | `"kanban"` |
| `[].avatarColor` | string | `"#00875A"` |
| `[].lead` | object |  |
| `[].lead.id` | integer | `3` |
| `[].lead.username` | string | `"lfrei"` |
| `[].lead.displayName` | string | `"Lena Frei"` |
| `[].lead.email` | string | `"lena.frei@example.invalid"` |
| `[].lead.avatarColor` | string | `"#BF2600"` |
| `[].lead.isAdmin` | boolean | `false` |
| `[].lead.active` | boolean | `true` |
| `[].lead.clockPrompt` | boolean | `true` |
| `[].lead.avatarUrl` | null | `null` |
| `[].boardId` | integer | `3` |
| `[].issueCount` | integer | `6` |
| `[].doneCount` | integer | `2` |
| `[].created` | string | `"2026-11-21T21:18:53Z"` |
| `[].iconUrl` | null | `null` |
| `[].may` | object |  |
| `[].may.create` | boolean | `true` |
| `[].may.edit` | boolean | `true` |
| `[].may.manage` | boolean | `true` |
| `[].may.transition` | boolean | `true` |
| `[].may.assign` | boolean | `true` |

<details><summary>Example answer</summary>

```json
[
  {
    "workflow": {
      "id": 2,
      "name": "Default workflow"
    },
    "id": 3,
    "key": "HLP",
    "name": "Helpdesk",
    "description": "Demo project Helpdesk",
    "type": "kanban",
    "avatarColor": "#00875A",
    "lead": {
      "id": 3,
      "username": "lfrei",
      "displayName": "Lena Frei",
      "email": "lena.frei@example.invalid",
      "avatarColor": "#BF2600",
      "isAdmin": false,
      "active": true,
      "clockPrompt": true,
      "avatarUrl": null
    },
    "boardId": 3,
    "issueCount": 6,
    "doneCount": 2,
    "created": "2026-11-21T21:18:53Z",
    "iconUrl": null,
    "may": {
      "create": true,
      "edit": true,
      "manage": true,
      "transition": true,
      "assign": true
    }
  },
  {
    "workflow": {
      "id": 2,
      "name": "Default workflow"
    },
    "id": 2,
    "key": "LNS",
    "name": "Lantern Sync",
    "description": "Demo project Lantern Sync",
    "type": "scrum",
    "avatarColor": "#5243AA",
    "lead": {
      "id": 2,
      "username": "tbauer",
      "displayName": "Tom Bauer",
      "email": "tom.bauer@example.invalid",
      "avatarColor": "#00875A",
      "isAdmin": false,
      "active": true,
      "clockPrompt": true,
      "avatarUrl": null
    },
    "boardId": 2,
    "issueCount": 7,
    "doneCount": 2,
    "created": "2026-11-21T21:18:53Z",
    "iconUrl": null,
    "may": {
      "create": true,
      "edit": true,
      "manage": true,
      "transition": true,
      "assign": true
    }
  },
  "…"
]
```

</details>

### `POST /api/projects`

**Create project**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/projects' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

The same as `GET /api/projects`.

### `GET /api/projects/{key}`

**Read project**

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/projects/{key}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `workflow` | object |  |
| `workflow.id` | integer | `2` |
| `workflow.name` | string | `"Default workflow"` |
| `id` | integer | `1` |
| `key` | string | `"ORB"` |
| `name` | string | `"Orbit Portal"` |
| `description` | string | `"Demo project Orbit Portal"` |
| `type` | string | `"scrum"` |
| `avatarColor` | string | `"#0052CC"` |
| `lead` | object |  |
| `lead.id` | integer | `1` |
| `lead.username` | string | `"mkoch"` |
| `lead.displayName` | string | `"Marie Koch"` |
| `lead.email` | string | `"marie.koch@example.invalid"` |
| `lead.avatarColor` | string | `"#0052CC"` |
| `lead.isAdmin` | boolean | `true` |
| `lead.active` | boolean | `true` |
| `lead.clockPrompt` | boolean | `true` |
| `lead.avatarUrl` | null | `null` |
| `boardId` | integer | `1` |
| `issueCount` | integer | `25` |
| `doneCount` | integer | `9` |
| `created` | string | `"2026-11-21T21:18:53Z"` |
| `iconUrl` | null | `null` |
| `may` | object |  |
| `may.create` | boolean | `true` |
| `may.edit` | boolean | `true` |
| `may.manage` | boolean | `true` |
| `may.transition` | boolean | `true` |
| `may.assign` | boolean | `true` |

<details><summary>Example answer</summary>

```json
{
  "workflow": {
    "id": 2,
    "name": "Default workflow"
  },
  "id": 1,
  "key": "ORB",
  "name": "Orbit Portal",
  "description": "Demo project Orbit Portal",
  "type": "scrum",
  "avatarColor": "#0052CC",
  "lead": {
    "id": 1,
    "username": "mkoch",
    "displayName": "Marie Koch",
    "email": "marie.koch@example.invalid",
    "avatarColor": "#0052CC",
    "isAdmin": true,
    "active": true,
    "clockPrompt": true,
    "avatarUrl": null
  },
  "boardId": 1,
  "issueCount": 25,
  "doneCount": 9,
  "created": "2026-11-21T21:18:53Z",
  "iconUrl": null,
  "may": {
    "create": true,
    "edit": true,
    "manage": true,
    "transition": true,
    "assign": true
  }
}
```

</details>

### `PUT /api/projects/{key}`

**Change project**

- **Who may:** Permission: `manage`
- **Path parameters:** `key` (string)
- **JSON body:** `name`, `description`, `leadId`, `avatarColor`, `workflowId`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/projects/{key}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "leadId": "…", "avatarColor": "…", "workflowId": "…"}'
```

**Returns**

The same as `GET /api/projects/{key}`.

### `DELETE /api/projects/{key}`

**Delete project**

- **Who may:** Administrators
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/projects/{key}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `GET /api/projects/{key}/assignable`

**List people to assign (project)**

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/projects/{key}/assignable' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `restricted` | boolean | `false` |
| `users` | array |  |
| `users[].id` | integer | `6` |
| `users[].displayName` | string | `"Administrator"` |
| `users[].username` | string | `"admin"` |
| `users[].isAdmin` | boolean | `true` |
| `users[].avatarColor` | string | `"#007FA0"` |
| `users[].avatarUrl` | null | `null` |

<details><summary>Example answer</summary>

```json
{
  "restricted": false,
  "users": [
    {
      "id": 6,
      "displayName": "Administrator",
      "username": "admin",
      "isAdmin": true,
      "avatarColor": "#007FA0",
      "avatarUrl": null
    },
    {
      "id": 4,
      "displayName": "Jan Novak",
      "username": "jnovak",
      "isAdmin": false,
      "avatarColor": "#5243AA",
      "avatarUrl": null
    },
    "…"
  ]
}
```

</details>

### `POST /api/projects/{key}/icon`

**Send icon (project)**

A picture for the project, shown wherever its key appears.

Re-encoded rather than stored as sent: that drops any metadata or payload
that came with the file, and it keeps the size sane.

- **Who may:** Permission: `manage`
- **Path parameters:** `key` (string)
- **JSON body:** `(multipart form: file)`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/projects/{key}/icon' \
  -H 'Authorization: Bearer $TOKEN' \
  -F 'file=@/path/to/file'
```

**Returns**

JSON.

### `DELETE /api/projects/{key}/icon`

**Delete icon (project)**

- **Who may:** Permission: `manage`
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/projects/{key}/icon' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.

### `GET /api/projects/{key}/issue-types`

**List issue types (project)**

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/projects/{key}/issue-types' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `types` | array |  |
| `types[].id` | integer | `1` |
| `types[].name` | string | `"Epic"` |
| `types[].icon` | string | `"epic"` |
| `types[].color` | string | `"#904EE2"` |
| `types[].subtask` | boolean | `false` |
| `types[].enabled` | boolean | `true` |
| `types[].fixed` | boolean | `false` |
| `types[].used` | integer | `3` |
| `configured` | boolean | `false` |

<details><summary>Example answer</summary>

```json
{
  "types": [
    {
      "id": 1,
      "name": "Epic",
      "icon": "epic",
      "color": "#904EE2",
      "subtask": false,
      "enabled": true,
      "fixed": false,
      "used": 3
    },
    {
      "id": 2,
      "name": "Story",
      "icon": "story",
      "color": "#63BA3C",
      "subtask": false,
      "enabled": true,
      "fixed": false,
      "used": 12
    },
    "…"
  ],
  "configured": false
}
```

</details>

### `PUT /api/projects/{key}/issue-types`

**Change issue types (project)**

- **Who may:** Permission: `manage`
- **Path parameters:** `key` (string)
- **JSON body:** `typeIds`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/projects/{key}/issue-types' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"typeIds": "…"}'
```

**Returns**

`typeIds`

### `POST /api/projects/{key}/issue-types/move`

**Move – issue type (project)**

Change every issue of one type in a project over to another type.

This is what frees a type so it can be taken away from the project. Two
conversions are refused rather than guessed at: between sub-task and
ordinary types, because a sub-task needs a parent and the others must not
have one, and away from Epic while issues still hang under those epics.

- **Who may:** Permission: `manage`
- **Path parameters:** `key` (string)
- **JSON body:** `fromTypeId`, `toTypeId`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/projects/{key}/issue-types/move' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"fromTypeId": "…", "toTypeId": "…"}'
```

**Returns**

`moved`, `from`, `to`

### `GET /api/projects/{key}/permissions`

**List permissions (project)**

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/projects/{key}/permissions' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `project` | object |  |
| `project.workflow` | object |  |
| `project.workflow.id` | integer | `2` |
| `project.workflow.name` | string | `"Default workflow"` |
| `project.id` | integer | `1` |
| `project.key` | string | `"ORB"` |
| `project.name` | string | `"Orbit Portal"` |
| `project.description` | string | `"Demo project Orbit Portal"` |
| `project.type` | string | `"scrum"` |
| `project.avatarColor` | string | `"#0052CC"` |
| `project.lead` | object |  |
| `project.lead.id` | integer | `1` |
| `project.lead.username` | string | `"mkoch"` |
| `project.lead.displayName` | string | `"Marie Koch"` |
| `project.lead.email` | string | `"marie.koch@example.invalid"` |
| `project.lead.avatarColor` | string | `"#0052CC"` |
| `project.lead.isAdmin` | boolean | `true` |
| `project.lead.active` | boolean | `true` |
| `project.lead.clockPrompt` | boolean | `true` |
| `project.lead.avatarUrl` | null | `null` |
| `project.boardId` | integer | `1` |
| `project.issueCount` | integer | `25` |
| `project.doneCount` | integer | `9` |
| `project.created` | string | `"2026-11-21T21:18:53Z"` |
| `project.iconUrl` | null | `null` |
| `project.may` | object |  |
| `project.may.create` | boolean | `true` |
| `project.may.edit` | boolean | `true` |
| `project.may.manage` | boolean | `true` |
| `project.may.transition` | boolean | `true` |
| `project.may.assign` | boolean | `true` |
| `catalogue` | object |  |
| `catalogue.browse` | string | `"Browse the project and its issues"` |
| `catalogue.create` | string | `"Create issues"` |
| `catalogue.edit` | string | `"Edit issues"` |
| `catalogue.transition` | string | `"Move issues through the workflow"` |
| `catalogue.assign` | string | `"Assign issues"` |
| `catalogue.assignable` | string | `"Be assigned issues in this project"` |
| `catalogue.delete` | string | `"Delete issues"` |
| `catalogue.comment` | string | `"Comment on issues"` |

<details><summary>Example answer</summary>

```json
{
  "project": {
    "workflow": {
      "id": 2,
      "name": "Default workflow"
    },
    "id": 1,
    "key": "ORB",
    "name": "Orbit Portal",
    "description": "Demo project Orbit Portal",
    "type": "scrum",
    "avatarColor": "#0052CC",
    "lead": {
      "id": 1,
      "username": "mkoch",
      "displayName": "Marie Koch",
      "email": "marie.koch@example.invalid",
      "avatarColor": "#0052CC",
      "isAdmin": true,
      "active": true,
      "clockPrompt": true,
      "avatarUrl": null
    },
    "boardId": 1,
    "issueCount": 25,
    "doneCount": 9,
    "created": "2026-11-21T21:18:53Z",
    "iconUrl": null,
    "may": {
      "create": true,
      "edit": true,
      "manage": true,
      "transition": true,
      "assign": true
    }
  },
  "catalogue": {
    "browse": "Browse the project and its issues",
    "create": "Create issues",
    "edit": "Edit issues",
    "transition": "Move issues through the workflow",
    "assign": "Assign issues",
    "assignable": "Be assigned issues in this project",
    "delete": "Delete issues",
    "comment": "Comment on issues",
    "worklog": "Log work",
    "attach": "Add and remove attachments",
    "manage": "Change project settings and permissions"
  },
  "roles": {
    "anyone": "Anyone signed in",
    "lead": "The project lead",
    "assignee": "The assignee of the issue",
    "reporter": "The reporter of the issue",
    "participant": "A participant on the issue",
    "admin": "Administrators"
  },
  "entries": [
    {
      "id": 1,
      "permission": "browse",
      "subjectType": "role",
      "subjectId": null,
      "subjectRole": "anyone",
      "label": "Anyone signed in"
    },
    {
      "id": 2,
      "permission": "create",
      "subjectType": "role",
      "subjectId": null,
      "sub
…
```

</details>

### `PUT /api/projects/{key}/permissions`

**Change permissions (project)**

- **Who may:** Permission: `manage`
- **Path parameters:** `key` (string)
- **JSON body:** `entries`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/projects/{key}/permissions' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"entries": "…"}'
```

**Returns**

The same as `GET /api/projects/{key}/permissions`.

### `GET /api/projects/{key}/roadmap`

**Read roadmap (project)**

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/projects/{key}/roadmap' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `epics` | array |  |
| `epics[].id` | integer | `1` |
| `epics[].key` | string | `"ORB-1"` |
| `epics[].seq` | integer | `1` |
| `epics[].summary` | string | `"Collection based licensing"` |
| `epics[].description` | string | `"Move licensing from per-app to collection based entitlement` |
| `epics[].descriptionHtml` | null | `null` |
| `epics[].flagged` | boolean | `false` |
| `epics[].project` | object |  |
| `epics[].type` | object |  |
| `epics[].status` | object |  |
| `epics[].priority` | object |  |
| `epics[].assignee` | object |  |
| `epics[].reporter` | object |  |
| `epics[].sprint` | null | `null` |
| `epics[].epic` | null | `null` |
| `epics[].parent` | null | `null` |
| `epics[].storyPoints` | null | `null` |
| `epics[].labels` | array |  |
| `epics[].components` | array |  |
| `epics[].fixVersion` | string | `""` |
| `epics[].epicColor` | string | `"#904EE2"` |
| `epics[].rank` | number | `2000.0` |
| `epics[].dueDate` | null | `null` |
| `epics[].releaseDate` | null | `null` |
| `epics[].bitbucketProject` | null | `null` |
| `epics[].participants` | array |  |
| `epics[].bitbucketRepo` | null | `null` |
| `epics[].startDate` | null | `null` |
| `epics[].disturbanceSprintId` | null | `null` |
| `epics[].sourceKey` | null | `null` |
| `epics[].releaseDescription` | string | `""` |
| `epics[].releaseDescriptionHtml` | null | `null` |
| `epics[].endDate` | null | `null` |
| `epics[].estimate` | null | `null` |
| `epics[].timeLeft` | null | `null` |
| `epics[].progress` | null | `null` |
| `epics[].created` | string | `"2026-09-22T21:18:53Z"` |
| `epics[].updated` | string | `"2026-09-22T21:18:53Z"` |
| `epics[].resolved` | null | `null` |

<details><summary>Example answer</summary>

```json
{
  "epics": [
    {
      "id": 1,
      "key": "ORB-1",
      "seq": 1,
      "summary": "Collection based licensing",
      "description": "Move licensing from per-app to collection based entitlements.",
      "descriptionHtml": null,
      "flagged": false,
      "project": {
        "id": 1,
        "key": "ORB",
        "name": "Orbit Portal",
        "color": "#0052CC"
      },
      "type": {
        "id": 1,
        "name": "Epic",
        "icon": "epic",
        "color": "#904EE2",
        "subtask": false
      },
      "status": {
        "id": 2,
        "name": "In Progress",
        "category": "inprogress"
      },
      "priority": {
        "id": 2,
        "name": "High",
        "icon": "up",
        "color": "#E9494A"
      },
      "assignee": {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "avatarColor": "#0052CC",
        "active": true
      },
      "reporter": {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "avatarColor": "#0052CC",
        "active": true
      },
      "sprint": null,
      "epic": null,
      "parent": null,
      "storyPoints": null,
      "labels": [
        "licensing"
      ],
      "components": [],
      "fixVersion": "",
      "epicColor": "#904EE2",
      "rank": 2000.0,
      "dueDate": null,
      "releaseDate": null,
      "bitbucketProject": null
    },
    {
      "id": 2,
      "key": "ORB-2",
      "seq": 2,
      "summary": "Rename the light edition",
      "description": "Split the light edition into two smaller tools.",
      "descriptionHtml": null,
      "flagged": false,
      "project": {
        "id": 1,
        "key": "ORB",
        "name": "Orbit Portal",
        "color": "#0052CC"
      },
      "type": {
     
…
```

</details>

### `GET /api/projects/{key}/scheme`

**Read scheme (project)**

Which permission scheme this project follows, and what it grants.

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/projects/{key}/scheme' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `scheme` | object |  |
| `scheme.id` | integer | `1` |
| `scheme.name` | string | `"Default permission scheme"` |
| `scheme.description` | string | `"Open to everyone who is signed in - managing the project an` |
| `scheme.isDefault` | boolean | `true` |
| `scheme.inherited` | boolean | `true` |
| `grants` | array |  |
| `grants[].permission` | string | `"browse"` |
| `grants[].subjectType` | string | `"role"` |
| `grants[].subjectId` | null | `null` |
| `grants[].subjectRole` | string | `"anyone"` |
| `permissions` | array |  |
| `permissions[].key` | string | `"browse"` |
| `permissions[].label` | string | `"Browse the project and its issues"` |
| `schemes` | array |  |
| `schemes[].id` | integer | `1` |
| `schemes[].name` | string | `"Default permission scheme"` |

<details><summary>Example answer</summary>

```json
{
  "scheme": {
    "id": 1,
    "name": "Default permission scheme",
    "description": "Open to everyone who is signed in - managing the project and deleting are the…",
    "isDefault": true,
    "inherited": true
  },
  "grants": [
    {
      "permission": "browse",
      "subjectType": "role",
      "subjectId": null,
      "subjectRole": "anyone"
    },
    {
      "permission": "create",
      "subjectType": "role",
      "subjectId": null,
      "subjectRole": "anyone"
    },
    "…"
  ],
  "permissions": [
    {
      "key": "browse",
      "label": "Browse the project and its issues"
    },
    {
      "key": "create",
      "label": "Create issues"
    },
    "…"
  ],
  "schemes": [
    {
      "id": 1,
      "name": "Default permission scheme"
    }
  ]
}
```

</details>

### `PUT /api/projects/{key}/scheme`

**Change scheme (project)**

- **Who may:** Permission: `manage`
- **Path parameters:** `key` (string)
- **JSON body:** `schemeId`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/projects/{key}/scheme' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"schemeId": "…"}'
```

**Returns**

`schemeId`

### `GET /api/projects/{key}/stats`

**Read statistics (project)**

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/projects/{key}/stats' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `project` | object |  |
| `project.workflow` | object |  |
| `project.workflow.id` | integer | `2` |
| `project.workflow.name` | string | `"Default workflow"` |
| `project.id` | integer | `1` |
| `project.key` | string | `"ORB"` |
| `project.name` | string | `"Orbit Portal"` |
| `project.description` | string | `"Demo project Orbit Portal"` |
| `project.type` | string | `"scrum"` |
| `project.avatarColor` | string | `"#0052CC"` |
| `project.lead` | object |  |
| `project.lead.id` | integer | `1` |
| `project.lead.username` | string | `"mkoch"` |
| `project.lead.displayName` | string | `"Marie Koch"` |
| `project.lead.email` | string | `"marie.koch@example.invalid"` |
| `project.lead.avatarColor` | string | `"#0052CC"` |
| `project.lead.isAdmin` | boolean | `true` |
| `project.lead.active` | boolean | `true` |
| `project.lead.clockPrompt` | boolean | `true` |
| `project.lead.avatarUrl` | null | `null` |
| `project.boardId` | integer | `1` |
| `project.issueCount` | integer | `25` |
| `project.doneCount` | integer | `9` |
| `project.created` | string | `"2026-11-21T21:18:53Z"` |
| `project.iconUrl` | null | `null` |
| `project.may` | object |  |
| `project.may.create` | boolean | `true` |
| `project.may.edit` | boolean | `true` |
| `project.may.manage` | boolean | `true` |
| `project.may.transition` | boolean | `true` |
| `project.may.assign` | boolean | `true` |
| `byStatus` | array |  |
| `byStatus[].label` | string | `"To Do"` |
| `byStatus[].value` | integer | `11` |
| `byStatus[].color` | string | `"#8993A4"` |
| `byType` | array |  |
| `byType[].label` | string | `"Epic"` |
| `byType[].value` | integer | `3` |
| `byType[].color` | string | `"#904EE2"` |
| `byPriority` | array |  |

<details><summary>Example answer</summary>

```json
{
  "project": {
    "workflow": {
      "id": 2,
      "name": "Default workflow"
    },
    "id": 1,
    "key": "ORB",
    "name": "Orbit Portal",
    "description": "Demo project Orbit Portal",
    "type": "scrum",
    "avatarColor": "#0052CC",
    "lead": {
      "id": 1,
      "username": "mkoch",
      "displayName": "Marie Koch",
      "email": "marie.koch@example.invalid",
      "avatarColor": "#0052CC",
      "isAdmin": true,
      "active": true,
      "clockPrompt": true,
      "avatarUrl": null
    },
    "boardId": 1,
    "issueCount": 25,
    "doneCount": 9,
    "created": "2026-11-21T21:18:53Z",
    "iconUrl": null,
    "may": {
      "create": true,
      "edit": true,
      "manage": true,
      "transition": true,
      "assign": true
    }
  },
  "byStatus": [
    {
      "label": "To Do",
      "value": 11,
      "color": "#8993A4"
    },
    {
      "label": "In Progress",
      "value": 3,
      "color": "#0052CC"
    },
    "…"
  ],
  "byType": [
    {
      "label": "Epic",
      "value": 3,
      "color": "#904EE2"
    },
    {
      "label": "Story",
      "value": 12,
      "color": "#63BA3C"
    },
    "…"
  ],
  "byPriority": [
    {
      "label": "Highest",
      "value": 4,
      "color": "#CD1317"
    },
    {
      "label": "High",
      "value": 4,
      "color": "#E9494A"
    },
    "…"
  ],
  "byAssignee": [
    {
      "label": "Marie Koch",
      "value": 8,
      "color": "#0052CC"
    },
    {
      "label": "Tom Bauer",
      "value": 7,
      "color": "#00875A"
    },
    "…"
  ],
  "byProject": [
    {
      "label": "ORB",
      "value": 25,
      "color": "#0052CC"
    }
  ],
  "createdPerDay": [
    {
      "date": "2026-09-22",
      "count": 1
    },
    {
      "date": "2026-10-02",
      "count": 1
    },
    "…"
  ]
}
```

</details>

### `GET /api/projects/{key}/workflows`

**List workflows (project)**

- **Who may:** Anybody signed in
- **Path parameters:** `key` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/projects/{key}/workflows' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `default` | integer | `2` |
| `types` | array |  |
| `types[].id` | integer | `1` |
| `types[].name` | string | `"Epic"` |
| `types[].icon` | string | `"epic"` |
| `types[].color` | string | `"#904EE2"` |
| `types[].subtask` | boolean | `false` |
| `types[].workflowId` | null | `null` |
| `workflows` | array |  |
| `workflows[].id` | integer | `2` |
| `workflows[].name` | string | `"Default workflow"` |

<details><summary>Example answer</summary>

```json
{
  "default": 2,
  "types": [
    {
      "id": 1,
      "name": "Epic",
      "icon": "epic",
      "color": "#904EE2",
      "subtask": false,
      "workflowId": null
    },
    {
      "id": 2,
      "name": "Story",
      "icon": "story",
      "color": "#63BA3C",
      "subtask": false,
      "workflowId": null
    },
    "…"
  ],
  "workflows": [
    {
      "id": 2,
      "name": "Default workflow"
    },
    {
      "id": 1,
      "name": "Software delivery"
    }
  ]
}
```

</details>

### `PUT /api/projects/{key}/workflows`

**Change workflows (project)**

- **Who may:** Permission: `manage`
- **Path parameters:** `key` (string)
- **JSON body:** `types`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/projects/{key}/workflows' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"types": "…"}'
```

**Returns**

The same as `GET /api/projects/{key}/workflows`.


## Area: `reports`

<a id="area-reports"></a>

Reports: time, sprints, SLAs, customers - as JSON, and as CSV, PDF or Excel where it says so.

### `GET /api/reports/actual-sprint`

**Read current sprint**

The sprint that is running, with everything in it.

Which one: the active sprint of the board chosen under "Your work", and
failing that the first active sprint this person may see. A dashboard should
not ask which sprint is meant when there is an obvious answer.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/actual-sprint' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `statuses` | array |  |
| `statuses[].id` | integer | `1` |
| `statuses[].name` | string | `"To Do"` |
| `statuses[].category` | string | `"todo"` |
| `epics` | array |  |
| `epics[].id` | integer | `2` |
| `epics[].key` | string | `"ORB-2"` |
| `epics[].seq` | integer | `2` |
| `epics[].summary` | string | `"Rename the light edition"` |
| `epics[].description` | string | `"Split the light edition into two smaller tools."` |
| `epics[].descriptionHtml` | null | `null` |
| `epics[].flagged` | boolean | `false` |
| `epics[].project` | object |  |
| `epics[].type` | object |  |
| `epics[].status` | object |  |
| `epics[].priority` | object |  |
| `epics[].assignee` | object |  |
| `epics[].reporter` | object |  |
| `epics[].sprint` | null | `null` |
| `epics[].epic` | null | `null` |
| `epics[].parent` | null | `null` |
| `epics[].storyPoints` | null | `null` |
| `epics[].labels` | array |  |
| `epics[].components` | array |  |
| `epics[].fixVersion` | string | `""` |
| `epics[].epicColor` | string | `"#0052CC"` |
| `epics[].rank` | number | `3000.0` |
| `epics[].dueDate` | null | `null` |
| `epics[].releaseDate` | null | `null` |
| `epics[].bitbucketProject` | null | `null` |
| `epics[].participants` | array |  |
| `epics[].bitbucketRepo` | null | `null` |
| `epics[].startDate` | null | `null` |
| `epics[].disturbanceSprintId` | null | `null` |
| `epics[].sourceKey` | null | `null` |
| `epics[].releaseDescription` | string | `""` |
| `epics[].releaseDescriptionHtml` | null | `null` |
| `epics[].endDate` | null | `null` |
| `epics[].estimate` | null | `null` |
| `epics[].timeLeft` | null | `null` |

<details><summary>Example answer</summary>

```json
{
  "statuses": [
    {
      "id": 1,
      "name": "To Do",
      "category": "todo"
    },
    {
      "id": 2,
      "name": "In Progress",
      "category": "inprogress"
    },
    "…"
  ],
  "epics": [
    {
      "id": 2,
      "key": "ORB-2",
      "seq": 2,
      "summary": "Rename the light edition",
      "description": "Split the light edition into two smaller tools.",
      "descriptionHtml": null,
      "flagged": false,
      "project": {
        "id": 1,
        "key": "ORB",
        "name": "Orbit Portal",
        "color": "#0052CC"
      },
      "type": {
        "id": 1,
        "name": "Epic",
        "icon": "epic",
        "color": "#904EE2",
        "subtask": false
      },
      "status": {
        "id": 2,
        "name": "In Progress",
        "category": "inprogress"
      },
      "priority": {
        "id": 1,
        "name": "Highest",
        "icon": "up",
        "color": "#CD1317"
      },
      "assignee": {
        "id": 2,
        "username": "tbauer",
        "displayName": "Tom Bauer",
        "avatarColor": "#00875A",
        "active": true
      },
      "reporter": {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "avatarColor": "#0052CC",
        "active": true
      },
      "sprint": null,
      "epic": null,
      "parent": null,
      "storyPoints": null,
      "labels": [
        "listing"
      ],
      "components": [],
      "fixVersion": "",
      "epicColor": "#0052CC",
      "rank": 3000.0,
      "dueDate": null,
      "releaseDate": null,
      "bitbucketProject": null
    },
    {
      "id": 3,
      "key": "ORB-3",
      "seq": 3,
      "summary": "Admin UI refresh",
      "description": "",
      "descriptionHtml": null,
      "flagged": false,
      "project": {
     
…
```

</details>

### `GET /api/reports/deviation`

**Read deviation report**

Estimate against what was actually booked.

Deviation = (actual - estimate) / estimate x 100: positive means the work
took longer than planned. Only issues carrying **both** an estimate and
logged time can say anything about that, so they are the basis - and how
many were left out for lacking one of the two is reported alongside, because
a deviation figure without that context flatters itself.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/deviation' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `from` | string | `""` |
| `to` | string | `""` |
| `peopleOverview` | array |  |
| `peopleOverview[].name` | string | `"Marie Koch"` |
| `peopleOverview[].issues` | integer | `0` |
| `peopleOverview[].bookedOn` | integer | `2` |
| `peopleOverview[].estimate` | integer | `0` |
| `peopleOverview[].actual` | integer | `5400` |
| `peopleOverview[].deviation` | null | `null` |
| `project` | string | `""` |
| `issues` | array |  |
| `overall` | object |  |
| `overall.issues` | integer | `0` |
| `overall.estimate` | integer | `0` |
| `overall.actual` | integer | `0` |
| `overall.deviation` | number | `0.0` |
| `projects` | array |  |
| `epics` | array |  |
| `skipped` | object |  |
| `skipped.noEstimate` | integer | `2` |
| `skipped.noTime` | integer | `0` |
| `projectList` | array |  |
| `projectList[].id` | integer | `3` |
| `projectList[].key` | string | `"HLP"` |
| `projectList[].name` | string | `"Helpdesk"` |

<details><summary>Example answer</summary>

```json
{
  "from": "",
  "to": "",
  "peopleOverview": [
    {
      "name": "Marie Koch",
      "issues": 0,
      "bookedOn": 2,
      "estimate": 0,
      "actual": 5400,
      "deviation": null
    }
  ],
  "project": "",
  "issues": [],
  "overall": {
    "issues": 0,
    "estimate": 0,
    "actual": 0,
    "deviation": 0.0
  },
  "projects": [],
  "epics": [],
  "skipped": {
    "noEstimate": 2,
    "noTime": 0
  },
  "projectList": [
    {
      "id": 3,
      "key": "HLP",
      "name": "Helpdesk"
    },
    {
      "id": 2,
      "key": "LNS",
      "name": "Lantern Sync"
    },
    "…"
  ]
}
```

</details>

### `GET /api/reports/deviation.pdf`

**Export deviation report as PDF**

The same report as a PDF, in the product's colours.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/deviation.pdf' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

A file (application/pdf).

### `GET /api/reports/my-sprint-work`

**Read own sprint work**

What is on this person's plate in the sprints that are running.

Only their own issues, only from active sprints - the point is the day's
work, not an overview of everything.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/my-sprint-work' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

```json
[]
```

### `GET /api/reports/running-sprints`

**List running sprints**

The sprints that are under way right now.

Only boards carrying a project this person may browse, so the dashboard does
not become a window into projects they cannot open.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/running-sprints' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `[].id` | integer | `3` |
| `[].name` | string | `"Orbit Sprint 14"` |
| `[].goal` | string | `"Ship collection based licensing"` |
| `[].boardId` | integer | `1` |
| `[].board` | string | `"ORB board"` |
| `[].projects` | array |  |
| `[].projects[].key` | string | `"ORB"` |
| `[].projects[].name` | string | `"Orbit Portal"` |
| `[].projects[].avatarColor` | string | `"#0052CC"` |
| `[].startDate` | string | `"2026-11-16T21:18:53Z"` |
| `[].endDate` | string | `"2026-11-30T21:18:53Z"` |
| `[].daysLeft` | integer | `9` |
| `[].total` | integer | `6` |
| `[].done` | integer | `2` |
| `[].open` | integer | `4` |
| `[].disturbed` | integer | `0` |
| `[].points` | number | `29.0` |
| `[].donePoints` | number | `8.0` |
| `[].percent` | number | `33.3` |

<details><summary>Example answer</summary>

```json
[
  {
    "id": 3,
    "name": "Orbit Sprint 14",
    "goal": "Ship collection based licensing",
    "boardId": 1,
    "board": "ORB board",
    "projects": [
      {
        "key": "ORB",
        "name": "Orbit Portal",
        "avatarColor": "#0052CC"
      }
    ],
    "startDate": "2026-11-16T21:18:53Z",
    "endDate": "2026-11-30T21:18:53Z",
    "daysLeft": 9,
    "total": 6,
    "done": 2,
    "open": 4,
    "disturbed": 0,
    "points": 29.0,
    "donePoints": 8.0,
    "percent": 33.3
  },
  {
    "id": 5,
    "name": "Delivery Sprint 3",
    "goal": "Marketplace release across both products",
    "boardId": 4,
    "board": "Product delivery",
    "projects": [
      {
        "key": "ORB",
        "name": "Orbit Portal",
        "avatarColor": "#0052CC"
      },
      {
        "key": "LNS",
        "name": "Lantern Sync",
        "avatarColor": "#5243AA"
      }
    ],
    "startDate": "2026-11-17T21:18:53Z",
    "endDate": "2026-12-01T21:18:53Z",
    "daysLeft": 10,
    "total": 0,
    "done": 0,
    "open": 0,
    "disturbed": 0,
    "points": 0,
    "donePoints": 0,
    "percent": 0
  }
]
```

</details>

### `GET /api/reports/sprints`

**List sprints**

What happened in a set of sprints.

Scope is what a sprint carried: the issues still in it plus everything that
left it. Where they went is read from the history the sprint actions write,
which cannot be edited - a comment could be.

- **Who may:** Anybody signed in
- **Query parameters:** `from` (string), `to` (string), `boardId` (string), `projectId` (string), `sprintId` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/sprints?from=…&to=…&boardId=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `sprints` | array |  |
| `sprints[].id` | integer | `4` |
| `sprints[].name` | string | `"Orbit Sprint 15"` |
| `sprints[].state` | string | `"future"` |
| `sprints[].board` | string | `"ORB board"` |
| `sprints[].goal` | string | `""` |
| `sprints[].startDate` | null | `null` |
| `sprints[].endDate` | null | `null` |
| `sprints[].inSprint` | integer | `2` |
| `sprints[].scope` | integer | `2` |
| `sprints[].done` | integer | `0` |
| `sprints[].open` | integer | `2` |
| `sprints[].carried` | integer | `0` |
| `sprints[].byStatus` | object |  |
| `sprints[].points` | number | `10.0` |
| `sprints[].estimate` | integer | `0` |
| `sprints[].spent` | integer | `0` |
| `sprints[].split` | integer | `0` |
| `sprints[].splitKeys` | array |  |
| `sprints[].moved` | integer | `0` |
| `sprints[].movedKeys` | array |  |
| `sprints[].backlog` | integer | `0` |
| `sprints[].backlogKeys` | array |  |
| `sprints[].disturbances` | integer | `0` |
| `sprints[].disturbanceKeys` | array |  |
| `sprints[].disturbancePoints` | integer | `0` |
| `sprints[].disturbanceEstimate` | integer | `0` |
| `sprints[].disturbancePercent` | number | `0.0` |
| `sprints[].donePercent` | number | `0.0` |
| `sprints[].movedPercent` | number | `0.0` |
| `sprints[].splitPercent` | number | `0.0` |
| `sprints[].backlogPercent` | number | `0.0` |
| `allSprints` | array |  |
| `allSprints[].id` | integer | `4` |
| `allSprints[].name` | string | `"Orbit Sprint 15"` |
| `allSprints[].board` | string | `"ORB board"` |
| `allSprints[].state` | string | `"future"` |
| `allSprints[].startDate` | null | `null` |
| `allSprints[].endDate` | null | `null` |
| `boards` | array |  |

<details><summary>Example answer</summary>

```json
{
  "sprints": [
    {
      "id": 4,
      "name": "Orbit Sprint 15",
      "state": "future",
      "board": "ORB board",
      "goal": "",
      "startDate": null,
      "endDate": null,
      "inSprint": 2,
      "scope": 2,
      "done": 0,
      "open": 2,
      "carried": 0,
      "byStatus": {
        "To Do": 2
      },
      "points": 10.0,
      "estimate": 0,
      "spent": 0,
      "split": 0,
      "splitKeys": [],
      "moved": 0,
      "movedKeys": [],
      "backlog": 0,
      "backlogKeys": [],
      "disturbances": 0,
      "disturbanceKeys": [],
      "disturbancePoints": 0
    },
    {
      "id": 1,
      "name": "Orbit Sprint 12",
      "state": "closed",
      "board": "ORB board",
      "goal": "",
      "startDate": "2026-10-19T21:18:53Z",
      "endDate": "2026-11-02T21:18:53Z",
      "inSprint": 4,
      "scope": 4,
      "done": 4,
      "open": 0,
      "carried": 0,
      "byStatus": {
        "Done": 4
      },
      "points": 21.0,
      "estimate": 0,
      "spent": 0,
      "split": 0,
      "splitKeys": [],
      "moved": 0,
      "movedKeys": [],
      "backlog": 0,
      "backlogKeys": [],
      "disturbances": 0,
      "disturbanceKeys": [],
      "disturbancePoints": 0
    },
    "…"
  ],
  "allSprints": [
    {
      "id": 4,
      "name": "Orbit Sprint 15",
      "board": "ORB board",
      "state": "future",
      "startDate": null,
      "endDate": null
    },
    {
      "id": 1,
      "name": "Orbit Sprint 12",
      "board": "ORB board",
      "state": "closed",
      "startDate": "2026-10-19T21:18:53Z",
      "endDate": "2026-11-02T21:18:53Z"
    },
    "…"
  ],
  "boards": [
    {
      "id": 3,
      "name": "HLP board"
    },
    {
      "id": 2,
      "name": "LNS board"
    },
    "…"
  ],
  "projects": [
    {
     
…
```

</details>

### `GET /api/reports/time-summary`

**Read time summary**

Who booked how much, in total and in the sprints that are running.

Consolidated per person: the dashboard wants the shape of the week, not a
list of issues. Restricted like the time report itself.

- **Who may:** Anybody signed in
- **Query parameters:** `mine` (string), `month` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/time-summary?mine=…&month=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `people` | array |  |
| `people[].id` | integer | `1` |
| `people[].displayName` | string | `"Marie Koch"` |
| `people[].avatarColor` | string | `"#0052CC"` |
| `people[].avatarUrl` | null | `null` |
| `people[].total` | integer | `16200` |
| `people[].sprint` | integer | `9000` |
| `people[].lastEntry` | string | `"2026-11-19T21:18:53Z"` |
| `people[].today` | integer | `0` |
| `everyone` | boolean | `true` |
| `total` | integer | `16200` |
| `sprint` | integer | `9000` |
| `today` | integer | `0` |
| `sprints` | array |  |
| `months` | array |  |
| `month` | null | `null` |
| `overall` | integer | `16200` |

<details><summary>Example answer</summary>

```json
{
  "people": [
    {
      "id": 1,
      "displayName": "Marie Koch",
      "avatarColor": "#0052CC",
      "avatarUrl": null,
      "total": 16200,
      "sprint": 9000,
      "lastEntry": "2026-11-19T21:18:53Z",
      "today": 0
    }
  ],
  "everyone": true,
  "total": 16200,
  "sprint": 9000,
  "today": 0,
  "sprints": [
    "Delivery Sprint 3",
    "Orbit Sprint 14"
  ],
  "months": [
    "2026-11"
  ],
  "month": null,
  "overall": 16200
}
```

</details>

### `GET /api/reports/time-summary.pdf`

**Export time summary as PDF**

The gadget figures as a sheet to hand on, for one month or all time.

- **Who may:** Anybody signed in
- **Query parameters:** `mine` (string), `details` (string), `month` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/time-summary.pdf?mine=…&details=…&month=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

A file (application/pdf).

### `GET /api/reports/timeclock`

**List working times**

Who was at work when, over a stretch of days. Administrators only.

- **Who may:** Administrators
- **Query parameters:** `from` (string), `to` (string), `users` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/timeclock?from=…&to=…&users=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `from` | string | `"2026-11-21"` |
| `to` | string | `"2026-11-21"` |
| `days` | array |  |
| `people` | array |  |
| `people[].user` | object |  |
| `people[].days` | array |  |

<details><summary>Example answer</summary>

```json
{
  "from": "2026-11-21",
  "to": "2026-11-21",
  "days": [
    "2026-11-21"
  ],
  "people": [
    {
      "user": {
        "id": 6,
        "displayName": "Administrator",
        "avatarColor": "#007FA0"
      },
      "days": [
        {
          "day": "2026-11-21",
          "spans": [],
          "breaks": [],
          "worked": 0,
          "paused": 0,
          "running": false,
          "events": []
        }
      ]
    },
    {
      "user": {
        "id": 4,
        "displayName": "Jan Novak",
        "avatarColor": "#5243AA"
      },
      "days": [
        {
          "day": "2026-11-21",
          "spans": [],
          "breaks": [],
          "worked": 0,
          "paused": 0,
          "running": false,
          "events": []
        }
      ]
    },
    "…"
  ]
}
```

</details>

### `GET /api/reports/timeclock.xlsx`

**Export working times as XLSX**

One person's working time over a stretch of days, as a spreadsheet.

A day per row, with the spans, the breaks and the sum - the shape somebody
hands to payroll. Times in the viewer's own clock, because that is the one
they read the report in.

- **Who may:** Administrators
- **Query parameters:** `from` (string), `to` (string), `user` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/timeclock.xlsx?from=…&to=…&user=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.

### `GET /api/reports/worklog`

**List worklogs**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/worklog' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `issues` | array |  |
| `issues[].key` | string | `"ORB-1"` |
| `issues[].summary` | string | `"Collection based licensing"` |
| `issues[].type` | string | `"Epic"` |
| `issues[].status` | string | `"In Progress"` |
| `issues[].project` | string | `"ORB"` |
| `issues[].projectName` | string | `"Orbit Portal"` |
| `issues[].estimate` | null | `null` |
| `issues[].seconds` | integer | `3600` |
| `issues[].entries` | array |  |
| `total` | integer | `16200` |
| `entryCount` | integer | `4` |
| `byUser` | array |  |
| `byUser[].author` | string | `"Marie Koch"` |
| `byUser[].seconds` | integer | `16200` |
| `filters` | object |  |
| `filters.from` | string | `""` |
| `filters.to` | string | `""` |
| `filters.users` | array |  |
| `filters.projects` | array |  |

<details><summary>Example answer</summary>

```json
{
  "issues": [
    {
      "key": "ORB-1",
      "summary": "Collection based licensing",
      "type": "Epic",
      "status": "In Progress",
      "project": "ORB",
      "projectName": "Orbit Portal",
      "estimate": null,
      "seconds": 3600,
      "entries": [
        {
          "id": 1,
          "seconds": 3600,
          "comment": "Investigation",
          "started": "2026-11-19T21:18:53Z",
          "author": "Marie Koch"
        }
      ]
    },
    {
      "key": "ORB-4",
      "summary": "Add entitlement lookup against PPC API",
      "type": "Story",
      "status": "Done",
      "project": "ORB",
      "projectName": "Orbit Portal",
      "estimate": null,
      "seconds": 3600,
      "entries": [
        {
          "id": 2,
          "seconds": 3600,
          "comment": "Investigation",
          "started": "2026-11-19T21:18:53Z",
          "author": "Marie Koch"
        }
      ]
    },
    "…"
  ],
  "total": 16200,
  "entryCount": 4,
  "byUser": [
    {
      "author": "Marie Koch",
      "seconds": 16200
    }
  ],
  "filters": {
    "from": "",
    "to": "",
    "users": [],
    "projects": []
  }
}
```

</details>

### `GET /api/reports/worklog.csv`

**Export worklogs as CSV**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/worklog.csv' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

A file (text/csv).

### `GET /api/reports/worklog.pdf`

**Export worklogs as PDF**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/reports/worklog.pdf' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

A file (application/pdf).


## Area: `routines`

<a id="area-routines"></a>

Routines: issues created on a schedule.

### `GET /api/routines`

**List routines**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/routines' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `routines` | array |  |
| `mayWrite` | boolean | `true` |
| `types` | array |  |
| `types[].id` | integer | `1` |
| `types[].name` | string | `"Epic"` |
| `types[].subtask` | boolean | `false` |
| `projects` | array |  |
| `projects[].key` | string | `"HLP"` |
| `projects[].name` | string | `"Helpdesk"` |

<details><summary>Example answer</summary>

```json
{
  "routines": [],
  "mayWrite": true,
  "types": [
    {
      "id": 1,
      "name": "Epic",
      "subtask": false
    },
    {
      "id": 2,
      "name": "Story",
      "subtask": false
    },
    "…"
  ],
  "projects": [
    {
      "key": "HLP",
      "name": "Helpdesk"
    },
    {
      "key": "LNS",
      "name": "Lantern Sync"
    },
    "…"
  ]
}
```

</details>

### `POST /api/routines`

**Create routine**

- **Who may:** Anybody signed in
- **JSON body:** `name`, `description`, `projectKey`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/routines' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "projectKey": "…"}'
```

**Returns**

The same as `GET /api/routines`.

### `PUT /api/routines/{rid}`

**Change routine**

- **Who may:** Anybody signed in
- **Path parameters:** `rid` (integer)
- **JSON body:** `name`, `description`, `projectKey`, `steps`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/routines/{rid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "projectKey": "…", "steps": "…"}'
```

**Returns**

JSON.

### `DELETE /api/routines/{rid}`

**Delete routine**

- **Who may:** Anybody signed in
- **Path parameters:** `rid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/routines/{rid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `GET /api/routines/{rid}/questions`

**List questions (routine)**

What has to be answered before this routine can run.

- **Who may:** Anybody signed in
- **Path parameters:** `rid` (integer)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/routines/{rid}/questions' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`routine`, `questions`

### `POST /api/routines/{rid}/run`

**Run – routine**

Create what the routine describes, in one go.

The first step that is an epic becomes the parent of everything marked as
belonging under it - which is the shape almost every routine has: one epic
and the work inside it.

- **Who may:** Permission: `create`
- **Path parameters:** `rid` (integer)
- **JSON body:** `answers`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/routines/{rid}/run' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"answers": "…"}'
```

**Returns**

`created`, `project`


## Area: `screen-schemes`

<a id="area-screen-schemes"></a>

Screen schemes: which fields a form shows, per issue type and operation.

### `GET /api/screen-schemes`

**List screen schemes**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/screen-schemes' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `schemes` | array |  |
| `schemes[].id` | integer | `1` |
| `schemes[].name` | string | `"Default screen"` |
| `schemes[].description` | string | `"The form as it has always been. Cannot be changed, and is w` |
| `schemes[].isDefault` | boolean | `true` |
| `schemes[].created` | string | `"2026-11-21T21:18:53Z"` |
| `schemes[].fields` | array |  |
| `standard` | array |  |
| `standard[].key` | string | `"summary"` |
| `standard[].name` | string | `"Summary"` |
| `custom` | array |  |
| `unremovable` | array |  |
| `assignments` | array |  |
| `projects` | array |  |
| `projects[].key` | string | `"HLP"` |
| `projects[].name` | string | `"Helpdesk"` |
| `types` | array |  |
| `types[].id` | integer | `1` |
| `types[].name` | string | `"Epic"` |

<details><summary>Example answer</summary>

```json
{
  "schemes": [
    {
      "id": 1,
      "name": "Default screen",
      "description": "The form as it has always been. Cannot be changed, and is what a project uses…",
      "isDefault": true,
      "created": "2026-11-21T21:18:53Z",
      "fields": [
        {
          "key": "summary",
          "position": 0,
          "required": true
        },
        {
          "key": "description",
          "position": 1,
          "required": false
        },
        "…"
      ]
    }
  ],
  "standard": [
    {
      "key": "summary",
      "name": "Summary"
    },
    {
      "key": "description",
      "name": "Description"
    },
    "…"
  ],
  "custom": [],
  "unremovable": [
    "issuetype",
    "summary"
  ],
  "assignments": [],
  "projects": [
    {
      "key": "HLP",
      "name": "Helpdesk"
    },
    {
      "key": "LNS",
      "name": "Lantern Sync"
    },
    "…"
  ],
  "types": [
    {
      "id": 1,
      "name": "Epic"
    },
    {
      "id": 2,
      "name": "Story"
    },
    "…"
  ]
}
```

</details>

### `POST /api/screen-schemes`

**Create screen scheme**

- **Who may:** Administrators
- **JSON body:** `name`, `description`, `copyFrom`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/screen-schemes' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "copyFrom": "…"}'
```

**Returns**

The same as `GET /api/screen-schemes`.

### `PUT /api/screen-schemes/{sid}`

**Change screen scheme**

- **Who may:** Administrators
- **Path parameters:** `sid` (integer)
- **JSON body:** `name`, `description`, `fields`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/screen-schemes/{sid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "fields": "…"}'
```

**Returns**

JSON.

### `DELETE /api/screen-schemes/{sid}`

**Delete screen scheme**

- **Who may:** Administrators
- **Path parameters:** `sid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/screen-schemes/{sid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `POST /api/screen-schemes/{sid}/assign`

**Assign – screen scheme**

Hang a scheme on a project, for one issue type or for all of them.

- **Who may:** Administrators
- **Path parameters:** `sid` (integer)
- **JSON body:** `project`, `typeId`, `remove`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/screen-schemes/{sid}/assign' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"project": "…", "typeId": "…", "remove": "…"}'
```

**Returns**

`project`, `typeId`, `scheme`


## Area: `search`

<a id="area-search"></a>

Searching issues with MQL, and exporting the result.

### `GET /api/search`

**Read search**

- **Who may:** Anybody signed in
- **Query parameters:** `mql` (string), `jql` (string), `limit` (int, default 200), `offset` (int, default 0)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/search?mql=…&jql=…&limit=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `total` | integer | `38` |
| `issues` | array |  |
| `issues[].id` | integer | `1` |
| `issues[].key` | string | `"ORB-1"` |
| `issues[].seq` | integer | `1` |
| `issues[].summary` | string | `"Collection based licensing"` |
| `issues[].description` | string | `"Move licensing from per-app to collection based entitlement` |
| `issues[].descriptionHtml` | null | `null` |
| `issues[].flagged` | boolean | `false` |
| `issues[].project` | object |  |
| `issues[].type` | object |  |
| `issues[].status` | object |  |
| `issues[].priority` | object |  |
| `issues[].assignee` | object |  |
| `issues[].reporter` | object |  |
| `issues[].sprint` | null | `null` |
| `issues[].epic` | null | `null` |
| `issues[].parent` | null | `null` |
| `issues[].storyPoints` | null | `null` |
| `issues[].labels` | array |  |
| `issues[].components` | array |  |
| `issues[].fixVersion` | string | `""` |
| `issues[].epicColor` | string | `"#904EE2"` |
| `issues[].rank` | number | `2000.0` |
| `issues[].dueDate` | null | `null` |
| `issues[].releaseDate` | null | `null` |
| `issues[].bitbucketProject` | null | `null` |
| `issues[].participants` | array |  |
| `issues[].bitbucketRepo` | null | `null` |
| `issues[].startDate` | null | `null` |
| `issues[].disturbanceSprintId` | null | `null` |
| `issues[].sourceKey` | null | `null` |
| `issues[].releaseDescription` | string | `""` |
| `issues[].releaseDescriptionHtml` | null | `null` |
| `issues[].endDate` | null | `null` |
| `issues[].estimate` | null | `null` |
| `issues[].timeLeft` | null | `null` |
| `issues[].progress` | null | `null` |
| `issues[].created` | string | `"2026-09-22T21:18:53Z"` |
| `issues[].updated` | string | `"2026-09-22T21:18:53Z"` |

<details><summary>Example answer</summary>

```json
{
  "total": 38,
  "issues": [
    {
      "id": 1,
      "key": "ORB-1",
      "seq": 1,
      "summary": "Collection based licensing",
      "description": "Move licensing from per-app to collection based entitlements.",
      "descriptionHtml": null,
      "flagged": false,
      "project": {
        "id": 1,
        "key": "ORB",
        "name": "Orbit Portal",
        "color": "#0052CC"
      },
      "type": {
        "id": 1,
        "name": "Epic",
        "icon": "epic",
        "color": "#904EE2",
        "subtask": false
      },
      "status": {
        "id": 2,
        "name": "In Progress",
        "category": "inprogress"
      },
      "priority": {
        "id": 2,
        "name": "High",
        "icon": "up",
        "color": "#E9494A"
      },
      "assignee": {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "avatarColor": "#0052CC",
        "active": true
      },
      "reporter": {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "avatarColor": "#0052CC",
        "active": true
      },
      "sprint": null,
      "epic": null,
      "parent": null,
      "storyPoints": null,
      "labels": [
        "licensing"
      ],
      "components": [],
      "fixVersion": "",
      "epicColor": "#904EE2",
      "rank": 2000.0,
      "dueDate": null,
      "releaseDate": null,
      "bitbucketProject": null
    },
    {
      "id": 2,
      "key": "ORB-2",
      "seq": 2,
      "summary": "Rename the light edition",
      "description": "Split the light edition into two smaller tools.",
      "descriptionHtml": null,
      "flagged": false,
      "project": {
        "id": 1,
        "key": "ORB",
        "name": "Orbit Portal",
        "color": "#0052CC"
      },
     
…
```

</details>

### `GET /api/search/export.{fmt}`

**Export export.<fmt> as a file**

A query's issues as a file - PDF, Excel or CSV - run with the rights of the person
asking, as the list in the box is: only what they may see.

- **Who may:** Anybody signed in
- **Path parameters:** `fmt` (string)
- **Query parameters:** `mql` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/search/export.{fmt}?mql=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.


## Area: `sprints`

<a id="area-sprints"></a>

Sprints: starting, completing, their issues and charts.

### `PUT /api/sprints/{sid}`

**Change sprint**

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer)
- **JSON body:** `name`, `goal`, `startDate`, `endDate`, `state`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/sprints/{sid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "goal": "…", "startDate": "…", "endDate": "…", "state": "…"}'
```

**Returns**

JSON.

### `DELETE /api/sprints/{sid}`

**Delete sprint**

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/sprints/{sid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `GET /api/sprints/{sid}/burndown`

**Read burndown (sprint)**

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/sprints/{sid}/burndown' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `sprint` | object |  |
| `sprint.id` | integer | `1` |
| `sprint.boardId` | integer | `1` |
| `sprint.name` | string | `"Orbit Sprint 12"` |
| `sprint.goal` | string | `""` |
| `sprint.state` | string | `"closed"` |
| `sprint.startDate` | string | `"2026-10-19T21:18:53Z"` |
| `sprint.endDate` | string | `"2026-11-02T21:18:53Z"` |
| `sprint.completeDate` | string | `"2026-11-02T21:18:53Z"` |
| `sprint.committedPoints` | number | `21.0` |
| `sprint.completedPoints` | number | `21.0` |
| `sprint.issueCount` | integer | `4` |
| `sprint.points` | number | `21.0` |
| `sprint.donePoints` | number | `21.0` |
| `sprint.doneCount` | integer | `4` |
| `total` | number | `21.0` |
| `actual` | array |  |
| `actual[].date` | string | `"2026-10-19"` |
| `actual[].remaining` | number | `21.0` |
| `ideal` | array |  |
| `ideal[].date` | string | `"2026-10-19"` |
| `ideal[].remaining` | number | `21.0` |

<details><summary>Example answer</summary>

```json
{
  "sprint": {
    "id": 1,
    "boardId": 1,
    "name": "Orbit Sprint 12",
    "goal": "",
    "state": "closed",
    "startDate": "2026-10-19T21:18:53Z",
    "endDate": "2026-11-02T21:18:53Z",
    "completeDate": "2026-11-02T21:18:53Z",
    "committedPoints": 21.0,
    "completedPoints": 21.0,
    "issueCount": 4,
    "points": 21.0,
    "donePoints": 21.0,
    "doneCount": 4
  },
  "total": 21.0,
  "actual": [
    {
      "date": "2026-10-19",
      "remaining": 21.0
    },
    {
      "date": "2026-10-20",
      "remaining": 21.0
    },
    "…"
  ],
  "ideal": [
    {
      "date": "2026-10-19",
      "remaining": 21.0
    },
    {
      "date": "2026-10-20",
      "remaining": 19.5
    },
    "…"
  ]
}
```

</details>

### `POST /api/sprints/{sid}/complete`

**Complete – sprint**

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer)
- **JSON body:** `moveToSprintId`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/sprints/{sid}/complete' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"moveToSprintId": "…"}'
```

**Returns**

`sprint`, `moved`

### `POST /api/sprints/{sid}/disturbances`

**Create disturbance (sprint)**

Mark an issue that already exists as a disturbance of this sprint.

Not every interruption arrives as a new ticket - often the work is already
written down somewhere and simply lands in a running sprint. This pulls it
in and marks it, so the sprint report counts it like any other disturbance.

- **Who may:** Permission: `edit`
- **Path parameters:** `sid` (integer)
- **JSON body:** `keys`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/sprints/{sid}/disturbances' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"keys": "…"}'
```

**Returns**

`sprint`, `issues`

### `POST /api/sprints/{sid}/sort-by-epic`

**Send sort by epic (sprint)**

The button for a sprint as it is: its issues brought together by epic, once, now.

- **Who may:** Permission: `edit`
- **Path parameters:** `sid` (integer)

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/sprints/{sid}/sort-by-epic' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`ok`

### `POST /api/sprints/{sid}/start`

**Start – sprint**

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer)
- **JSON body:** `startDate`, `endDate`, `lengthDays`, `goal`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/sprints/{sid}/start' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"startDate": "…", "endDate": "…", "lengthDays": "…", "goal": "…"}'
```

**Returns**

JSON.


## Area: `statuses`

<a id="area-statuses"></a>

Statuses and their categories (to do, in progress, done).

### `POST /api/statuses`

**Create status**

- **Who may:** Administrators
- **JSON body:** `name`, `category`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/statuses' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "category": "…"}'
```

**Returns**

JSON.

### `PUT /api/statuses/{sid}`

**Change status**

Rename a status or move it to another category.

The category is what the board, the reports and the sprint actions read, so
a wrong one is worth correcting rather than working around. Changing it
changes the meaning of every issue in that status at once - the answer says
how many that is.

- **Who may:** Administrators
- **Path parameters:** `sid` (integer)
- **JSON body:** `name`, `category`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/statuses/{sid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "category": "…"}'
```

**Returns**

`affected`, `categoryChanged`

### `DELETE /api/statuses/{sid}`

**Delete status**

Remove a status nothing points at any more.

- **Who may:** Administrators
- **Path parameters:** `sid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/statuses/{sid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`


## Area: `structures`

<a id="area-structures"></a>

Structures: issues arranged as a tree, with columns of your choice.

### `GET /api/structures`

**List structures**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/structures' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `structures` | array |  |
| `structures[].id` | integer | `1` |
| `structures[].name` | string | `"Delivery overview"` |
| `structures[].description` | string | `"Everything in flight, grouped by epic."` |
| `structures[].shared` | string | `"read"` |
| `structures[].columns` | array |  |
| `structures[].mql` | string | `""` |
| `structures[].owner` | object |  |
| `structures[].permission` | string | `"owner"` |
| `structures[].canEdit` | boolean | `true` |
| `structures[].isOwner` | boolean | `true` |
| `structures[].shares` | array |  |
| `structures[].projects` | array |  |
| `lastId` | null | `null` |
| `columns` | object |  |
| `columns.epicName` | string | `"Epic name"` |
| `columns.type` | string | `"Symbol"` |
| `columns.key` | string | `"Key"` |
| `columns.summary` | string | `"Summary"` |
| `columns.symbolSummary` | string | `"Symbol + summary (combined)"` |
| `columns.description` | string | `"Description"` |
| `columns.releaseDate` | string | `"Release date"` |
| `columns.fixVersion` | string | `"Fix version"` |
| `columns.startDate` | string | `"Start date"` |
| `columns.endDate` | string | `"End date"` |
| `columns.releaseDescription` | string | `"Release description"` |
| `columns.bothDescriptions` | string | `"Description + release description (combined)"` |
| `columns.status` | string | `"Status"` |
| `columns.priority` | string | `"Priority"` |
| `columns.assignee` | string | `"Assignee"` |
| `columns.sprint` | string | `"Sprint"` |
| `columns.points` | string | `"Story points"` |
| `columns.estimate` | string | `"Estimate"` |
| `columns.spent` | string | `"Time spent"` |
| `columns.updated` | string | `"Last updated"` |
| `columns.participants` | string | `"Participants"` |
| `columns.sumPoints` | string | `"Σ Story points"` |
| `columns.sumEstimate` | string | `"Σ Estimate"` |
| `columns.sumSpent` | string | `"Σ Time spent"` |
| `columns.progress` | string | `"Progress"` |

<details><summary>Example answer</summary>

```json
{
  "structures": [
    {
      "id": 1,
      "name": "Delivery overview",
      "description": "Everything in flight, grouped by epic.",
      "shared": "read",
      "columns": [
        "epicName",
        "type",
        "…"
      ],
      "mql": "",
      "owner": {
        "id": 1,
        "username": "mkoch",
        "displayName": "Marie Koch",
        "email": "marie.koch@example.invalid",
        "avatarColor": "#0052CC",
        "isAdmin": true,
        "active": true,
        "clockPrompt": true,
        "avatarUrl": null
      },
      "permission": "owner",
      "canEdit": true,
      "isOwner": true,
      "shares": [],
      "projects": [
        {
          "id": 1,
          "key": "ORB",
          "name": "Orbit Portal",
          "avatarColor": "#0052CC",
          "generators": []
        },
        {
          "id": 2,
          "key": "LNS",
          "name": "Lantern Sync",
          "avatarColor": "#5243AA",
          "generators": []
        },
        "…"
      ]
    }
  ],
  "lastId": null,
  "columns": {
    "epicName": "Epic name",
    "type": "Symbol",
    "key": "Key",
    "summary": "Summary",
    "symbolSummary": "Symbol + summary (combined)",
    "description": "Description",
    "releaseDate": "Release date",
    "fixVersion": "Fix version",
    "startDate": "Start date",
    "endDate": "End date",
    "releaseDescription": "Release description",
    "bothDescriptions": "Description + release description (combined)",
    "status": "Status",
    "priority": "Priority",
    "assignee": "Assignee",
    "sprint": "Sprint",
    "points": "Story points",
    "estimate": "Estimate",
    "spent": "Time spent",
    "updated": "Last updated",
    "participants": "Participants",
    "sumPoints": "Σ Story points",
    "sumEstimate": "Σ Estimate
…
```

</details>

### `POST /api/structures`

**Create structure**

- **Who may:** Anybody signed in
- **JSON body:** `name`, `description`, `shared`, `columns`, `mql`, `projectIds`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/structures' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "shared": "…", "columns": "…", "mql": "…", "projectIds": "…"}'
```

**Returns**

The same as `GET /api/structures`.

### `GET /api/structures/{sid}`

**Read structure**

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer)
- **Query parameters:** `hideReleased` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/structures/{sid}?hideReleased=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `id` | integer | `1` |
| `name` | string | `"Delivery overview"` |
| `description` | string | `"Everything in flight, grouped by epic."` |
| `shared` | string | `"read"` |
| `columns` | array |  |
| `mql` | string | `""` |
| `owner` | object |  |
| `owner.id` | integer | `1` |
| `owner.username` | string | `"mkoch"` |
| `owner.displayName` | string | `"Marie Koch"` |
| `owner.email` | string | `"marie.koch@example.invalid"` |
| `owner.avatarColor` | string | `"#0052CC"` |
| `owner.isAdmin` | boolean | `true` |
| `owner.active` | boolean | `true` |
| `owner.clockPrompt` | boolean | `true` |
| `owner.avatarUrl` | null | `null` |
| `permission` | string | `"owner"` |
| `canEdit` | boolean | `true` |
| `isOwner` | boolean | `true` |
| `shares` | array |  |
| `projects` | array |  |
| `projects[].id` | integer | `1` |
| `projects[].key` | string | `"ORB"` |
| `projects[].name` | string | `"Orbit Portal"` |
| `projects[].avatarColor` | string | `"#0052CC"` |
| `projects[].generators` | array |  |
| `rows` | array |  |
| `rows[].kind` | string | `"project"` |
| `rows[].id` | string | `"p1"` |
| `rows[].projectId` | integer | `1` |
| `rows[].title` | string | `"Orbit Portal"` |
| `rows[].projectKey` | string | `"ORB"` |
| `rows[].colour` | string | `"#0052CC"` |
| `rows[].children` | array |  |
| `rows[].generators` | array |  |
| `rows[].source` | string | `"manual"` |
| `rows[].structureId` | integer | `1` |
| `rows[].totals` | object |  |
| `hideReleased` | boolean | `false` |
| `filterError` | null | `null` |

<details><summary>Example answer</summary>

```json
{
  "id": 1,
  "name": "Delivery overview",
  "description": "Everything in flight, grouped by epic.",
  "shared": "read",
  "columns": [
    "epicName",
    "type",
    "…"
  ],
  "mql": "",
  "owner": {
    "id": 1,
    "username": "mkoch",
    "displayName": "Marie Koch",
    "email": "marie.koch@example.invalid",
    "avatarColor": "#0052CC",
    "isAdmin": true,
    "active": true,
    "clockPrompt": true,
    "avatarUrl": null
  },
  "permission": "owner",
  "canEdit": true,
  "isOwner": true,
  "shares": [],
  "projects": [
    {
      "id": 1,
      "key": "ORB",
      "name": "Orbit Portal",
      "avatarColor": "#0052CC",
      "generators": []
    },
    {
      "id": 2,
      "key": "LNS",
      "name": "Lantern Sync",
      "avatarColor": "#5243AA",
      "generators": []
    },
    "…"
  ],
  "rows": [
    {
      "kind": "project",
      "id": "p1",
      "projectId": 1,
      "title": "Orbit Portal",
      "projectKey": "ORB",
      "colour": "#0052CC",
      "children": [
        {
          "kind": "issue",
          "id": "i3",
          "issueId": 3,
          "issue": {
            "id": 3,
            "key": "ORB-3",
            "seq": 3,
            "summary": "Admin UI refresh",
            "description": "",
            "descriptionHtml": null,
            "flagged": false,
            "project": {
              "id": 1,
              "key": "ORB",
              "name": "Orbit Portal",
              "color": "#0052CC"
            },
            "type": {
              "id": 1,
              "name": "Epic",
              "icon": "epic",
              "color": "#904EE2",
              "subtask": false
            },
            "status": {
              "id": 1,
              "name": "To Do",
              "category": "todo"
            },
       
…
```

</details>

### `PUT /api/structures/{sid}`

**Change structure**

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer)
- **JSON body:** `name`, `description`, `shared`, `columns`, `mql`, `projectIds`, `shares`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/structures/{sid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "shared": "…", "columns": "…", "mql": "…", "projectIds": "…", "shares": "…"}'
```

**Returns**

The same as `GET /api/structures/{sid}`.

### `DELETE /api/structures/{sid}`

**Delete structure**

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/structures/{sid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `POST /api/structures/{sid}/copy`

**Copy – structure**

A second structure with the same setup, owned by whoever copies it.

Columns, MQL and the projects come along; the sharing does not - the copy
belongs to the person making it, and who else should see it is their
decision, not an inheritance.

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer)
- **JSON body:** `name`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/structures/{sid}/copy' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…"}'
```

**Returns**

JSON.

### `PUT /api/structures/{sid}/projects/{pid}`

**Change project (structure)**

Generator chain of one project inside a structure.

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer), `pid` (integer)
- **JSON body:** `generators`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/structures/{sid}/projects/{pid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"generators": "…"}'
```

**Returns**

`ok`

### `POST /api/structures/{sid}/rows`

**Create row (structure)**

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer)
- **JSON body:** `parentId`, `kind`, `issue`, `title`, `generators`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/structures/{sid}/rows' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"parentId": "…", "kind": "…", "issue": "…", "title": "…", "generators": "…"}'
```

**Returns**

`id`

### `PUT /api/structures/{sid}/rows/{rid}`

**Change row (structure)**

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer), `rid` (integer)
- **JSON body:** `title`, `position`, `generators`, `parentId`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/structures/{sid}/rows/{rid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"title": "…", "position": "…", "generators": "…", "parentId": "…"}'
```

**Returns**

`ok`

### `DELETE /api/structures/{sid}/rows/{rid}`

**Delete row (structure)**

- **Who may:** Anybody signed in
- **Path parameters:** `sid` (integer), `rid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/structures/{sid}/rows/{rid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`


## Area: `system/accent`

<a id="area-system-accent"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/accent`

**Read accent colour**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/accent' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `color` | string | `"#50226B"` |
| `auto` | boolean | `true` |
| `isDefault` | boolean | `true` |
| `palette` | object |  |
| `palette.accent` | string | `"#50226B"` |
| `palette.hover` | string | `"#68407F"` |
| `palette.deep` | string | `"#39184D"` |
| `palette.soft` | string | `"#EDE8F0"` |
| `palette.darkAccent` | string | `"#9E85AD"` |
| `palette.darkHover` | string | `"#B9A6C3"` |
| `palette.darkSoft` | string | `"#240F30"` |

<details><summary>Example answer</summary>

```json
{
  "color": "#50226B",
  "auto": true,
  "isDefault": true,
  "palette": {
    "accent": "#50226B",
    "hover": "#68407F",
    "deep": "#39184D",
    "soft": "#EDE8F0",
    "darkAccent": "#9E85AD",
    "darkHover": "#B9A6C3",
    "darkSoft": "#240F30"
  }
}
```

</details>

### `PUT /api/system/accent`

**Change accent colour**

- **Who may:** Administrators
- **JSON body:** `auto`, `color`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/accent' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"auto": "…", "color": "…"}'
```

**Returns**

`palette`


## Area: `system/ai`

<a id="area-system-ai"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/ai`

**Read AI assistant**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/ai' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `kind` | string | `"ollama"` |
| `baseUrl` | string | `""` |
| `defaultUrl` | string | `"http://127.0.0.1:11434"` |
| `chatModel` | string | `""` |
| `embedModel` | string | `""` |
| `toolModel` | string | `""` |
| `mode` | string | `"guided"` |
| `basicUser` | string | `""` |
| `context` | integer | `16384` |
| `hasKey` | boolean | `false` |
| `hasBasicPassword` | boolean | `false` |
| `enabled` | boolean | `false` |
| `ready` | boolean | `false` |
| `leaves` | boolean | `true` |
| `destination` | string | `""` |
| `consent` | null | `null` |
| `index` | object |  |
| `index.documents` | integer | `0` |
| `index.withVectors` | integer | `0` |
| `index.waiting` | integer | `38` |
| `index.lastRound` | null | `null` |
| `index.lastError` | null | `null` |

<details><summary>Example answer</summary>

```json
{
  "kind": "ollama",
  "baseUrl": "",
  "defaultUrl": "http://127.0.0.1:11434",
  "chatModel": "",
  "embedModel": "",
  "toolModel": "",
  "mode": "guided",
  "basicUser": "",
  "context": 16384,
  "hasKey": false,
  "hasBasicPassword": false,
  "enabled": false,
  "ready": false,
  "leaves": true,
  "destination": "",
  "consent": null,
  "index": {
    "documents": 0,
    "withVectors": 0,
    "waiting": 38,
    "lastRound": null,
    "lastError": null
  }
}
```

</details>

### `PUT /api/system/ai`

**Change AI assistant**

Saved as given. Switching on with an address that leaves this server needs
the administrator's confirmation of exactly that address.

- **Who may:** Administrators
- **JSON body:** `kind`, `baseUrl`, `chatModel`, `embedModel`, `toolModel`, `mode`, `basicUser`, `context`, `apiKey`, `clearApiKey`, `basicPassword`, `confirmLeaves`, `confirmHost`, `enabled`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/ai' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"kind": "…", "baseUrl": "…", "chatModel": "…", "embedModel": "…", "toolModel": "…", "mode": "…", "basicUser": "…", "context": "…"}'
```

**Returns**

The same as `GET /api/system/ai`.

### `GET /api/system/ai/cases`

**List test cases**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/ai/cases' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `cases` | array |  |

<details><summary>Example answer</summary>

```json
{
  "cases": []
}
```

</details>

### `POST /api/system/ai/cases`

**Create test case**

A question and what a right answer holds: the issues of an MQL query (all of
them, the first, or their number), or issues that must be among the sources.

- **Who may:** Administrators
- **JSON body:** `question`, `expect`, `expected`, `example`, `note`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/ai/cases' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"question": "…", "expect": "…", "expected": "…", "example": "…", "note": "…"}'
```

**Returns**

The same as `GET /api/system/ai/cases`.

### `POST /api/system/ai/cases/standard`

**Create standard question**

The standard questions - the ones that went wrong once - into the catalogue: the
measure every change to the assistant is held against. A question already there is
left as it is.

- **Who may:** Administrators

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/ai/cases/standard' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`added`

### `DELETE /api/system/ai/cases/{cid}`

**Delete test case**

- **Who may:** Administrators
- **Path parameters:** `cid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/system/ai/cases/{cid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`ok`

### `GET /api/system/ai/glossary`

**List glossary**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/ai/glossary' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `terms` | array |  |
| `terms[].id` | integer | `2` |
| `terms[].term` | string | `"laufender Sprint"` |
| `terms[].meaning` | string | `"the running sprint: sprint in openSprints()"` |

<details><summary>Example answer</summary>

```json
{
  "terms": [
    {
      "id": 2,
      "term": "laufender Sprint",
      "meaning": "the running sprint: sprint in openSprints()"
    },
    {
      "id": 1,
      "term": "überfällig",
      "meaning": "past its due date: duedate < now() AND statusCategory != done"
    }
  ]
}
```

</details>

### `POST /api/system/ai/glossary`

**Create glossary term**

A word of this team and what it means here - "überfällig", "Greenleaf", "der Orbit-Sprint".

- **Who may:** Administrators
- **JSON body:** `term`, `meaning`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/ai/glossary' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"term": "…", "meaning": "…"}'
```

**Returns**

`ok`

### `DELETE /api/system/ai/glossary/{gid}`

**Delete glossary term**

- **Who may:** Administrators
- **Path parameters:** `gid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/system/ai/glossary/{gid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`ok`

### `GET /api/system/ai/log`

**List log**

The last questions, for the administrator: way, steps, query, outcome, time, thumbs.

- **Who may:** Administrators
- **Query parameters:** `limit` (int, default 50)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/ai/log?limit=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `entries` | array |  |
| `days` | integer | `30` |

<details><summary>Example answer</summary>

```json
{
  "entries": [],
  "days": 30
}
```

</details>

### `POST /api/system/ai/reindex`

**Rebuild the index – AI assistant**

Everything again - after a change of model, or to be sure.

- **Who may:** Administrators

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/ai/reindex' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.

### `GET /api/system/ai/runs`

**List runs**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/ai/runs' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `runs` | array |  |

<details><summary>Example answer</summary>

```json
{
  "runs": []
}
```

</details>

### `POST /api/system/ai/runs`

**Create run**

The whole catalogue against the model in use - in the background; the page asks
for progress. mode: the way to test, guided or agent, so the two can be compared.

- **Who may:** Administrators
- **JSON body:** `mode`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/ai/runs' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"mode": "…"}'
```

**Returns**

`id`

### `POST /api/system/ai/test`

**Test – AI assistant**

Reaches the server, lists its models, and has the chosen one say a word.

- **Who may:** Administrators
- **JSON body:** `kind`, `baseUrl`, `chatModel`, `embedModel`, `basicUser`, `apiKey`, `basicPassword`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/ai/test' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"kind": "…", "baseUrl": "…", "chatModel": "…", "embedModel": "…", "basicUser": "…", "apiKey": "…", "basicPassword": "…"}'
```

**Returns**

JSON.


## Area: `system/announcement`

<a id="area-system-announcement"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/announcement`

**Read announcement**

Readable by anybody signed in - everybody is meant to see it.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/announcement' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `message` | string | `""` |
| `active` | boolean | `false` |
| `updatedBy` | null | `null` |
| `updated` | string | `"2026-11-21T21:18:58Z"` |

<details><summary>Example answer</summary>

```json
{
  "message": "",
  "active": false,
  "updatedBy": null,
  "updated": "2026-11-21T21:18:58Z"
}
```

</details>

### `PUT /api/system/announcement`

**Change announcement**

- **Who may:** Administrators
- **JSON body:** `message`, `active`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/announcement' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"message": "…", "active": "…"}'
```

**Returns**

The same as `GET /api/system/announcement`.


## Area: `system/applinks`

<a id="area-system-applinks"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/applinks`

**Read applinks**

The application links of this installation. Administrators.

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/applinks' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `links` | array |  |
| `product` | string | `"mgproject"` |

<details><summary>Example answer</summary>

```json
{
  "links": [],
  "product": "mgproject"
}
```

</details>

### `POST /api/system/applinks`

**Send applinks**

Set up a link: the other application's address, an administrator's login there (password or API
token - used once, not kept) and this installation's address as the other one reaches it.

- **Who may:** Administrators
- **JSON body:** `base_url`, `username`, `secret`, `own_url`, `own_name`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/applinks' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"base_url": "…", "username": "…", "secret": "…", "own_url": "…", "own_name": "…"}'
```

**Returns**

`link`

### `POST /api/system/applinks/browser`

**Send browser**

Set up a link in the browser - no password, no token: the address to open, where you approve the link
signed in over there as you are (any identity provider it has, or a password); that application checks you are one of its
administrators. Back here, /api/system/applinks/complete keeps it.

- **Who may:** Administrators
- **JSON body:** `base_url`, `own_url`, `own_name`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/applinks/browser' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"base_url": "…", "own_url": "…", "own_name": "…"}'
```

**Returns**

JSON.

### `POST /api/system/applinks/complete`

**Complete – applinks**

The browser is back from approving the link over there, with that side's key: kept here too - only for
the administrator who started it.

- **Who may:** Administrators

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/applinks/complete' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`link`

### `DELETE /api/system/applinks/{link_id}`

**Delete applinks**

Remove a link - here and in the other application.

- **Who may:** Administrators
- **Path parameters:** `link_id` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/system/applinks/{link_id}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`error`, `ok`, `other_side`

### `POST /api/system/applinks/{link_id}/test`

**Test – applinks**

Ask the other application as whom it sees you over the link.

- **Who may:** Administrators
- **Path parameters:** `link_id` (integer)

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/applinks/{link_id}/test' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`error`


## Area: `system/audit`

<a id="area-system-audit"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/audit`

**List audit log**

The audit log, newest first, filtered by person, text and dates.

- **Who may:** Administrators
- **Query parameters:** `limit` (int, default 100)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/audit?limit=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `entries` | array |  |
| `entries[].id` | integer | `3` |
| `entries[].at` | string | `"2026-11-21T21:18:54Z"` |
| `entries[].actor_id` | null | `null` |
| `entries[].actor` | null | `null` |
| `entries[].ip` | string | `"127.0.0.1"` |
| `entries[].action` | string | `"POST /api/auth/passkeys/login/begin"` |
| `entries[].target` | null | `null` |
| `entries[].details` | string | `"{}"` |
| `entries[].status` | integer | `200` |
| `more` | boolean | `false` |

<details><summary>Example answer</summary>

```json
{
  "entries": [
    {
      "id": 3,
      "at": "2026-11-21T21:18:54Z",
      "actor_id": null,
      "actor": null,
      "ip": "127.0.0.1",
      "action": "POST /api/auth/passkeys/login/begin",
      "target": null,
      "details": "{}",
      "status": 200
    },
    {
      "id": 2,
      "at": "2026-11-21T21:18:54Z",
      "actor_id": null,
      "actor": null,
      "ip": "127.0.0.1",
      "action": "sign-in failed",
      "target": "",
      "details": null,
      "status": 401
    },
    "…"
  ],
  "more": false
}
```

</details>


## Area: `system/audit.csv`

<a id="area-system-audit-csv"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/audit.csv`

**Export audit log as CSV**

The same, as a CSV file - for an auditor, or a SIEM import.

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/audit.csv' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

A file (text/csv).


## Area: `system/bitbucket`

<a id="area-system-bitbucket"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/bitbucket`

**Read Bitbucket connection**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/bitbucket' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `enabled` | boolean | `false` |
| `username` | string | `""` |
| `workspace` | string | `""` |
| `hasPassword` | boolean | `false` |
| `checked` | null | `null` |
| `account` | null | `null` |
| `scopes` | array |  |
| `legacyScopes` | array |  |

<details><summary>Example answer</summary>

```json
{
  "enabled": false,
  "username": "",
  "workspace": "",
  "hasPassword": false,
  "checked": null,
  "account": null,
  "scopes": [
    "read:user:bitbucket",
    "read:project:bitbucket",
    "…"
  ],
  "legacyScopes": [
    "Account: Read",
    "Projects: Read",
    "…"
  ]
}
```

</details>

### `PUT /api/system/bitbucket`

**Change Bitbucket connection**

- **Who may:** Administrators
- **JSON body:** `username`, `workspace`, `password`, `clearPassword`, `enabled`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/bitbucket' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"username": "…", "workspace": "…", "password": "…", "clearPassword": "…", "enabled": "…"}'
```

**Returns**

The same as `GET /api/system/bitbucket`.

### `POST /api/system/bitbucket/test`

**Test – Bitbucket connection**

Saves first, then asks Bitbucket who we are.

Saved first on purpose: a test that runs on unsaved input tells you about
something that is not there yet, and the next person to look sees different
settings than the ones that were tried.

- **Who may:** Administrators

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/bitbucket/test' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`workspaces`, `limited`


## Area: `system/branding`

<a id="area-system-branding"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/branding`

**Read logo and colours**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/branding' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `light` | null | `null` |
| `dark` | null | `null` |
| `favicon` | null | `null` |
| `folder` | string | `"/tmp/apidocs-4rcbnd1a/branding"` |
| `accept` | array |  |

<details><summary>Example answer</summary>

```json
{
  "light": null,
  "dark": null,
  "favicon": null,
  "folder": "/tmp/apidocs-4rcbnd1a/branding",
  "accept": [
    "image/jpeg",
    "image/png",
    "…"
  ]
}
```

</details>

### `POST /api/system/branding`

**Send logo and colours**

Take a new logo. One file per slot, and every other spelling of that slot
is removed: a leftover logo.svg beats a fresh logo.png in the reading order,
which is exactly the trap somebody would fall into here.

- **Who may:** Administrators
- **Query parameters:** `slot` (string)
- **JSON body:** `(multipart form: file)`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/branding?slot=…' \
  -H 'Authorization: Bearer $TOKEN' \
  -F 'file=@/path/to/file'
```

**Returns**

`accent`

### `DELETE /api/system/branding`

**Delete logo and colours**

Back to the logo that ships with MGProject.

- **Who may:** Administrators
- **Query parameters:** `slot` (string)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/system/branding?slot=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`removed`


## Area: `system/database`

<a id="area-system-database"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/database`

**Read database**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/database' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `backend` | string | `"postgres"` |
| `postgres` | object |  |
| `postgres.host` | string | `"127.0.0.1"` |
| `postgres.port` | integer | `5432` |
| `postgres.user` | string | `"mg"` |
| `postgres.dbname` | string | `"mgproject_apidocs_2989462_1795295932"` |
| `hasPassword` | boolean | `true` |
| `driverInstalled` | boolean | `true` |
| `counts` | object |  |
| `counts.users` | integer | `6` |
| `counts.projects` | integer | `3` |
| `counts.issues` | integer | `38` |
| `counts.comments` | integer | `12` |
| `counts.history` | integer | `61` |
| `configPath` | string | `"/tmp/apidocs-4rcbnd1a/database.json"` |

<details><summary>Example answer</summary>

```json
{
  "backend": "postgres",
  "postgres": {
    "host": "127.0.0.1",
    "port": 5432,
    "user": "mg",
    "dbname": "mgproject_apidocs_2989462_1795295932"
  },
  "hasPassword": true,
  "driverInstalled": true,
  "counts": {
    "users": 6,
    "projects": 3,
    "issues": 38,
    "comments": 12,
    "history": 61
  },
  "configPath": "/tmp/apidocs-4rcbnd1a/database.json"
}
```

</details>

### `POST /api/system/database/test`

**Test – database**

- **Who may:** Administrators
- **JSON body:** `password`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/database/test' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"password": "…"}'
```

**Returns**

`ok`, `error`


## Area: `system/db`

<a id="area-system-db"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `POST /api/system/db/query`

**Send query**

Run one statement. SELECT shows rows; anything else says how many it hit.

One statement at a time: a semicolon in the middle is refused, because a
second statement after a checked first one is exactly how this kind of page
gets abused.

- **Who may:** Administrators
- **JSON body:** `sql`, `preview`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/db/query' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"sql": "…", "preview": "…"}'
```

**Returns**

`kind`, `columns`, `rows`, `total`, `shown`, `table`, `message`

### `GET /api/system/db/table/{name}`

**Read table**

One page of a table, with a filter per column.

- **Who may:** Administrators
- **Path parameters:** `name` (string)
- **Query parameters:** `f_` (string), `page` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/db/table/{name}?f_=…&page=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `table` | string | `"users"` |
| `columns` | array |  |
| `columns[].name` | string | `"id"` |
| `columns[].type` | string | `"integer"` |
| `key` | string | `"id"` |
| `sealed` | array |  |
| `total` | integer | `6` |
| `page` | integer | `0` |
| `pages` | integer | `1` |
| `rows` | array |  |
| `rows[].id` | integer | `1` |
| `rows[].username` | string | `"mkoch"` |
| `rows[].display_name` | string | `"Marie Koch"` |
| `rows[].email` | string | `"marie.koch@example.invalid"` |
| `rows[].avatar_color` | string | `"#0052CC"` |
| `rows[].is_admin` | integer | `1` |
| `rows[].active` | integer | `1` |
| `rows[].created` | string | `"2026-11-21T21:18:53Z"` |
| `rows[].password_hash` | null | `null` |
| `rows[].must_change_password` | string | `"<hidden>"` |
| `rows[].password_changed` | null | `null` |
| `rows[].last_login` | null | `null` |
| `rows[].failed_logins` | integer | `0` |
| `rows[].locked_until` | null | `null` |
| `rows[].clock_prompt` | integer | `1` |
| `rows[].clock_asked` | null | `null` |
| `rows[].entra_oid` | null | `null` |
| `rows[].avatar_file` | null | `null` |
| `rows[].preferences` | null | `null` |
| `rows[].last_dashboard_id` | integer | `1` |

<details><summary>Example answer</summary>

```json
{
  "table": "users",
  "columns": [
    {
      "name": "id",
      "type": "integer"
    },
    {
      "name": "username",
      "type": "text"
    },
    "…"
  ],
  "key": "id",
  "sealed": [
    "client_secret",
    "credential_id",
    "…"
  ],
  "total": 6,
  "page": 0,
  "pages": 1,
  "rows": [
    {
      "id": 1,
      "username": "mkoch",
      "display_name": "Marie Koch",
      "email": "marie.koch@example.invalid",
      "avatar_color": "#0052CC",
      "is_admin": 1,
      "active": 1,
      "created": "2026-11-21T21:18:53Z",
      "password_hash": null,
      "must_change_password": "<hidden>",
      "password_changed": null,
      "last_login": null,
      "failed_logins": 0,
      "locked_until": null,
      "clock_prompt": 1,
      "clock_asked": null,
      "entra_oid": null,
      "avatar_file": null,
      "preferences": null,
      "last_dashboard_id": 1
    },
    {
      "id": 2,
      "username": "tbauer",
      "display_name": "Tom Bauer",
      "email": "tom.bauer@example.invalid",
      "avatar_color": "#00875A",
      "is_admin": 0,
      "active": 1,
      "created": "2026-11-21T21:18:53Z",
      "password_hash": null,
      "must_change_password": "<hidden>",
      "password_changed": null,
      "last_login": null,
      "failed_logins": 0,
      "locked_until": null,
      "clock_prompt": 1,
      "clock_asked": null,
      "entra_oid": null,
      "avatar_file": null,
      "preferences": null,
      "last_dashboard_id": null
    },
    "…"
  ]
}
```

</details>

### `PUT /api/system/db/table/{name}`

**Change table**

Change one value in one row, named by its key. Nothing else.

- **Who may:** Administrators
- **Path parameters:** `name` (string)
- **JSON body:** `column`, `keyColumn`, `keyValue`, `value`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/db/table/{name}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"column": "…", "keyColumn": "…", "keyValue": "…", "value": "…"}'
```

**Returns**

`table`, `column`, `was`, `now`

### `GET /api/system/db/tables`

**List database tables**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/db/tables' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `tables` | array |  |
| `tables[].name` | string | `"ai_cases"` |
| `tables[].rows` | integer | `0` |
| `backend` | string | `"postgres"` |
| `database` | string | `"127.0.0.1/mgproject_apidocs_2989462_1795295932"` |

<details><summary>Example answer</summary>

```json
{
  "tables": [
    {
      "name": "ai_cases",
      "rows": 0
    },
    {
      "name": "ai_docs",
      "rows": 0
    },
    "…"
  ],
  "backend": "postgres",
  "database": "127.0.0.1/mgproject_apidocs_2989462_1795295932"
}
```

</details>


## Area: `system/deactivated-tickets`

<a id="area-system-deactivated-tickets"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/deactivated-tickets`

**List tickets of deactivated people**

Tickets assigned to somebody who is deactivated - by hand or by the
directory sync. Without this they lie with a person who has left, and
nobody's list shows them. Open ones by default; ?done=1 adds the finished.

- **Who may:** Administrators
- **Query parameters:** `done` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/deactivated-tickets?done=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `tickets` | array |  |
| `people` | array |  |

<details><summary>Example answer</summary>

```json
{
  "tickets": [],
  "people": []
}
```

</details>


## Area: `system/entra`

<a id="area-system-entra"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/entra`

**List Microsoft Entra settings**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/entra' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `enabled` | boolean | `false` |
| `tenantId` | string | `""` |
| `clientId` | string | `""` |
| `hasSecret` | boolean | `false` |
| `autoCreate` | boolean | `true` |
| `domainAllowList` | string | `""` |
| `entraOnly` | boolean | `false` |
| `syncEnabled` | boolean | `false` |
| `syncHours` | integer | `12` |
| `deactivateMissing` | boolean | `false` |
| `lastSync` | null | `null` |
| `lastSyncResult` | string | `""` |
| `redirectUri` | string | `"http://localhost/auth/entra/callback"` |

<details><summary>Example answer</summary>

```json
{
  "enabled": false,
  "tenantId": "",
  "clientId": "",
  "hasSecret": false,
  "autoCreate": true,
  "domainAllowList": "",
  "entraOnly": false,
  "syncEnabled": false,
  "syncHours": 12,
  "deactivateMissing": false,
  "lastSync": null,
  "lastSyncResult": "",
  "redirectUri": "http://localhost/auth/entra/callback"
}
```

</details>

### `PUT /api/system/entra`

**Change Microsoft Entra settings**

- **Who may:** Administrators
- **JSON body:** `clientSecret`, `clearSecret`, `autoCreate`, `entraOnly`, `syncEnabled`, `syncHours`, `deactivateMissing`, `enabled`, `tenantId`, `clientId`, `domainAllowList`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/entra' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"clientSecret": "…", "clearSecret": "…", "autoCreate": "…", "entraOnly": "…", "syncEnabled": "…", "syncHours": "…", "deactivateMissing": "…", "enabled": "…"}'
```

**Returns**

The same as `GET /api/system/entra`.

### `POST /api/system/entra/sync`

**Run the sync – Microsoft Entra setting**

- **Who may:** Administrators

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/entra/sync' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.

### `POST /api/system/entra/test`

**Test – Microsoft Entra setting**

Read the tenant's discovery document - proves the tenant exists and that
this server can reach Microsoft.

- **Who may:** Administrators
- **JSON body:** `tenantId`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/entra/test' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"tenantId": "…"}'
```

**Returns**

`ok`, `error`, `issuer`, `authorization`, `redirectUri`


## Area: `system/identity`

<a id="area-system-identity"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/identity`

**List identity providers**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/identity' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `settings` | object |  |
| `settings.order` | array |  |
| `settings.onlyThroughIdp` | boolean | `false` |
| `providers` | object |  |
| `providers.entra` | object |  |
| `providers.entra.label` | string | `"Microsoft Entra"` |
| `providers.entra.enabled` | boolean | `false` |
| `providers.entra.people` | integer | `0` |
| `providers.google` | object |  |
| `providers.google.label` | string | `"Google Workspace"` |
| `providers.google.enabled` | boolean | `false` |
| `providers.google.autoCreate` | boolean | `true` |
| `providers.google.domainAllowList` | string | `""` |
| `providers.google.syncEnabled` | boolean | `false` |
| `providers.google.syncHours` | integer | `12` |
| `providers.google.deactivateMissing` | boolean | `false` |
| `providers.google.lastSync` | null | `null` |
| `providers.google.lastSyncResult` | string | `""` |
| `providers.google.defaultGroups` | string | `""` |
| `providers.google.clientId` | string | `""` |
| `providers.google.hostedDomain` | string | `""` |
| `providers.google.adminEmail` | string | `""` |
| `providers.google.hasClientSecret` | boolean | `false` |
| `providers.google.hasServiceAccountJson` | boolean | `false` |
| `providers.google.people` | integer | `0` |
| `providers.google.redirectUri` | string | `"http://localhost/auth/google/callback"` |
| `providers.okta` | object |  |
| `providers.okta.label` | string | `"Okta"` |
| `providers.okta.enabled` | boolean | `false` |
| `providers.okta.autoCreate` | boolean | `true` |
| `providers.okta.domainAllowList` | string | `""` |
| `providers.okta.syncEnabled` | boolean | `false` |
| `providers.okta.syncHours` | integer | `12` |
| `providers.okta.deactivateMissing` | boolean | `false` |
| `providers.okta.lastSync` | null | `null` |
| `providers.okta.lastSyncResult` | string | `""` |
| `providers.okta.defaultGroups` | string | `""` |
| `providers.okta.domain` | string | `""` |
| `providers.okta.clientId` | string | `""` |
| `providers.okta.hasClientSecret` | boolean | `false` |

<details><summary>Example answer</summary>

```json
{
  "settings": {
    "order": [
      "entra",
      "ldap",
      "…"
    ],
    "onlyThroughIdp": false
  },
  "providers": {
    "entra": {
      "label": "Microsoft Entra",
      "enabled": false,
      "people": 0
    },
    "google": {
      "label": "Google Workspace",
      "enabled": false,
      "autoCreate": true,
      "domainAllowList": "",
      "syncEnabled": false,
      "syncHours": 12,
      "deactivateMissing": false,
      "lastSync": null,
      "lastSyncResult": "",
      "defaultGroups": "",
      "clientId": "",
      "hostedDomain": "",
      "adminEmail": "",
      "hasClientSecret": false,
      "hasServiceAccountJson": false,
      "people": 0,
      "redirectUri": "http://localhost/auth/google/callback"
    },
    "okta": {
      "label": "Okta",
      "enabled": false,
      "autoCreate": true,
      "domainAllowList": "",
      "syncEnabled": false,
      "syncHours": 12,
      "deactivateMissing": false,
      "lastSync": null,
      "lastSyncResult": "",
      "defaultGroups": "",
      "domain": "",
      "clientId": "",
      "hasClientSecret": false,
      "hasApiToken": false,
      "people": 0,
      "redirectUri": "http://localhost/auth/okta/callback"
    },
    "ldap": {
      "label": "Active Directory",
      "enabled": false,
      "autoCreate": true,
      "domainAllowList": "",
      "syncEnabled": false,
      "syncHours": 12,
      "deactivateMissing": false,
      "lastSync": null,
      "lastSyncResult": "",
      "defaultGroups": "",
      "server": "",
      "startTls": false,
      "verifyCertificate": true,
      "baseDn": "",
      "bindDn": "",
      "loginAttribute": "sAMAccountName",
      "userFilter": "(&(objectCategory=person)(objectClass=user))",
      "groupDn": "",
      "hasBindPassword": false,
      "peo
…
```

</details>

### `PUT /api/system/identity`

**Change identity providers**

The order (whose name and address count when several know a person) and "only through an
identity provider" - for all of them.

- **Who may:** Administrators
- **JSON body:** `order`, `onlyThroughIdp`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/identity' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"order": "…", "onlyThroughIdp": "…"}'
```

**Returns**

The same as `GET /api/system/identity`.

### `PUT /api/system/identity/{provider}`

**Change identity provider**

- **Who may:** Administrators
- **Path parameters:** `provider` (string)

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/identity/{provider}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.

### `POST /api/system/identity/{provider}/sync`

**Run the sync – identity provider**

- **Who may:** Administrators
- **Path parameters:** `provider` (string)

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/identity/{provider}/sync' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.

### `POST /api/system/identity/{provider}/test`

**Test – identity provider**

- **Who may:** Administrators
- **Path parameters:** `provider` (string)

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/identity/{provider}/test' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`ok`, `lines`


## Area: `system/instance`

<a id="area-system-instance"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/instance`

**List instance settings**

Where this installation keeps its things - the questions asked in support.

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/instance' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `schema` | object |  |
| `schema.version` | integer | `14` |
| `schema.applied` | array |  |
| `schema.applied[].version` | integer | `10` |
| `schema.applied[].name` | string | `"managing and deleting are the project lead's in the default` |
| `schema.applied[].applied` | string | `"2026-11-21T21:18:53Z"` |
| `database` | string | `"PostgreSQL · 127.0.0.1:5432/?"` |
| `backend` | string | `"postgres"` |
| `databaseUser` | string | `"mg"` |
| `reachable` | boolean | `true` |
| `databaseDetail` | string | `"38 issues"` |
| `dataDir` | string | `"/tmp/apidocs-4rcbnd1a"` |
| `attachments` | string | `"/tmp/apidocs-4rcbnd1a/attachments"` |
| `changelog` | array |  |

<details><summary>Example answer</summary>

```json
{
  "schema": {
    "version": 14,
    "applied": [
      {
        "version": 10,
        "name": "managing and deleting are the project lead's in the default scheme",
        "applied": "2026-11-21T21:18:53Z"
      },
      {
        "version": 11,
        "name": "formatted descriptions and comments: issues.description_html, comments.body_html",
        "applied": "2026-11-21T21:18:53Z"
      },
      "…"
    ]
  },
  "database": "PostgreSQL · 127.0.0.1:5432/?",
  "backend": "postgres",
  "databaseUser": "mg",
  "reachable": true,
  "databaseDetail": "38 issues",
  "dataDir": "/tmp/apidocs-4rcbnd1a",
  "attachments": "/tmp/apidocs-4rcbnd1a/attachments",
  "changelog": [
    [
      "5.1.2",
      [
        "Approving an application link in the browser works with every way this instal…",
        "The Google and Okta sign-ins (/auth/<provider>/start) take next= like the Mic…"
      ]
    ],
    [
      "5.1.1",
      [
        "Application links set up in the browser - no password, no token: \"Link with m…",
        "The Microsoft sign-in (/auth/entra/start) takes next= and comes back there af…"
      ]
    ],
    "…"
  ]
}
```

</details>

### `PUT /api/system/instance/name`

**Change name**

Name this installation, so three open tabs can be told apart.

- **Who may:** Administrators
- **JSON body:** `name`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/instance/name' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…"}'
```

**Returns**

`name`


## Area: `system/jsm`

<a id="area-system-jsm"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/jsm`

**Read Jira Service Management connection**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/jsm' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `enabled` | boolean | `false` |
| `url` | string | `""` |
| `email` | string | `""` |
| `hasToken` | boolean | `false` |
| `projects` | array |  |

<details><summary>Example answer</summary>

```json
{
  "enabled": false,
  "url": "",
  "email": "",
  "hasToken": false,
  "projects": []
}
```

</details>

### `PUT /api/system/jsm`

**Change Jira Service Management connection**

- **Who may:** Administrators
- **JSON body:** `url`, `email`, `token`, `clearToken`, `projects`, `enabled`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/jsm' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"url": "…", "email": "…", "token": "…", "clearToken": "…", "projects": "…", "enabled": "…"}'
```

**Returns**

The same as `GET /api/system/jsm`.

### `GET /api/system/jsm/projects`

**List projects**

The service desks the stored account can see.

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/jsm/projects' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`projects`

### `POST /api/system/jsm/test`

**Test – Jira Service Management connection**

Prove the site answers and say who the token belongs to.

- **Who may:** Administrators
- **JSON body:** `url`, `email`, `token`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/jsm/test' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"url": "…", "email": "…", "token": "…"}'
```

**Returns**

`ok`, `error`, `account`, `projects`

### `GET /api/system/jsm/tickets`

**List tickets**

Tickets from the chosen service desks, with what is already here marked.

Both connections, like the helpdesk list - this is the one the sprint asks
when taking work over, and it used to know only about Atlassian. With that
one switched off it refused, however well MGService was set up.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/jsm/tickets' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`tickets`, `warnings`


## Area: `system/license`

<a id="area-system-license"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/license`

**Read licence**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/license' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `licensed` | boolean | `true` |
| `reason` | string | `"ok"` |
| `message` | string | `"No licence has been entered."` |
| `valid` | boolean | `true` |
| `seats` | object |  |
| `seats.users` | integer | `6` |
| `seats.allowed` | null | `null` |
| `seats.grace` | integer | `2` |
| `seats.over` | integer | `0` |
| `seats.blocked` | boolean | `false` |

<details><summary>Example answer</summary>

```json
{
  "licensed": true,
  "reason": "ok",
  "message": "No licence has been entered.",
  "valid": true,
  "seats": {
    "users": 6,
    "allowed": null,
    "grace": 2,
    "over": 0,
    "blocked": false
  }
}
```

</details>

### `PUT /api/system/license`

**Change licence**

- **Who may:** Administrators
- **JSON body:** `key`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/license' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"key": "…"}'
```

**Returns**

The same as `GET /api/system/license`.

### `DELETE /api/system/license`

**Delete licence**

Take the licence out. The instance drops to read only at once.

Kept as its own endpoint rather than as an empty save: removing a licence is
a decision of its own, and it should read like one in the log.

- **Who may:** Administrators

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/system/license' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

The same as `GET /api/system/license`.


## Area: `system/mail`

<a id="area-system-mail"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/mail`

**List mail settings**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/mail' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `enabled` | boolean | `false` |
| `tenantId` | string | `""` |
| `clientId` | string | `""` |
| `sender` | string | `""` |
| `fromName` | string | `"MGProject"` |
| `hasSecret` | boolean | `false` |
| `replyTo` | string | `""` |
| `footer` | string | `""` |
| `transport` | string | `"graph"` |
| `smtpHost` | string | `""` |
| `smtpPort` | string | `""` |
| `smtpSecurity` | string | `"starttls"` |
| `smtpUser` | string | `""` |
| `hasSmtpPassword` | boolean | `false` |

<details><summary>Example answer</summary>

```json
{
  "enabled": false,
  "tenantId": "",
  "clientId": "",
  "sender": "",
  "fromName": "MGProject",
  "hasSecret": false,
  "replyTo": "",
  "footer": "",
  "transport": "graph",
  "smtpHost": "",
  "smtpPort": "",
  "smtpSecurity": "starttls",
  "smtpUser": "",
  "hasSmtpPassword": false
}
```

</details>

### `PUT /api/system/mail`

**Change mail settings**

- **Who may:** Administrators

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/mail' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

The same as `GET /api/system/mail`.

### `POST /api/system/mail/test`

**Test – mail setting**

Send one message to the person asking, so the setup can be checked.

- **Who may:** Administrators
- **JSON body:** `to`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/mail/test' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"to": "…"}'
```

**Returns**

`sent`, `enabled`


## Area: `system/mail-queue`

<a id="area-system-mail-queue"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/mail-queue`

**List mail queue**

What is waiting, what went and what failed - newest first.

- **Who may:** Administrators
- **Query parameters:** `status` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/mail-queue?status=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `queue` | array |  |
| `enabled` | boolean | `false` |
| `sender` | string | `""` |

<details><summary>Example answer</summary>

```json
{
  "queue": [],
  "enabled": false,
  "sender": ""
}
```

</details>


## Area: `system/mgservice`

<a id="area-system-mgservice"></a>

System settings, for administrators: licence, mail, database, logo, announcements, the AI, identity providers and more.

### `GET /api/system/mgservice`

**Read MGService connection**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/mgservice' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `link` | null | `null` |
| `enabled` | boolean | `false` |
| `url` | string | `""` |
| `user` | string | `""` |
| `hasToken` | boolean | `false` |
| `tokenHint` | string | `""` |
| `projects` | array |  |

<details><summary>Example answer</summary>

```json
{
  "link": null,
  "enabled": false,
  "url": "",
  "user": "",
  "hasToken": false,
  "tokenHint": "",
  "projects": []
}
```

</details>

### `PUT /api/system/mgservice`

**Change MGService connection**

- **Who may:** Administrators
- **JSON body:** `enabled`, `url`, `user`, `token`, `projects`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/system/mgservice' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"enabled": "…", "url": "…", "user": "…", "token": "…", "projects": "…"}'
```

**Returns**

The same as `GET /api/system/mgservice`.

### `GET /api/system/mgservice/projects`

**List projects**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/mgservice/projects' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`projects`

### `POST /api/system/mgservice/test`

**Test – MGService connection**

- **Who may:** Administrators
- **JSON body:** `url`, `user`, `token`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/mgservice/test' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"url": "…", "user": "…", "token": "…"}'
```

**Returns**

`ok`, `error`, `account`, `projects`


## Area: `third-party`

<a id="area-third-party"></a>

### `GET /api/third-party`

**Read third party**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/third-party' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `product` | string | `"mgproject5"` |
| `version` | string | `"5.1.2"` |
| `made` | string | `""` |
| `components` | array |  |
| `components[].name` | string | `"Barlow (font)"` |
| `components[].version` | string | `""` |
| `components[].kind` | string | `"Font"` |
| `components[].url` | string | `""` |
| `components[].licences` | array |  |
| `components[].description` | string | `""` |
| `components[].texts` | array |  |
| `components[].files` | array |  |
| `source` | string | `"installation"` |

<details><summary>Example answer</summary>

```json
{
  "product": "mgproject5",
  "version": "5.1.2",
  "made": "",
  "components": [
    {
      "name": "Barlow (font)",
      "version": "",
      "kind": "Font",
      "url": "",
      "licences": [
        "OFL-1.1"
      ],
      "description": "",
      "texts": [
        {
          "file": "LICENSE-barlow-condensed.txt",
          "text": "Copyright 2017 The Barlow Project Authors (https://github.com/jpt/barlow) Bar…"
        }
      ],
      "files": [
        "barlow-condensed-600.woff2",
        "barlow-condensed-700.woff2"
      ]
    },
    {
      "name": "blinker",
      "version": "1.9.0",
      "kind": "Python package",
      "url": "https://pypi.org/project/blinker/",
      "licences": [
        "MIT License"
      ],
      "description": "",
      "texts": [
        {
          "file": "LICENSE.txt",
          "text": "Copyright 2010 Jason Kirtland\n\nPermission is hereby granted, free of charge, …"
        }
      ]
    },
    "…"
  ],
  "source": "installation"
}
```

</details>


## Area: `timeclock`

<a id="area-timeclock"></a>

Working times: clocking in, on a break and out; corrections by an administrator; the export.

### `GET /api/timeclock`

**List working times**

The state of the people asked about. Everybody may look; only their own
state can they change.

- **Who may:** Anybody signed in
- **Query parameters:** `users` (string), `day` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/timeclock?users=…&day=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `people` | array |  |
| `people[].user` | object |  |
| `people[].state` | string | `"out"` |
| `people[].since` | null | `null` |
| `people[].worked` | integer | `0` |
| `people[].paused` | integer | `0` |
| `people[].isMe` | boolean | `true` |
| `day` | string | `"2026-11-21"` |

<details><summary>Example answer</summary>

```json
{
  "people": [
    {
      "user": {
        "id": 6,
        "displayName": "Administrator",
        "avatarColor": "#007FA0"
      },
      "state": "out",
      "since": null,
      "worked": 0,
      "paused": 0,
      "isMe": true
    }
  ],
  "day": "2026-11-21"
}
```

</details>

### `POST /api/timeclock`

**Create clock entry**

Clock in, take a break, clock out - for oneself and nobody else.

- **Who may:** Anybody signed in
- **JSON body:** `kind`, `note`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/timeclock' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"kind": "…", "note": "…"}'
```

**Returns**

The same as `GET /api/timeclock`.

### `POST /api/timeclock/ask`

**Ask – clock entry**

Should this person be asked to clock in - once per sign-in.

The flag is set when a session begins and taken away the first time it is
read, so a reload does not ask again. Kept on the server rather than in the
browser: a second tab is the same sign-in and should not ask twice either.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/timeclock/ask' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`ask`, `kind`, `since`, `sinceDay`, `state`

### `POST /api/timeclock/close-day`

**Close the day – clock entry**

Close a day somebody left open, at the time they name.

Their own entry only, and only a moment that lies between where the day
started and now: a stamp before the start would make a negative day, one in
the future a day that has not happened.

- **Who may:** Anybody signed in
- **JSON body:** `at`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/timeclock/close-day' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"at": "…"}'
```

**Returns**

`ok`, `nothing`, `at`

### `POST /api/timeclock/manual`

**Add by hand – clock entry**

An entry that was never punched - somebody forgot, or the day was fixed
up afterwards.

- **Who may:** Administrators
- **JSON body:** `userId`, `kind`, `at`, `note`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/timeclock/manual' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"userId": "…", "kind": "…", "at": "…", "note": "…"}'
```

**Returns**

`id`

### `GET /api/timeclock/states`

**List states**

Everybody's state in one answer, for the dots on the avatars.

One query for the whole screen: the last event of the day per person, read
with a window function where the database has one and by hand where it does
not - a request per avatar would be absurd.

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/timeclock/states' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `states` | object |  |
| `states.2` | string | `"out"` |
| `states.3` | string | `"out"` |
| `states.4` | string | `"out"` |
| `states.5` | string | `"out"` |
| `states.1` | string | `"out"` |
| `states.6` | string | `"out"` |
| `day` | string | `"2026-11-21"` |

<details><summary>Example answer</summary>

```json
{
  "states": {
    "2": "out",
    "3": "out",
    "4": "out",
    "5": "out",
    "1": "out",
    "6": "out"
  },
  "day": "2026-11-21"
}
```

</details>

### `PUT /api/timeclock/{eid}`

**Change clock entry**

Put an entry right. Who corrected it and when is kept with it.

- **Who may:** Administrators
- **Path parameters:** `eid` (integer)
- **JSON body:** `kind`, `at`, `note`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/timeclock/{eid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"kind": "…", "at": "…", "note": "…"}'
```

**Returns**

`id`, `kind`, `at`

### `DELETE /api/timeclock/{eid}`

**Delete clock entry**

- **Who may:** Administrators
- **Path parameters:** `eid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/timeclock/{eid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`


## Area: `uploads`

<a id="area-uploads"></a>

Big files in pieces: begin, send piece by piece, ask how far it got, cancel.

### `POST /api/uploads`

**Create upload**

Begin a big file in pieces: its name and size, checked against the limit first.

- **Who may:** Anybody signed in
- **JSON body:** `filename`, `size`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/uploads' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"filename": "…", "size": "…"}'
```

**Returns**

JSON.

### `GET /api/uploads/{uid}`

**Read upload**

How far a big file has got - asked before a piece is sent again.

- **Who may:** Anybody signed in
- **Path parameters:** `uid` (string)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/uploads/{uid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.

### `DELETE /api/uploads/{uid}`

**Delete upload**

A big file given up: its pieces go at once.

- **Who may:** Anybody signed in
- **Path parameters:** `uid` (string)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/uploads/{uid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

The same as `GET /api/uploads/{uid}`.

### `PUT /api/uploads/{uid}/{index}`

**Change upload**

One piece of a big file, in order.

- **Who may:** Anybody signed in
- **Path parameters:** `uid` (string), `index` (integer)

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/uploads/{uid}/{index}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

JSON.


## Area: `users`

<a id="area-users"></a>

People: listing, creating, changing, deactivating - and the people to choose from in a field.

### `GET /api/users`

**List people**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/users' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `[].id` | integer | `6` |
| `[].username` | string | `"admin"` |
| `[].displayName` | string | `"Administrator"` |
| `[].email` | string | `""` |
| `[].avatarColor` | string | `"#007FA0"` |
| `[].isAdmin` | boolean | `true` |
| `[].active` | boolean | `true` |
| `[].clockPrompt` | boolean | `true` |
| `[].avatarUrl` | null | `null` |
| `[].hasPassword` | boolean | `true` |
| `[].mustChangePassword` | boolean | `false` |
| `[].lastLogin` | string | `"2026-11-21T21:18:53Z"` |
| `[].preferences` | object |  |
| `[].preferences.lastStructureId` | integer | `1` |
| `[].passkeys` | integer | `0` |
| `[].locked` | boolean | `false` |

<details><summary>Example answer</summary>

```json
[
  {
    "id": 6,
    "username": "admin",
    "displayName": "Administrator",
    "email": "",
    "avatarColor": "#007FA0",
    "isAdmin": true,
    "active": true,
    "clockPrompt": true,
    "avatarUrl": null,
    "hasPassword": true,
    "mustChangePassword": false,
    "lastLogin": "2026-11-21T21:18:53Z",
    "preferences": {
      "lastStructureId": 1
    },
    "passkeys": 0,
    "locked": false
  },
  {
    "id": 4,
    "username": "jnovak",
    "displayName": "Jan Novak",
    "email": "jan.novak@example.invalid",
    "avatarColor": "#5243AA",
    "isAdmin": false,
    "active": true,
    "clockPrompt": true,
    "avatarUrl": null,
    "hasPassword": false,
    "mustChangePassword": false,
    "lastLogin": null,
    "preferences": {},
    "passkeys": 0,
    "locked": false
  },
  "…"
]
```

</details>

### `POST /api/users`

**Create person**

- **Who may:** Administrators
- **JSON body:** `username`, `displayName`, `withPassword`, `password`, `email`, `avatarColor`, `isAdmin`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/users' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"username": "…", "displayName": "…", "withPassword": "…", "password": "…", "email": "…", "avatarColor": "…", "isAdmin": "…"}'
```

**Returns**

`user`, `password`

### `PUT /api/users/{uid}`

**Change person**

- **Who may:** Anybody signed in
- **Path parameters:** `uid` (integer)
- **JSON body:** `clockPrompt`, `isAdmin`, `active`, `username`, `displayName`, `email`, `avatarColor`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/users/{uid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"clockPrompt": "…", "isAdmin": "…", "active": "…", "username": "…", "displayName": "…", "email": "…", "avatarColor": "…"}'
```

**Returns**

JSON.

### `DELETE /api/users/{uid}`

**Delete person**

- **Who may:** Administrators
- **Path parameters:** `uid` (integer)
- **JSON body:** `confirm`

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/users/{uid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"confirm": "…"}'
```

**Returns**

`confirm`, `username`, `wrote`, `deleted`

### `POST /api/users/{uid}/password`

**Send password (person)**

- **Who may:** Administrators
- **Path parameters:** `uid` (integer)
- **JSON body:** `password`, `mustChange`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/users/{uid}/password' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"password": "…", "mustChange": "…"}'
```

**Returns**

`password`, `user`

### `DELETE /api/users/{uid}/password`

**Delete password (person)**

- **Who may:** Administrators
- **Path parameters:** `uid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/users/{uid}/password' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`ok`

### `POST /api/users/{uid}/unlock`

**Unlock – person**

- **Who may:** Administrators
- **Path parameters:** `uid` (integer)

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/users/{uid}/unlock' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`ok`


## Area: `webhooks`

<a id="area-webhooks"></a>

Webhooks: addresses told about events, and what was sent to them.

### `GET /api/webhooks`

**List webhooks**

- **Who may:** Administrators

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/webhooks' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `webhooks` | array |  |
| `events` | object |  |
| `events.issue.created` | string | `"Issue created"` |
| `events.issue.transitioned` | string | `"Status changed"` |
| `events.issue.assigned` | string | `"Assignee changed"` |
| `events.issue.epicChanged` | string | `"Epic changed"` |
| `events.issue.updated` | string | `"Any field changed"` |
| `events.issue.deleted` | string | `"Issue deleted"` |
| `events.issue.deleting` | string | `"Issue is about to be deleted"` |
| `events.comment.added` | string | `"Comment added"` |
| `events.worklog.added` | string | `"Work logged"` |
| `events.attachment.added` | string | `"Attachment added"` |
| `events.sprint.started` | string | `"Sprint started"` |
| `events.sprint.completed` | string | `"Sprint completed"` |
| `events.issue.released` | string | `"Issue released"` |

<details><summary>Example answer</summary>

```json
{
  "webhooks": [],
  "events": {
    "issue.created": "Issue created",
    "issue.transitioned": "Status changed",
    "issue.assigned": "Assignee changed",
    "issue.epicChanged": "Epic changed",
    "issue.updated": "Any field changed",
    "issue.deleted": "Issue deleted",
    "issue.deleting": "Issue is about to be deleted",
    "comment.added": "Comment added",
    "worklog.added": "Work logged",
    "attachment.added": "Attachment added",
    "sprint.started": "Sprint started",
    "sprint.completed": "Sprint completed",
    "issue.released": "Issue released"
  }
}
```

</details>

### `POST /api/webhooks`

**Create webhook**

- **Who may:** Administrators
- **JSON body:** `url`, `name`, `enabled`, `format`, `projectId`, `events`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/webhooks' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"url": "…", "name": "…", "enabled": "…", "format": "…", "projectId": "…", "events": "…"}'
```

**Returns**

`id`

### `PUT /api/webhooks/{wid}`

**Change webhook**

- **Who may:** Administrators
- **Path parameters:** `wid` (integer)
- **JSON body:** `name`, `url`, `enabled`, `format`, `projectId`, `events`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/webhooks/{wid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "url": "…", "enabled": "…", "format": "…", "projectId": "…", "events": "…"}'
```

**Returns**

`ok`

### `DELETE /api/webhooks/{wid}`

**Delete webhook**

- **Who may:** Administrators
- **Path parameters:** `wid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/webhooks/{wid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `POST /api/webhooks/{wid}/test`

**Test – webhook**

- **Who may:** Administrators
- **Path parameters:** `wid` (integer)

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/webhooks/{wid}/test' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`ok`, `detail`


## Area: `workflows`

<a id="area-workflows"></a>

Workflows: statuses and the transitions between them, with their conditions.

### `GET /api/workflows`

**List workflows**

- **Who may:** Anybody signed in

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/workflows' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `[].id` | integer | `2` |
| `[].name` | string | `"Default workflow"` |
| `[].description` | string | `"Every status, every move allowed."` |
| `[].isDefault` | boolean | `true` |
| `[].created` | string | `"2026-11-21T21:18:53Z"` |
| `[].projectCount` | integer | `3` |
| `[].statusCount` | integer | `5` |
| `[].transitionCount` | integer | `5` |

<details><summary>Example answer</summary>

```json
[
  {
    "id": 2,
    "name": "Default workflow",
    "description": "Every status, every move allowed.",
    "isDefault": true,
    "created": "2026-11-21T21:18:53Z",
    "projectCount": 3,
    "statusCount": 5,
    "transitionCount": 5
  },
  {
    "id": 1,
    "name": "Software delivery",
    "description": "To Do to In Progress to In Review to Done, with a reopen path and a blocked s…",
    "isDefault": false,
    "created": "2026-11-21T21:18:53Z",
    "projectCount": 0,
    "statusCount": 5,
    "transitionCount": 8
  }
]
```

</details>

### `POST /api/workflows`

**Create workflow**

- **Who may:** Administrators
- **JSON body:** `name`, `description`, `copyFrom`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/workflows' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "copyFrom": "…"}'
```

**Returns**

The same as `GET /api/workflows`.

### `GET /api/workflows/{wid}`

**Read workflow**

- **Who may:** Anybody signed in
- **Path parameters:** `wid` (integer)

**Call**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/workflows/{wid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

| Field | Type | Example |
|---|---|---|
| `id` | integer | `1` |
| `name` | string | `"Software delivery"` |
| `description` | string | `"To Do to In Progress to In Review to Done, with a reopen pa` |
| `isDefault` | boolean | `false` |
| `created` | string | `"2026-11-21T21:18:53Z"` |
| `projectCount` | integer | `0` |
| `statuses` | array |  |
| `statuses[].id` | integer | `1` |
| `statuses[].name` | string | `"To Do"` |
| `statuses[].category` | string | `"todo"` |
| `statuses[].position` | integer | `0` |
| `statuses[].initial` | boolean | `true` |
| `statuses[].x` | null | `null` |
| `statuses[].y` | null | `null` |
| `transitions` | array |  |
| `transitions[].id` | integer | `1` |
| `transitions[].name` | string | `"Start work"` |
| `transitions[].description` | string | `""` |
| `transitions[].fromStatusId` | integer | `1` |
| `transitions[].toStatusId` | integer | `2` |
| `transitions[].fromName` | string | `"To Do"` |
| `transitions[].toName` | string | `"In Progress"` |
| `transitions[].rules` | object |  |
| `projects` | array |  |
| `ruleCatalogue` | object |  |
| `ruleCatalogue.conditionRoles` | object |  |
| `ruleCatalogue.conditionRoles.assignee` | string | `"The assignee of the issue"` |
| `ruleCatalogue.conditionRoles.reporter` | string | `"The reporter of the issue"` |
| `ruleCatalogue.conditionRoles.lead` | string | `"The lead of the project"` |
| `ruleCatalogue.groups` | array |  |
| `ruleCatalogue.groups[].id` | integer | `1` |
| `ruleCatalogue.groups[].name` | string | `"Developers"` |
| `ruleCatalogue.conditions` | object |  |
| `ruleCatalogue.conditions.anyone` | string | `"Anyone may run this transition"` |
| `ruleCatalogue.conditions.group` | string | `"Only members of a group"` |
| `ruleCatalogue.conditions.user` | string | `"Only one specific person"` |
| `ruleCatalogue.conditions.role` | string | `"Only a role on the issue"` |
| `ruleCatalogue.conditions.admin` | string | `"Only administrators"` |
| `ruleCatalogue.conditions.assignee` | string | `"Only the assignee of the issue"` |
| `ruleCatalogue.conditions.reporter` | string | `"Only the reporter of the issue"` |

<details><summary>Example answer</summary>

```json
{
  "id": 1,
  "name": "Software delivery",
  "description": "To Do to In Progress to In Review to Done, with a reopen path and a blocked s…",
  "isDefault": false,
  "created": "2026-11-21T21:18:53Z",
  "projectCount": 0,
  "statuses": [
    {
      "id": 1,
      "name": "To Do",
      "category": "todo",
      "position": 0,
      "initial": true,
      "x": null,
      "y": null
    },
    {
      "id": 2,
      "name": "In Progress",
      "category": "inprogress",
      "position": 1,
      "initial": false,
      "x": null,
      "y": null
    },
    "…"
  ],
  "transitions": [
    {
      "id": 1,
      "name": "Start work",
      "description": "",
      "fromStatusId": 1,
      "toStatusId": 2,
      "fromName": "To Do",
      "toName": "In Progress",
      "rules": {
        "conditions": [],
        "validators": [],
        "postFunctions": []
      }
    },
    {
      "id": 2,
      "name": "Ready for review",
      "description": "",
      "fromStatusId": 2,
      "toStatusId": 3,
      "fromName": "In Progress",
      "toName": "In Review",
      "rules": {
        "conditions": [],
        "validators": [],
        "postFunctions": []
      }
    },
    "…"
  ],
  "projects": [],
  "ruleCatalogue": {
    "conditionRoles": {
      "assignee": "The assignee of the issue",
      "reporter": "The reporter of the issue",
      "lead": "The lead of the project"
    },
    "groups": [
      {
        "id": 1,
        "name": "Developers"
      },
      {
        "id": 5,
        "name": "helpdesk-agent"
      },
      "…"
    ],
    "conditions": {
      "anyone": "Anyone may run this transition",
      "group": "Only members of a group",
      "user": "Only one specific person",
      "role": "Only a role on the issue",
      "admin": "Only administrators",

…
```

</details>

### `PUT /api/workflows/{wid}`

**Change workflow**

- **Who may:** Administrators
- **Path parameters:** `wid` (integer)
- **JSON body:** `name`, `description`, `initialStatusId`, `layout`, `statusIds`, `transitions`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/workflows/{wid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…", "description": "…", "initialStatusId": "…", "layout": "…", "statusIds": "…", "transitions": "…"}'
```

**Returns**

The same as `GET /api/workflows/{wid}`.

### `DELETE /api/workflows/{wid}`

**Delete workflow**

- **Who may:** Administrators
- **Path parameters:** `wid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/workflows/{wid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

### `POST /api/workflows/{wid}/duplicate`

**Duplicate – workflow**

A copy with the same statuses and transitions, attached to no project.

- **Who may:** Administrators
- **Path parameters:** `wid` (integer)
- **JSON body:** `name`

**Call**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/workflows/{wid}/duplicate' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name": "…"}'
```

**Returns**

JSON.


## Area: `worklogs`

<a id="area-worklogs"></a>

Worklogs: changing and deleting. New ones are logged on the issue.

### `PUT /api/worklogs/{wid}`

**Change worklog**

Put a booking right - the time, the day or the note.

One's own always; somebody else's only for an administrator, the same rule
the deletion below follows.

- **Who may:** Anybody signed in
- **Path parameters:** `wid` (integer)
- **JSON body:** `seconds`, `timeSpent`, `started`, `comment`

**Call**

```bash
curl -s -X PUT 'http://127.0.0.1:6633/api/worklogs/{wid}' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"seconds": "…", "timeSpent": "…", "started": "…", "comment": "…"}'
```

**Returns**

`id`, `seconds`, `started`

### `DELETE /api/worklogs/{wid}`

**Delete worklog**

- **Who may:** Anybody signed in
- **Path parameters:** `wid` (integer)

**Call**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/worklogs/{wid}' \
  -H 'Authorization: Bearer $TOKEN'
```

**Returns**

`deleted`

