# MGProject – API-Referenz

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

## Überblick

Alles, was MGProject zeigt und tut, läuft über diese API - die Oberfläche benutzt genau diese
Schnittstellen, mit den Rechten der angemeldeten Person. Anfragen und Antworten sind JSON (UTF-8), außer
eine Schnittstelle sagt etwas anderes (CSV, PDF, Excel, Dateien, der Datenstrom der KI).

Die Adresse ist die der Installation, z. B. `https://mgproject.example.com`; auf dem Server selbst
`http://127.0.0.1:6633`. Alle Pfade unten beginnen mit `/api/`. Die Verwaltung liegt unter `/api/system/…`.

## Anmeldung

**API-Token (für Skripte und andere Systeme).** Ein Token legt man unter *Account → API tokens* an; es
wird einmal angezeigt. Bei jeder Anfrage mitsenden:

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

Ein Token hat genau die Rechte der Person, die es angelegt hat - das Token eines Administrators darf, was
ein Administrator darf, nicht mehr. *Wer darf* unten nennt, was eine Schnittstelle vorab verlangt; darüber
hinaus prüft sie die Rechte am einzelnen Objekt (Berechtigungen eines Projekts, eines Bereichs, die
Einschränkungen einer Seite) und antwortet mit 403 oder 404, wo sie fehlen. Ein widerrufenes Token wird sofort abgelehnt. Tokens gehören nicht in
Protokolle oder Skripte, die andere lesen.

**Sitzung (der Browser).** `POST /api/auth/login` mit `{"username": "…", "password": "…"}` setzt ein
Sitzungs-Cookie; `POST /api/auth/logout` beendet es. Passkeys und die Anmeldung über Identitätsanbieter
(Microsoft Entra, Google, Okta) laufen über die Anmeldeseite, Konten aus dem Active Directory über
dasselbe `POST /api/auth/login`.

## Fehler

Ein Fehler ist ein HTTP-Status mit einem JSON-Body:

```json
{"error": "Ein Satz, der sagt, was nicht stimmt", "code": "optionaler_maschinenlesbarer_code"}
```

| Status | Bedeutung |
|---|---|
| 400 | Die Anfrage stimmt nicht - der Satz sagt, was. |
| 401 | Nicht angemeldet, oder das Token ist nicht gültig. |
| 403 | Angemeldet, aber nicht erlaubt - oder, bei Änderungen, keine gültige Lizenz (`code: license_required`). |
| 404 | Nicht vorhanden oder für diese Person nicht sichtbar (die API unterscheidet beides nicht). |
| 409 | Widerspricht dem Bestand (z. B. ein vergebener Name). |
| 413 | Zu groß - große Dateien in Teilen senden (siehe unten). |
| 429 | Zu viele Anfragen - so lange warten, wie `Retry-After` sagt. |
| 500 | Unerwartet; die Antwort enthält `ref`, eine Kennung, unter der die Details im Server-Protokoll stehen. |

## Grenzen

Anfragen ohne Sitzung sind auf 300 pro Minute je Adresse begrenzt, angemeldete Clients und Tokens auf
1200 pro Minute (jeweils je Arbeitsprozess gezählt; eine Installation kann beides ändern,
`<PRODUCT>_RATE_LIMIT_ANON` und `<PRODUCT>_RATE_LIMIT`). Darüber antwortet der Server mit `429` und
`Retry-After` in Sekunden. `/api/health` ist nie begrenzt; die Anmeldung (`/api/auth/…`) hat stattdessen
eine eigene Sperre nach Fehlversuchen.

## Formate

- Zeitpunkte sind ISO 8601 in UTC, z. B. `2026-11-06T14:30:00Z`; reine Daten `2026-11-06`.
- Dauern sind Sekunden (`seconds`), oder Text, wo eine Schnittstelle das sagt (`timeSpent: "1h 30m"`).
- Lange Listen nehmen `limit` und `offset`, wo angegeben; die Antwort sagt, wie viele es insgesamt gibt.
- Gesucht wird mit **MQL**, der Abfragesprache der Vorgangssuche, z. B.
  `project = ORB AND statusCategory != done ORDER BY updated DESC` (`GET /api/search?mql=…`).

## Große Dateien in Teilen

Proxys vor einem Server nehmen oft nur begrenzt viel pro Anfrage (Cloudflare: 100 MB). Große Dateien
gehen deshalb in Teilen von höchstens 50 MB:

1. `POST /api/uploads` mit `{"filename": "…", "size": <Bytes>}` → `{"id": "<Upload-ID>", …}`
2. `PUT /api/uploads/<id>/<n>` mit den Bytes von Teil `n` (0, 1, 2 …) als Body, der Reihe nach
3. `GET /api/uploads/<id>` sagt, wie weit es ist - vor dem erneuten Senden eines Teils nach einer Unterbrechung
4. die fertige Datei mit `"uploadId": "<id>"` statt einer Formular-Datei anhängen; `DELETE /api/uploads/<id>`
   bricht ab

Ein Upload gehört der Person, die ihn begonnen hat; ein nicht abgeschlossener wird nach einem Tag entfernt.

## Antworten des KI-Assistenten

`POST /api/ai/ask` mit `{"question": "…", "conversation": "<beliebige Kennung des Gesprächs>"}` antwortet
als Datenstrom aus JSON-Zeilen (`application/x-ndjson`), ein Ereignis je Zeile, während die Arbeit läuft:

| `type` | Inhalt |
|---|---|
| `start` | die Protokollkennung dieser Frage |
| `step` | ein Werkzeug, das der Assistent benutzt hat: `tool`, `input`, `summary` |
| `sources` | was er gefunden und geöffnet hat: `items` |
| `list` | eine Liste aus der Datenbank, mit der Abfrage, die sie ergab |
| `chart` | ein Diagramm: `chart` = `{type, title, labels, series[{name, values}], unit}` |
| `draft` | eine vorbereitete Änderung, die die Person bestätigt |
| `text` | die Antwort, stückweise |
| `error` | was schiefging, in einem Satz |
| `end` | die Antwort ist vollständig |

Jede Zahl in einem Diagramm stammt aus einem Werkzeugergebnis derselben Antwort; der Assistent handelt
mit den Rechten der fragenden Person.


## Inhalt

- [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

## Bereich: `ai`

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

Der KI-Assistent: eine Frage stellen (Antwort als Datenstrom von Ereignissen), suchen, Entwürfe, die der Assistent vorbereitet und die Person bestätigt, und Rückmeldungen zu Antworten.

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

**Fragen – KI-Assistent**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `question`, `previous`, `history`, `conversation`

**Aufruf**

```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": "…"}'
```

**Liefert**

Einen Datenstrom aus JSON-Zeilen (application/x-ndjson), ein Ereignis je Zeile - siehe „Antworten des KI-Assistenten“.

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

**Ausführen – Entwurf**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `draft_id` (integer)

**Aufruf**

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

**Liefert**

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

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

**Verwerfen – Entwurf**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `draft_id` (integer)

**Aufruf**

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

**Liefert**

`draft`

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

**Rückmeldung geben – KI-Assistent**

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `question`, `refs`, `good`, `logId`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`

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

**Abfrage senden**

<details><summary>Details aus dem Code (englisch)</summary>

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).

</details>

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `sql`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Schema lesen**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `views` | string | `"issues(key: the item's key, e.g. ABC-12, summary: its title` |

<details><summary>Beispielantwort</summary>

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

</details>

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

**Suche senden**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `question`

**Aufruf**

```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": "…"}'
```

**Liefert**

`items`

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

**Zustand lesen – KI-Assistent**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `signedIn` | boolean | `true` |
| `user` | string | `"Administrator"` |
| `product` | string | `"mgproject"` |
| `box` | boolean | `false` |

<details><summary>Beispielantwort</summary>

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

</details>


## Bereich: `applinks`

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

Anwendungslinks zwischen MGWiki, MGProject und MGService: was eine Installation ist, der Schlüsseltausch beim Verknüpfen durch einen Administrator, das Entfernen eines Links und als wer eine verknüpfte Anfrage gesehen wird.

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

**Lesen, was das ist – applinks**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Ohne Anmeldung

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `product` | string | `"mgproject"` |
| `product_name` | string | `"MGProject"` |
| `applinks` | integer | `1` |

<details><summary>Beispielantwort</summary>

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

</details>

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

**Schlüssel tauschen – applinks**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `base_url`, `product`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Link entfernen – applinks**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

`ok`

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

**Lesen, als wer – applinks**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `product` | string | `"mgproject"` |
| `product_name` | string | `"MGProject"` |
| `username` | string | `"admin"` |
| `display_name` | string | `"Administrator"` |
| `email` | string | `""` |
| `matched_by` | null | `null` |

<details><summary>Beispielantwort</summary>

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

</details>


## Bereich: `attachments`

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

Dateien an Vorgängen oder Seiten: lesen, herunterladen, die Vorschau von Office-Dokumenten, ändern, wer sie sehen darf, und entfernen.

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

**Anhang lesen**

- **Wer darf:** Berechtigung: `browse`
- **Pfadparameter:** `aid` (integer)
- **Abfrageparameter:** `download` (string), `inline` (string)

**Aufruf**

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

**Liefert**

JSON.

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

**Anhang löschen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `aid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

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

**Vorschau – Anhang**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Berechtigung: `browse`
- **Pfadparameter:** `aid` (integer)

**Aufruf**

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

**Liefert**

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


## Bereich: `auth`

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

An- und Abmelden und das eigene Konto: Passwort, Passkeys, API-Tokens und persönliche Einstellungen.

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

**Profilbild senden**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `(multipart form: file)`

**Aufruf**

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

**Liefert**

JSON.

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

**Profilbild löschen**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

JSON.

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

**Anmelden – Anmeldung**

- **Wer darf:** Ohne Anmeldung
- **JSON-Body:** `username`, `password`

**Aufruf**

```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": "…"}'
```

**Liefert**

`user`, `mustChangePassword`

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

**Abmelden – Anmeldung**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

`ok`

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

**Eigenes Konto lesen**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Passkeys auflisten**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

```json
[]
```

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

**Beginnen – login**

- **Wer darf:** Ohne Anmeldung
- **JSON-Body:** `username`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Abschließen – login**

- **Wer darf:** Ohne Anmeldung
- **JSON-Body:** `credential`

**Aufruf**

```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": "…"}'
```

**Liefert**

`user`, `mustChangePassword`

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

**Beginnen – register**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

JSON.

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

**Abschließen – register**

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `credential`, `name`

**Aufruf**

```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": "…"}'
```

**Liefert**

`passkeys`

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

**Passkey löschen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `cid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

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

**Passwort senden**

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `currentPassword`, `newPassword`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`

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

**Persönliche Einstellungen auflisten**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

```json
{}
```

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

**Persönliche Einstellungen ändern**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

Wie `GET /api/auth/preferences`.

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

**Zustand lesen – Anmeldung**

- **Wer darf:** Ohne Anmeldung

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**API-Tokens auflisten**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `tokens` | array |  |

<details><summary>Beispielantwort</summary>

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

</details>

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

**API-Token anlegen**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `name`, `expires`

**Aufruf**

```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": "…"}'
```

**Liefert**

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

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

**API-Token löschen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `tid` (integer)

**Aufruf**

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

**Liefert**

`revoked`


## Bereich: `automation`

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

Automationsregeln: Wenn etwas mit einem Vorgang geschieht, etwas tun - und das Protokoll dessen, was sie taten.

### `GET /api/automation`

**Automationsregeln auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Automationsregel anlegen**

- **Wer darf:** Administratoren
- **JSON-Body:** `name`, `trigger`, `description`, `enabled`, `projectId`, `triggerConfig`, `conditions`, `actions`, `question`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/automation`.

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

**Protokoll auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

```json
[]
```

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

**Automationsregel ändern**

- **Wer darf:** Administratoren
- **Pfadparameter:** `rid` (integer)
- **JSON-Body:** `name`, `description`, `enabled`, `projectId`, `trigger`, `question`, `triggerConfig`, `conditions`, `actions`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Automationsregel löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `rid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

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

**Läufe auflisten (Automationsregel)**

- **Wer darf:** Administratoren
- **Pfadparameter:** `rid` (integer)

**Aufruf**

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

**Liefert**

```json
[]
```


## Bereich: `bitbucket`

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

Die Anbindung an Bitbucket: Commits, Branches und Pull Requests an den Vorgängen, die sie nennen.

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

**Projekte auflisten**

- **Wer darf:** Jede angemeldete Person
- **Abfrageparameter:** `workspace` (string)

**Aufruf**

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

**Liefert**

`workspace`, `projects`

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

**Repositories auflisten**

- **Wer darf:** Jede angemeldete Person
- **Abfrageparameter:** `workspace` (string), `project` (string)

**Aufruf**

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

**Liefert**

`workspace`, `project`, `repositories`

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

**Workspaces lesen**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

`workspaces`


## Bereich: `boards`

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

Boards - Scrum und Kanban: ihre Spalten, die Vorgänge darauf, der Backlog und die Diagramme eines Boards.

### `GET /api/boards`

**Boards auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

All boards, or those covering one project.

</details>

- **Wer darf:** Jede angemeldete Person
- **Abfrageparameter:** `project` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `[].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>Beispielantwort</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`

**Board anlegen**

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `name`, `type`, `projectIds`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/boards`.

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

**Board lesen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `bid` (integer)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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}`

**Board ändern**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `bid` (integer)
- **JSON-Body:** `name`, `type`, `quickFilters`, `swimlanes`, `projectIds`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/boards/{bid}`.

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

**Board löschen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `bid` (integer)

**Aufruf**

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

**Liefert**

`deleted`, `sprintsRemoved`

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

**Backlog lesen (Board)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `bid` (integer)
- **Abfrageparameter:** `closed` (string), `limit` (int, Standard 200), `offset` (int, Standard 0)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Board lesen (Board)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `bid` (integer)
- **Abfrageparameter:** `sprint` (int)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Spalten ändern (Board)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `bid` (integer)
- **JSON-Body:** `columns`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Match lesen (Board)**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `bid` (integer)
- **Abfrageparameter:** `mql` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `ids` | array |  |

<details><summary>Beispielantwort</summary>

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

</details>

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

**Quick filters lesen (Board)**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `bid` (integer), `index` (integer)

**Aufruf**

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

**Liefert**

`ids`

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

**Sprints auflisten (Board)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `bid` (integer)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `[].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>Beispielantwort</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`

**Sprint anlegen (Board)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `bid` (integer)
- **JSON-Body:** `name`, `goal`, `startDate`, `endDate`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/boards/{bid}/sprints`.

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

**Statistik lesen (Board)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `bid` (integer)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Velocity lesen (Board)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `bid` (integer)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `sprints` | array |  |
| `sprints[].name` | string | `"Orbit Sprint 12"` |
| `sprints[].state` | string | `"closed"` |
| `sprints[].committed` | number | `21.0` |
| `sprints[].completed` | number | `21.0` |

<details><summary>Beispielantwort</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>


## Bereich: `bootstrap`

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

Was der Browser zum Start braucht: die angemeldete Person, Projekte, Status, Typen und die Funktionen, die sie nutzen darf.

### `GET /api/bootstrap`

**Startdaten lesen**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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>


## Bereich: `comments`

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

Kommentare: ändern und löschen. Neue Kommentare werden am Vorgang bzw. an der Seite angelegt.

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

**Kommentar ändern**

- **Wer darf:** Berechtigung: `edit`
- **Pfadparameter:** `cid` (integer)

**Aufruf**

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

**Liefert**

JSON.

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

**Kommentar löschen**

- **Wer darf:** Berechtigung: `edit`
- **Pfadparameter:** `cid` (integer)

**Aufruf**

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

**Liefert**

`deleted`


## Bereich: `custom-fields`

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

Eigene Felder: ihre Definition, die Auswahlwerte und wo sie erscheinen.

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

**Eigene Felder auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Eigenes Feld anlegen**

- **Wer darf:** Administratoren
- **JSON-Body:** `name`, `kind`, `key`, `options`, `description`, `required`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/custom-fields`.

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

**Reihenfolge senden**

- **Wer darf:** Administratoren
- **JSON-Body:** `ids`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`

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

**Eigenes Feld ändern**

- **Wer darf:** Administratoren
- **Pfadparameter:** `fid` (integer)
- **JSON-Body:** `kind`, `options`, `name`, `description`, `required`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Eigenes Feld löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `fid` (integer)

**Aufruf**

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

**Liefert**

`deleted`


## Bereich: `dashboard`

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

Die Startseite einer Person: was auf sie wartet.

### `GET /api/dashboard`

**Dashboard lesen**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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>


## Bereich: `dashboards`

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

Dashboards mit Gadgets: anlegen, freigeben, anordnen.

### `GET /api/dashboards`

**Dashboards auflisten**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Dashboard anlegen**

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `name`, `layout`, `copyFrom`, `shared`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/dashboards`.

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

**Aktuelle Einträge auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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}`

**Dashboard lesen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `did` (integer)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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}`

**Dashboard ändern**

- **Wer darf:** Berechtigung: `manageDashboards`
- **Pfadparameter:** `did` (integer)
- **JSON-Body:** `layout`, `name`, `shared`, `shares`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/dashboards/{did}`.

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

**Dashboard löschen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `did` (integer)

**Aufruf**

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

**Liefert**

`deleted`


## Bereich: `default-workflows`

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

Welchen Workflow ein neues Projekt je Vorgangstyp bekommt.

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

**Standard-Workflows auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Standard-Workflows ändern**

- **Wer darf:** Administratoren
- **JSON-Body:** `types`

**Aufruf**

```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": "…"}'
```

**Liefert**

`types`


## Bereich: `filters`

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

Gespeicherte Filter: eine MQL-Abfrage mit Namen, freigegeben oder privat.

### `GET /api/filters`

**Gespeicherte Filter auflisten**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `[].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>Beispielantwort</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`

**Gespeicherter Filter anlegen**

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `name`, `mql`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/filters`.

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

**Gespeicherter Filter löschen**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `fid` (integer)

**Aufruf**

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

**Liefert**

`deleted`


## Bereich: `gadgets`

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

Die Daten hinter einem Gadget eines Dashboards.

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

**Gadget lesen**

<details><summary>Details aus dem Code (englisch)</summary>

Data for one dashboard gadget.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `kind` (string)
- **Abfrageparameter:** `limit` (int, Standard 8), `mql` (string, Standard ""), `group` (string, Standard "status"), `project` (string, Standard "")

**Aufruf**

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

**Liefert**

`issues`, `total`, `items`


## Bereich: `global-permissions`

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

Allgemeine Berechtigungen: wer Projekte anlegen, die Zeiten aller sehen, die KI nutzen darf und mehr.

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

**Allgemeine Berechtigungen auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Allgemeine Berechtigungen ändern**

- **Wer darf:** Administratoren
- **JSON-Body:** `permission`, `grants`

**Aufruf**

```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": "…"}'
```

**Liefert**

`permission`


## Bereich: `groups`

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

Gruppen von Personen und wer darin ist.

### `GET /api/groups`

**Gruppen auflisten**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `[].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>Beispielantwort</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`

**Gruppe anlegen**

- **Wer darf:** Administratoren
- **JSON-Body:** `name`, `description`, `memberIds`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/groups`.

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

**Gruppe ändern**

- **Wer darf:** Administratoren
- **Pfadparameter:** `gid` (integer)
- **JSON-Body:** `name`, `description`, `memberIds`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Gruppe löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `gid` (integer)

**Aufruf**

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

**Liefert**

`deleted`


## Bereich: `health`

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

Für die Überwachung: ob der Dienst antwortet und im Detail, wie es um ihn steht.

### `GET /api/health`

**Gesundheitsprüfung lesen**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Ohne Anmeldung

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `status` | string | `"ok"` |
| `product` | string | `"mgproject"` |
| `version` | string | `"5.1.2"` |

<details><summary>Beispielantwort</summary>

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

</details>

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

**Details lesen**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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>


## Bereich: `helpdesk`

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

Vorgänge des angebundenen Helpdesks, in einem Projekt gezeigt.

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

**Vorgänge auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **Abfrageparameter:** `source` (string)

**Aufruf**

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

**Liefert**

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


## Bereich: `issue-types`

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

Vorgangstypen: Bug, Aufgabe, Story und eigene, mit Symbolen.

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

**Verschieben – Vorgangstyp**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `fromTypeId`, `toTypeId`, `project`

**Aufruf**

```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": "…"}'
```

**Liefert**

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

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

**Vorgangstyp ändern**

<details><summary>Details aus dem Code (englisch)</summary>

Rename a type or change its colour.

</details>

- **Wer darf:** Administratoren
- **Pfadparameter:** `tid` (integer)
- **JSON-Body:** `name`, `color`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Vorgangstyp löschen**

<details><summary>Details aus dem Code (englisch)</summary>

Remove a type nothing uses any more.

</details>

- **Wer darf:** Administratoren
- **Pfadparameter:** `tid` (integer)

**Aufruf**

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

**Liefert**

`deleted`


## Bereich: `issues`

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

Vorgänge (Tickets): anlegen, lesen, ändern, im Workflow weiterbewegen, Kommentare, Zeitbuchungen, Verknüpfungen, Anhänge, Beobachter und Verlauf.

### `POST /api/issues`

**Vorgang anlegen**

- **Wer darf:** Berechtigung: `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`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Mehrere auf einmal ändern – Vorgang**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `keys`, `changes`

**Aufruf**

```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": "…"}'
```

**Liefert**

`updated`, `refused`

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

**Aus Jira Service Management importieren – Vorgang**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Berechtigung: `create`
- **JSON-Body:** `source`, `keys`, `project`, `sprintId`, `epicId`

**Aufruf**

```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": "…"}'
```

**Liefert**

`created`, `skipped`

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

**Vorgang lesen**

- **Wer darf:** Berechtigung: `browse`
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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}`

**Vorgang ändern**

- **Wer darf:** Berechtigung: `edit`, `transition`, `assign`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `epicId`, `assigneeId`, `description`, `releaseDescription`, `statusId`

**Aufruf**

```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": "…"}'
```

**Liefert**

`status`, `statusId`, `questions`

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

**Vorgang löschen**

- **Wer darf:** Berechtigung: `delete`
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

`deleted`

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

**Anhänge auflisten (Vorgang)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

```json
[]
```

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

**Anhang anlegen (Vorgang)**

- **Wer darf:** Berechtigung: `attach`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `(multipart form: file)`

**Aufruf**

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

**Liefert**

Wie `GET /api/issues/{key}/attachments`.

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

**Kommentar anlegen (Vorgang)**

- **Wer darf:** Berechtigung: `comment`
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

JSON.

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

**Fragen beim Anlegen auflisten (Vorgang)**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Frage beim Anlegen anlegen (Vorgang)**

- **Wer darf:** Berechtigung: `edit`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `answers`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ran`

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

**Fragen beim Löschen auflisten (Vorgang)**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Berechtigung: `delete`
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Duplizieren – Vorgang**

<details><summary>Details aus dem Code (englisch)</summary>

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".

</details>

- **Wer darf:** Berechtigung: `duplicateIssues`, `browse`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `withAttachments`, `withSubtasks`

**Aufruf**

```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": "…"}'
```

**Liefert**

`key`, `project`

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

**Felder auflisten (Vorgang)**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Berechtigung: `browse`
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `scheme` | string | `"Default screen"` |
| `fields` | array |  |

<details><summary>Beispielantwort</summary>

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

</details>

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

**Felder ändern (Vorgang)**

- **Wer darf:** Berechtigung: `edit`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `values`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`

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

**Verknüpfung anlegen (Vorgang)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `target`, `type`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`

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

**Verschieben – Vorgang**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Berechtigung: `moveIssues`, `edit`
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

`key`, `moved`, `project`

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

**In einen anderen Sprint verschieben – Vorgang**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Berechtigung: `edit`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `sprintId`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Beteiligte ändern (Vorgang)**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Berechtigung: `edit`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `userIds`

**Aufruf**

```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": "…"}'
```

**Liefert**

`participants`

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

**Rang ändern – Vorgang**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Berechtigung: `edit`, `transition`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `beforeId`, `afterId`, `statusId`, `sprintId`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Aus Jira Service Management aktualisieren – Vorgang**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Berechtigung: `edit`
- **Pfadparameter:** `key` (string)
- **Abfrageparameter:** `source` (string)

**Aufruf**

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

**Liefert**

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

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

**Aufteilen – Vorgang**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Berechtigung: `create`, `edit`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `sprintId`, `estimate`

**Aufruf**

```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": "…"}'
```

**Liefert**

`original`, `copy`

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

**Sprint-Ziele auflisten (Vorgang)**

<details><summary>Details aus dem Code (englisch)</summary>

Where this issue may be moved or split to.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Status wechseln – Vorgang**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Berechtigung: `transition`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `statusId`, `viaSplit`, `answers`

**Aufruf**

```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": "…"}'
```

**Liefert**

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

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

**Übergänge auflisten (Vorgang)**

- **Wer darf:** Berechtigung: `transition`
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Beobachten oder nicht mehr beobachten – Vorgang**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

`watching`

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

**Zeitbuchung anlegen (Vorgang)**

- **Wer darf:** Berechtigung: `worklog`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `seconds`, `timeSpent`, `authorId`, `started`, `comment`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`


## Bereich: `links`

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

Verknüpfungen zwischen Vorgängen (blockiert, hängt zusammen mit …) bzw. die Schnelllinks der Navigation.

### `GET /api/links`

**Verknüpfungen auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `links` | array |  |

<details><summary>Beispielantwort</summary>

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

</details>

### `POST /api/links`

**Verknüpfung anlegen**

- **Wer darf:** Administratoren
- **JSON-Body:** `label`, `url`

**Aufruf**

```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": "…"}'
```

**Liefert**

`id`, `label`, `url`

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

**Verknüpfung löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `lid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

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

**Verknüpfung löschen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `lid` (integer)

**Aufruf**

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

**Liefert**

`deleted`


## Bereich: `mql`

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

MQL, die Abfragesprache: welche Felder es gibt, und eine Abfrage prüfen.

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

**Prüfen – MQL-Abfrage**

<details><summary>Details aus dem Code (englisch)</summary>

Validate a query and report how many issues it matches.

</details>

- **Wer darf:** Jede angemeldete Person
- **Abfrageparameter:** `mql` (string), `jql` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `ok` | boolean | `true` |
| `total` | integer | `38` |

<details><summary>Beispielantwort</summary>

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

</details>

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

**Feldliste lesen**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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>


## Bereich: `notification-schemes`

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

Benachrichtigungsschemata: wer per Mail erfährt, wenn etwas mit einem Vorgang geschieht.

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

**Benachrichtigungsschemata auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Benachrichtigungsschema anlegen**

- **Wer darf:** Administratoren
- **JSON-Body:** `name`, `description`

**Aufruf**

```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": "…"}'
```

**Liefert**

`id`, `name`

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

**Benachrichtigungsschema ändern**

- **Wer darf:** Administratoren
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `name`, `description`, `rules`

**Aufruf**

```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": "…"}'
```

**Liefert**

`id`

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

**Benachrichtigungsschema löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `sid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

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

**Anwenden – Benachrichtigungsschema**

- **Wer darf:** Administratoren
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `projects`

**Aufruf**

```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": "…"}'
```

**Liefert**

`scheme`, `projects`


## Bereich: `notifications`

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

Hinweise im Browser für die angemeldete Person.

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

**Offene Einträge auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `notices` | array |  |

<details><summary>Beispielantwort</summary>

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

</details>

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

**Gelesen-Markierung anlegen**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

`cleared`

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

**Testen – Benachrichtigung**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

`queued`


## Bereich: `permission-schemes`

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

Berechtigungsschemata: wer was in den Projekten darf, die sie nutzen.

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

**Berechtigungsschemata auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Berechtigungsschema anlegen**

- **Wer darf:** Administratoren
- **JSON-Body:** `name`, `description`, `copyOf`

**Aufruf**

```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": "…"}'
```

**Liefert**

`id`, `name`

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

**Auswahlwerte auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `[].id` | integer | `1` |
| `[].name` | string | `"Default permission scheme"` |
| `[].isDefault` | boolean | `true` |
| `[].seenBy` | array |  |

<details><summary>Beispielantwort</summary>

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

</details>

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

**Erklären – Berechtigungsschema**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Administratoren
- **Abfrageparameter:** `userId` (int), `project` (string)

**Aufruf**

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

**Liefert**

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

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

**Berechtigungsschema ändern**

- **Wer darf:** Administratoren
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `name`, `description`, `grants`

**Aufruf**

```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": "…"}'
```

**Liefert**

`id`, `name`

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

**Berechtigungsschema löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `sid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

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

**Anwenden – Berechtigungsschema**

<details><summary>Details aus dem Code (englisch)</summary>

Attach one scheme to a number of projects at once.

</details>

- **Wer darf:** Administratoren
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `projects`

**Aufruf**

```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": "…"}'
```

**Liefert**

`scheme`, `projects`


## Bereich: `projects`

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

Projekte: ihre Einstellungen, Komponenten, Versionen, Personen, Berechtigungs- und Benachrichtigungsschemata sowie die SLA-Einstellungen von Service-Projekten.

### `GET /api/projects`

**Projekte auflisten**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `[].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>Beispielantwort</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`

**Projekt anlegen**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

Wie `GET /api/projects`.

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

**Projekt lesen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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}`

**Projekt ändern**

- **Wer darf:** Berechtigung: `manage`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `name`, `description`, `leadId`, `avatarColor`, `workflowId`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/projects/{key}`.

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

**Projekt löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

`deleted`

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

**Zuweisbare Personen auflisten (Projekt)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Symbol senden (Projekt)**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Berechtigung: `manage`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `(multipart form: file)`

**Aufruf**

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

**Liefert**

JSON.

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

**Symbol löschen (Projekt)**

- **Wer darf:** Berechtigung: `manage`
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

JSON.

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

**Vorgangstypen auflisten (Projekt)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Vorgangstypen ändern (Projekt)**

- **Wer darf:** Berechtigung: `manage`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `typeIds`

**Aufruf**

```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": "…"}'
```

**Liefert**

`typeIds`

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

**Verschieben – Vorgangstyp (Projekt)**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Berechtigung: `manage`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `fromTypeId`, `toTypeId`

**Aufruf**

```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": "…"}'
```

**Liefert**

`moved`, `from`, `to`

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

**Berechtigungen auflisten (Projekt)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Berechtigungen ändern (Projekt)**

- **Wer darf:** Berechtigung: `manage`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `entries`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/projects/{key}/permissions`.

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

**Roadmap lesen (Projekt)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Schema lesen (Projekt)**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Schema ändern (Projekt)**

- **Wer darf:** Berechtigung: `manage`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `schemeId`

**Aufruf**

```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": "…"}'
```

**Liefert**

`schemeId`

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

**Statistik lesen (Projekt)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Workflows auflisten (Projekt)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `key` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Workflows ändern (Projekt)**

- **Wer darf:** Berechtigung: `manage`
- **Pfadparameter:** `key` (string)
- **JSON-Body:** `types`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/projects/{key}/workflows`.


## Bereich: `reports`

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

Berichte: Zeit, Sprints, SLAs, Kunden - als JSON und, wo angegeben, als CSV, PDF oder Excel.

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

**Aktueller Sprint lesen**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Abweichungsbericht lesen**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Abweichungsbericht als PDF exportieren**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

Eine Datei (application/pdf).

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

**Eigene Sprint-Arbeit lesen**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

```json
[]
```

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

**Laufende Sprints auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `[].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>Beispielantwort</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`

**Sprints auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **Abfrageparameter:** `from` (string), `to` (string), `boardId` (string), `projectId` (string), `sprintId` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Zeitübersicht lesen**

<details><summary>Details aus dem Code (englisch)</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.

</details>

- **Wer darf:** Jede angemeldete Person
- **Abfrageparameter:** `mine` (string), `month` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Zeitübersicht als PDF exportieren**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Jede angemeldete Person
- **Abfrageparameter:** `mine` (string), `details` (string), `month` (string)

**Aufruf**

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

**Liefert**

Eine Datei (application/pdf).

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

**Arbeitszeiten auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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

</details>

- **Wer darf:** Administratoren
- **Abfrageparameter:** `from` (string), `to` (string), `users` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `from` | string | `"2026-11-21"` |
| `to` | string | `"2026-11-21"` |
| `days` | array |  |
| `people` | array |  |
| `people[].user` | object |  |
| `people[].days` | array |  |

<details><summary>Beispielantwort</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`

**Arbeitszeiten als XLSX exportieren**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren
- **Abfrageparameter:** `from` (string), `to` (string), `user` (string)

**Aufruf**

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

**Liefert**

JSON.

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

**Zeitbuchungen auflisten**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Zeitbuchungen als CSV exportieren**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

Eine Datei (text/csv).

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

**Zeitbuchungen als PDF exportieren**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

Eine Datei (application/pdf).


## Bereich: `routines`

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

Routinen: Vorgänge, die nach Zeitplan angelegt werden.

### `GET /api/routines`

**Routinen auflisten**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Routine anlegen**

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `name`, `description`, `projectKey`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/routines`.

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

**Routine ändern**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `rid` (integer)
- **JSON-Body:** `name`, `description`, `projectKey`, `steps`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Routine löschen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `rid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

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

**Fragen auflisten (Routine)**

<details><summary>Details aus dem Code (englisch)</summary>

What has to be answered before this routine can run.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `rid` (integer)

**Aufruf**

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

**Liefert**

`routine`, `questions`

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

**Ausführen – Routine**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Berechtigung: `create`
- **Pfadparameter:** `rid` (integer)
- **JSON-Body:** `answers`

**Aufruf**

```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": "…"}'
```

**Liefert**

`created`, `project`


## Bereich: `screen-schemes`

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

Maskenschemata: welche Felder ein Formular zeigt, je Vorgangstyp und Vorgang.

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

**Maskenschemata auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Maskenschema anlegen**

- **Wer darf:** Administratoren
- **JSON-Body:** `name`, `description`, `copyFrom`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/screen-schemes`.

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

**Maskenschema ändern**

- **Wer darf:** Administratoren
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `name`, `description`, `fields`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

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

**Maskenschema löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `sid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

### `POST /api/screen-schemes/{sid}/assign`

**Zuweisen – Maskenschema**

<details><summary>Details aus dem Code (englisch)</summary>

Hang a scheme on a project, for one issue type or for all of them.

</details>

- **Wer darf:** Administratoren
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `project`, `typeId`, `remove`

**Aufruf**

```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": "…"}'
```

**Liefert**

`project`, `typeId`, `scheme`


## Bereich: `search`

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

Vorgänge mit MQL suchen und das Ergebnis exportieren.

### `GET /api/search`

**Suche lesen**

- **Wer darf:** Jede angemeldete Person
- **Abfrageparameter:** `mql` (string), `jql` (string), `limit` (int, Standard 200), `offset` (int, Standard 0)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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.<fmt> als Datei exportieren**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `fmt` (string)
- **Abfrageparameter:** `mql` (string)

**Aufruf**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/search/export.{fmt}?mql=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Liefert**

JSON.


## Bereich: `sprints`

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

Sprints: starten, abschließen, ihre Vorgänge und Diagramme.

### `PUT /api/sprints/{sid}`

**Sprint ändern**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `name`, `goal`, `startDate`, `endDate`, `state`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

### `DELETE /api/sprints/{sid}`

**Sprint löschen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

### `GET /api/sprints/{sid}/burndown`

**Burndown lesen (Sprint)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Abschließen – Sprint**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `moveToSprintId`

**Aufruf**

```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": "…"}'
```

**Liefert**

`sprint`, `moved`

### `POST /api/sprints/{sid}/disturbances`

**Störung anlegen (Sprint)**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Berechtigung: `edit`
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `keys`

**Aufruf**

```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": "…"}'
```

**Liefert**

`sprint`, `issues`

### `POST /api/sprints/{sid}/sort-by-epic`

**Sort by epic senden (Sprint)**

<details><summary>Details aus dem Code (englisch)</summary>

The button for a sprint as it is: its issues brought together by epic, once, now.

</details>

- **Wer darf:** Berechtigung: `edit`
- **Pfadparameter:** `sid` (integer)

**Aufruf**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/sprints/{sid}/sort-by-epic' \
  -H 'Authorization: Bearer $TOKEN'
```

**Liefert**

`ok`

### `POST /api/sprints/{sid}/start`

**Starten – Sprint**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `startDate`, `endDate`, `lengthDays`, `goal`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.


## Bereich: `statuses`

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

Status und ihre Kategorien (offen, in Arbeit, erledigt).

### `POST /api/statuses`

**Status anlegen**

- **Wer darf:** Administratoren
- **JSON-Body:** `name`, `category`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

### `PUT /api/statuses/{sid}`

**Status ändern**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `name`, `category`

**Aufruf**

```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": "…"}'
```

**Liefert**

`affected`, `categoryChanged`

### `DELETE /api/statuses/{sid}`

**Status löschen**

<details><summary>Details aus dem Code (englisch)</summary>

Remove a status nothing points at any more.

</details>

- **Wer darf:** Administratoren
- **Pfadparameter:** `sid` (integer)

**Aufruf**

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

**Liefert**

`deleted`


## Bereich: `structures`

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

Strukturen: Vorgänge als Baum angeordnet, mit Spalten nach Wahl.

### `GET /api/structures`

**Strukturen auflisten**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Struktur anlegen**

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `name`, `description`, `shared`, `columns`, `mql`, `projectIds`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/structures`.

### `GET /api/structures/{sid}`

**Struktur lesen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer)
- **Abfrageparameter:** `hideReleased` (string)

**Aufruf**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/structures/{sid}?hideReleased=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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}`

**Struktur ändern**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `name`, `description`, `shared`, `columns`, `mql`, `projectIds`, `shares`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/structures/{sid}`.

### `DELETE /api/structures/{sid}`

**Struktur löschen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

### `POST /api/structures/{sid}/copy`

**Kopieren – Struktur**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `name`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

### `PUT /api/structures/{sid}/projects/{pid}`

**Projekt ändern (Struktur)**

<details><summary>Details aus dem Code (englisch)</summary>

Generator chain of one project inside a structure.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer), `pid` (integer)
- **JSON-Body:** `generators`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`

### `POST /api/structures/{sid}/rows`

**Zeile anlegen (Struktur)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer)
- **JSON-Body:** `parentId`, `kind`, `issue`, `title`, `generators`

**Aufruf**

```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": "…"}'
```

**Liefert**

`id`

### `PUT /api/structures/{sid}/rows/{rid}`

**Zeile ändern (Struktur)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer), `rid` (integer)
- **JSON-Body:** `title`, `position`, `generators`, `parentId`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`

### `DELETE /api/structures/{sid}/rows/{rid}`

**Zeile löschen (Struktur)**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `sid` (integer), `rid` (integer)

**Aufruf**

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

**Liefert**

`deleted`


## Bereich: `system/accent`

<a id="area-system-accent"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/accent`

**Akzentfarbe lesen**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Akzentfarbe ändern**

- **Wer darf:** Administratoren
- **JSON-Body:** `auto`, `color`

**Aufruf**

```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": "…"}'
```

**Liefert**

`palette`


## Bereich: `system/ai`

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

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/ai`

**KI-Assistent lesen**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**KI-Assistent ändern**

<details><summary>Details aus dem Code (englisch)</summary>

Saved as given. Switching on with an address that leaves this server needs
the administrator's confirmation of exactly that address.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `kind`, `baseUrl`, `chatModel`, `embedModel`, `toolModel`, `mode`, `basicUser`, `context`, `apiKey`, `clearApiKey`, `basicPassword`, `confirmLeaves`, `confirmHost`, `enabled`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/system/ai`.

### `GET /api/system/ai/cases`

**Prüffälle auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `cases` | array |  |

<details><summary>Beispielantwort</summary>

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

</details>

### `POST /api/system/ai/cases`

**Prüffall anlegen**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `question`, `expect`, `expected`, `example`, `note`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/system/ai/cases`.

### `POST /api/system/ai/cases/standard`

**Standardfrage anlegen**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

`added`

### `DELETE /api/system/ai/cases/{cid}`

**Prüffall löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `cid` (integer)

**Aufruf**

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

**Liefert**

`ok`

### `GET /api/system/ai/glossary`

**Glossar auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `terms` | array |  |
| `terms[].id` | integer | `2` |
| `terms[].term` | string | `"laufender Sprint"` |
| `terms[].meaning` | string | `"the running sprint: sprint in openSprints()"` |

<details><summary>Beispielantwort</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`

**Glossar-Begriff anlegen**

<details><summary>Details aus dem Code (englisch)</summary>

A word of this team and what it means here - "überfällig", "Greenleaf", "der Orbit-Sprint".

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `term`, `meaning`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`

### `DELETE /api/system/ai/glossary/{gid}`

**Glossar-Begriff löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `gid` (integer)

**Aufruf**

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

**Liefert**

`ok`

### `GET /api/system/ai/log`

**Protokoll auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

The last questions, for the administrator: way, steps, query, outcome, time, thumbs.

</details>

- **Wer darf:** Administratoren
- **Abfrageparameter:** `limit` (int, Standard 50)

**Aufruf**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/ai/log?limit=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `entries` | array |  |
| `days` | integer | `30` |

<details><summary>Beispielantwort</summary>

```json
{
  "entries": [],
  "days": 30
}
```

</details>

### `POST /api/system/ai/reindex`

**Index neu aufbauen – KI-Assistent**

<details><summary>Details aus dem Code (englisch)</summary>

Everything again - after a change of model, or to be sure.

</details>

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

JSON.

### `GET /api/system/ai/runs`

**Läufe auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `runs` | array |  |

<details><summary>Beispielantwort</summary>

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

</details>

### `POST /api/system/ai/runs`

**Lauf anlegen**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `mode`

**Aufruf**

```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": "…"}'
```

**Liefert**

`id`

### `POST /api/system/ai/test`

**Testen – KI-Assistent**

<details><summary>Details aus dem Code (englisch)</summary>

Reaches the server, lists its models, and has the chosen one say a word.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `kind`, `baseUrl`, `chatModel`, `embedModel`, `basicUser`, `apiKey`, `basicPassword`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.


## Bereich: `system/announcement`

<a id="area-system-announcement"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/announcement`

**Ankündigung lesen**

<details><summary>Details aus dem Code (englisch)</summary>

Readable by anybody signed in - everybody is meant to see it.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `message` | string | `""` |
| `active` | boolean | `false` |
| `updatedBy` | null | `null` |
| `updated` | string | `"2026-11-21T21:18:58Z"` |

<details><summary>Beispielantwort</summary>

```json
{
  "message": "",
  "active": false,
  "updatedBy": null,
  "updated": "2026-11-21T21:18:58Z"
}
```

</details>

### `PUT /api/system/announcement`

**Ankündigung ändern**

- **Wer darf:** Administratoren
- **JSON-Body:** `message`, `active`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/system/announcement`.


## Bereich: `system/applinks`

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

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/applinks`

**Applinks lesen**

<details><summary>Details aus dem Code (englisch)</summary>

The application links of this installation. Administrators.

</details>

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `links` | array |  |
| `product` | string | `"mgproject"` |

<details><summary>Beispielantwort</summary>

```json
{
  "links": [],
  "product": "mgproject"
}
```

</details>

### `POST /api/system/applinks`

**Applinks senden**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `base_url`, `username`, `secret`, `own_url`, `own_name`

**Aufruf**

```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": "…"}'
```

**Liefert**

`link`

### `POST /api/system/applinks/browser`

**Browser senden**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `base_url`, `own_url`, `own_name`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

### `POST /api/system/applinks/complete`

**Abschließen – applinks**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

`link`

### `DELETE /api/system/applinks/{link_id}`

**Applinks löschen**

<details><summary>Details aus dem Code (englisch)</summary>

Remove a link - here and in the other application.

</details>

- **Wer darf:** Administratoren
- **Pfadparameter:** `link_id` (integer)

**Aufruf**

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

**Liefert**

`error`, `ok`, `other_side`

### `POST /api/system/applinks/{link_id}/test`

**Testen – applinks**

<details><summary>Details aus dem Code (englisch)</summary>

Ask the other application as whom it sees you over the link.

</details>

- **Wer darf:** Administratoren
- **Pfadparameter:** `link_id` (integer)

**Aufruf**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/applinks/{link_id}/test' \
  -H 'Authorization: Bearer $TOKEN'
```

**Liefert**

`error`


## Bereich: `system/audit`

<a id="area-system-audit"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/audit`

**Prüfprotokoll auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

The audit log, newest first, filtered by person, text and dates.

</details>

- **Wer darf:** Administratoren
- **Abfrageparameter:** `limit` (int, Standard 100)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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>


## Bereich: `system/audit.csv`

<a id="area-system-audit-csv"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/audit.csv`

**Prüfprotokoll als CSV exportieren**

<details><summary>Details aus dem Code (englisch)</summary>

The same, as a CSV file - for an auditor, or a SIEM import.

</details>

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

Eine Datei (text/csv).


## Bereich: `system/bitbucket`

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

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/bitbucket`

**Bitbucket-Anbindung lesen**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `enabled` | boolean | `false` |
| `username` | string | `""` |
| `workspace` | string | `""` |
| `hasPassword` | boolean | `false` |
| `checked` | null | `null` |
| `account` | null | `null` |
| `scopes` | array |  |
| `legacyScopes` | array |  |

<details><summary>Beispielantwort</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`

**Bitbucket-Anbindung ändern**

- **Wer darf:** Administratoren
- **JSON-Body:** `username`, `workspace`, `password`, `clearPassword`, `enabled`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/system/bitbucket`.

### `POST /api/system/bitbucket/test`

**Testen – Bitbucket-Anbindung**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

`workspaces`, `limited`


## Bereich: `system/branding`

<a id="area-system-branding"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/branding`

**Logo und Farben lesen**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `light` | null | `null` |
| `dark` | null | `null` |
| `favicon` | null | `null` |
| `folder` | string | `"/tmp/apidocs-4rcbnd1a/branding"` |
| `accept` | array |  |

<details><summary>Beispielantwort</summary>

```json
{
  "light": null,
  "dark": null,
  "favicon": null,
  "folder": "/tmp/apidocs-4rcbnd1a/branding",
  "accept": [
    "image/jpeg",
    "image/png",
    "…"
  ]
}
```

</details>

### `POST /api/system/branding`

**Logo und Farben senden**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren
- **Abfrageparameter:** `slot` (string)
- **JSON-Body:** `(multipart form: file)`

**Aufruf**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/branding?slot=…' \
  -H 'Authorization: Bearer $TOKEN' \
  -F 'file=@/path/to/file'
```

**Liefert**

`accent`

### `DELETE /api/system/branding`

**Logo und Farben löschen**

<details><summary>Details aus dem Code (englisch)</summary>

Back to the logo that ships with MGProject.

</details>

- **Wer darf:** Administratoren
- **Abfrageparameter:** `slot` (string)

**Aufruf**

```bash
curl -s -X DELETE 'http://127.0.0.1:6633/api/system/branding?slot=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Liefert**

`removed`


## Bereich: `system/database`

<a id="area-system-database"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/database`

**Datenbank lesen**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Testen – Datenbank**

- **Wer darf:** Administratoren
- **JSON-Body:** `password`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`, `error`


## Bereich: `system/db`

<a id="area-system-db"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `POST /api/system/db/query`

**Abfrage senden**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `sql`, `preview`

**Aufruf**

```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": "…"}'
```

**Liefert**

`kind`, `columns`, `rows`, `total`, `shown`, `table`, `message`

### `GET /api/system/db/table/{name}`

**Tabelle lesen**

<details><summary>Details aus dem Code (englisch)</summary>

One page of a table, with a filter per column.

</details>

- **Wer darf:** Administratoren
- **Pfadparameter:** `name` (string)
- **Abfrageparameter:** `f_` (string), `page` (string)

**Aufruf**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/db/table/{name}?f_=…&page=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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}`

**Tabelle ändern**

<details><summary>Details aus dem Code (englisch)</summary>

Change one value in one row, named by its key. Nothing else.

</details>

- **Wer darf:** Administratoren
- **Pfadparameter:** `name` (string)
- **JSON-Body:** `column`, `keyColumn`, `keyValue`, `value`

**Aufruf**

```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": "…"}'
```

**Liefert**

`table`, `column`, `was`, `now`

### `GET /api/system/db/tables`

**Datenbanktabellen auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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>


## Bereich: `system/deactivated-tickets`

<a id="area-system-deactivated-tickets"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/deactivated-tickets`

**Vorgänge deaktivierter Personen auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren
- **Abfrageparameter:** `done` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `tickets` | array |  |
| `people` | array |  |

<details><summary>Beispielantwort</summary>

```json
{
  "tickets": [],
  "people": []
}
```

</details>


## Bereich: `system/entra`

<a id="area-system-entra"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/entra`

**Microsoft-Entra-Einstellungen auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Microsoft-Entra-Einstellungen ändern**

- **Wer darf:** Administratoren
- **JSON-Body:** `clientSecret`, `clearSecret`, `autoCreate`, `entraOnly`, `syncEnabled`, `syncHours`, `deactivateMissing`, `enabled`, `tenantId`, `clientId`, `domainAllowList`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/system/entra`.

### `POST /api/system/entra/sync`

**Abgleich ausführen – Microsoft-Entra-Einstellung**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

JSON.

### `POST /api/system/entra/test`

**Testen – Microsoft-Entra-Einstellung**

<details><summary>Details aus dem Code (englisch)</summary>

Read the tenant's discovery document - proves the tenant exists and that
this server can reach Microsoft.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `tenantId`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`, `error`, `issuer`, `authorization`, `redirectUri`


## Bereich: `system/identity`

<a id="area-system-identity"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/identity`

**Identitätsanbieter auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Identitätsanbieter ändern**

<details><summary>Details aus dem Code (englisch)</summary>

The order (whose name and address count when several know a person) and "only through an
identity provider" - for all of them.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `order`, `onlyThroughIdp`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/system/identity`.

### `PUT /api/system/identity/{provider}`

**Identitätsanbieter ändern**

- **Wer darf:** Administratoren
- **Pfadparameter:** `provider` (string)

**Aufruf**

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

**Liefert**

JSON.

### `POST /api/system/identity/{provider}/sync`

**Abgleich ausführen – Identitätsanbieter**

- **Wer darf:** Administratoren
- **Pfadparameter:** `provider` (string)

**Aufruf**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/identity/{provider}/sync' \
  -H 'Authorization: Bearer $TOKEN'
```

**Liefert**

JSON.

### `POST /api/system/identity/{provider}/test`

**Testen – Identitätsanbieter**

- **Wer darf:** Administratoren
- **Pfadparameter:** `provider` (string)

**Aufruf**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/system/identity/{provider}/test' \
  -H 'Authorization: Bearer $TOKEN'
```

**Liefert**

`ok`, `lines`


## Bereich: `system/instance`

<a id="area-system-instance"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/instance`

**Instanz-Einstellungen auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

Where this installation keeps its things - the questions asked in support.

</details>

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Name ändern**

<details><summary>Details aus dem Code (englisch)</summary>

Name this installation, so three open tabs can be told apart.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `name`

**Aufruf**

```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": "…"}'
```

**Liefert**

`name`


## Bereich: `system/jsm`

<a id="area-system-jsm"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/jsm`

**Anbindung an Jira Service Management lesen**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `enabled` | boolean | `false` |
| `url` | string | `""` |
| `email` | string | `""` |
| `hasToken` | boolean | `false` |
| `projects` | array |  |

<details><summary>Beispielantwort</summary>

```json
{
  "enabled": false,
  "url": "",
  "email": "",
  "hasToken": false,
  "projects": []
}
```

</details>

### `PUT /api/system/jsm`

**Anbindung an Jira Service Management ändern**

- **Wer darf:** Administratoren
- **JSON-Body:** `url`, `email`, `token`, `clearToken`, `projects`, `enabled`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/system/jsm`.

### `GET /api/system/jsm/projects`

**Projekte auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

The service desks the stored account can see.

</details>

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

`projects`

### `POST /api/system/jsm/test`

**Testen – Anbindung an Jira Service Management**

<details><summary>Details aus dem Code (englisch)</summary>

Prove the site answers and say who the token belongs to.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `url`, `email`, `token`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`, `error`, `account`, `projects`

### `GET /api/system/jsm/tickets`

**Vorgänge auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

`tickets`, `warnings`


## Bereich: `system/license`

<a id="area-system-license"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/license`

**Lizenz lesen**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Lizenz ändern**

- **Wer darf:** Administratoren
- **JSON-Body:** `key`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/system/license`.

### `DELETE /api/system/license`

**Lizenz löschen**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

Wie `GET /api/system/license`.


## Bereich: `system/mail`

<a id="area-system-mail"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/mail`

**Mail-Einstellungen auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Mail-Einstellungen ändern**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

Wie `GET /api/system/mail`.

### `POST /api/system/mail/test`

**Testen – Mail-Einstellung**

<details><summary>Details aus dem Code (englisch)</summary>

Send one message to the person asking, so the setup can be checked.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `to`

**Aufruf**

```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": "…"}'
```

**Liefert**

`sent`, `enabled`


## Bereich: `system/mail-queue`

<a id="area-system-mail-queue"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/mail-queue`

**Mail-Warteschlange auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

What is waiting, what went and what failed - newest first.

</details>

- **Wer darf:** Administratoren
- **Abfrageparameter:** `status` (string)

**Aufruf**

```bash
curl -s -X GET 'http://127.0.0.1:6633/api/system/mail-queue?status=…' \
  -H 'Authorization: Bearer $TOKEN'
```

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `queue` | array |  |
| `enabled` | boolean | `false` |
| `sender` | string | `""` |

<details><summary>Beispielantwort</summary>

```json
{
  "queue": [],
  "enabled": false,
  "sender": ""
}
```

</details>


## Bereich: `system/mgservice`

<a id="area-system-mgservice"></a>

Systemeinstellungen, für Administratoren: Lizenz, Mail, Datenbank, Logo, Ankündigungen, die KI, Identitätsanbieter und mehr.

### `GET /api/system/mgservice`

**Anbindung an MGService lesen**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `link` | null | `null` |
| `enabled` | boolean | `false` |
| `url` | string | `""` |
| `user` | string | `""` |
| `hasToken` | boolean | `false` |
| `tokenHint` | string | `""` |
| `projects` | array |  |

<details><summary>Beispielantwort</summary>

```json
{
  "link": null,
  "enabled": false,
  "url": "",
  "user": "",
  "hasToken": false,
  "tokenHint": "",
  "projects": []
}
```

</details>

### `PUT /api/system/mgservice`

**Anbindung an MGService ändern**

- **Wer darf:** Administratoren
- **JSON-Body:** `enabled`, `url`, `user`, `token`, `projects`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/system/mgservice`.

### `GET /api/system/mgservice/projects`

**Projekte auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

`projects`

### `POST /api/system/mgservice/test`

**Testen – Anbindung an MGService**

- **Wer darf:** Administratoren
- **JSON-Body:** `url`, `user`, `token`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`, `error`, `account`, `projects`


## Bereich: `third-party`

<a id="area-third-party"></a>

### `GET /api/third-party`

**Third party lesen**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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>


## Bereich: `timeclock`

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

Arbeitszeiten: Kommen, Pause und Gehen; Korrekturen durch Administratoren; der Export.

### `GET /api/timeclock`

**Arbeitszeiten auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

The state of the people asked about. Everybody may look; only their own
state can they change.

</details>

- **Wer darf:** Jede angemeldete Person
- **Abfrageparameter:** `users` (string), `day` (string)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Stempelung anlegen**

<details><summary>Details aus dem Code (englisch)</summary>

Clock in, take a break, clock out - for oneself and nobody else.

</details>

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `kind`, `note`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/timeclock`.

### `POST /api/timeclock/ask`

**Fragen – Stempelung**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

`ask`, `kind`, `since`, `sinceDay`, `state`

### `POST /api/timeclock/close-day`

**Tag abschließen – Stempelung**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `at`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`, `nothing`, `at`

### `POST /api/timeclock/manual`

**Von Hand nachtragen – Stempelung**

<details><summary>Details aus dem Code (englisch)</summary>

An entry that was never punched - somebody forgot, or the day was fixed
up afterwards.

</details>

- **Wer darf:** Administratoren
- **JSON-Body:** `userId`, `kind`, `at`, `note`

**Aufruf**

```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": "…"}'
```

**Liefert**

`id`

### `GET /api/timeclock/states`

**Zustände auflisten**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</summary>

```json
{
  "states": {
    "2": "out",
    "3": "out",
    "4": "out",
    "5": "out",
    "1": "out",
    "6": "out"
  },
  "day": "2026-11-21"
}
```

</details>

### `PUT /api/timeclock/{eid}`

**Stempelung ändern**

<details><summary>Details aus dem Code (englisch)</summary>

Put an entry right. Who corrected it and when is kept with it.

</details>

- **Wer darf:** Administratoren
- **Pfadparameter:** `eid` (integer)
- **JSON-Body:** `kind`, `at`, `note`

**Aufruf**

```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": "…"}'
```

**Liefert**

`id`, `kind`, `at`

### `DELETE /api/timeclock/{eid}`

**Stempelung löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `eid` (integer)

**Aufruf**

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

**Liefert**

`deleted`


## Bereich: `uploads`

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

Große Dateien in Teilen: beginnen, Teil für Teil senden, Stand abfragen, abbrechen.

### `POST /api/uploads`

**Upload anlegen**

<details><summary>Details aus dem Code (englisch)</summary>

Begin a big file in pieces: its name and size, checked against the limit first.

</details>

- **Wer darf:** Jede angemeldete Person
- **JSON-Body:** `filename`, `size`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

### `GET /api/uploads/{uid}`

**Upload lesen**

<details><summary>Details aus dem Code (englisch)</summary>

How far a big file has got - asked before a piece is sent again.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `uid` (string)

**Aufruf**

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

**Liefert**

JSON.

### `DELETE /api/uploads/{uid}`

**Upload löschen**

<details><summary>Details aus dem Code (englisch)</summary>

A big file given up: its pieces go at once.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `uid` (string)

**Aufruf**

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

**Liefert**

Wie `GET /api/uploads/{uid}`.

### `PUT /api/uploads/{uid}/{index}`

**Upload ändern**

<details><summary>Details aus dem Code (englisch)</summary>

One piece of a big file, in order.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `uid` (string), `index` (integer)

**Aufruf**

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

**Liefert**

JSON.


## Bereich: `users`

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

Personen: auflisten, anlegen, ändern, deaktivieren - und die Personen zur Auswahl in einem Feld.

### `GET /api/users`

**Personen auflisten**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `[].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>Beispielantwort</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`

**Person anlegen**

- **Wer darf:** Administratoren
- **JSON-Body:** `username`, `displayName`, `withPassword`, `password`, `email`, `avatarColor`, `isAdmin`

**Aufruf**

```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": "…"}'
```

**Liefert**

`user`, `password`

### `PUT /api/users/{uid}`

**Person ändern**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `uid` (integer)
- **JSON-Body:** `clockPrompt`, `isAdmin`, `active`, `username`, `displayName`, `email`, `avatarColor`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.

### `DELETE /api/users/{uid}`

**Person löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `uid` (integer)
- **JSON-Body:** `confirm`

**Aufruf**

```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": "…"}'
```

**Liefert**

`confirm`, `username`, `wrote`, `deleted`

### `POST /api/users/{uid}/password`

**Passwort senden (Person)**

- **Wer darf:** Administratoren
- **Pfadparameter:** `uid` (integer)
- **JSON-Body:** `password`, `mustChange`

**Aufruf**

```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": "…"}'
```

**Liefert**

`password`, `user`

### `DELETE /api/users/{uid}/password`

**Passwort löschen (Person)**

- **Wer darf:** Administratoren
- **Pfadparameter:** `uid` (integer)

**Aufruf**

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

**Liefert**

`ok`

### `POST /api/users/{uid}/unlock`

**Entsperren – Person**

- **Wer darf:** Administratoren
- **Pfadparameter:** `uid` (integer)

**Aufruf**

```bash
curl -s -X POST 'http://127.0.0.1:6633/api/users/{uid}/unlock' \
  -H 'Authorization: Bearer $TOKEN'
```

**Liefert**

`ok`


## Bereich: `webhooks`

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

Webhooks: Adressen, die von Ereignissen erfahren, und was ihnen geschickt wurde.

### `GET /api/webhooks`

**Webhooks auflisten**

- **Wer darf:** Administratoren

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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`

**Webhook anlegen**

- **Wer darf:** Administratoren
- **JSON-Body:** `url`, `name`, `enabled`, `format`, `projectId`, `events`

**Aufruf**

```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": "…"}'
```

**Liefert**

`id`

### `PUT /api/webhooks/{wid}`

**Webhook ändern**

- **Wer darf:** Administratoren
- **Pfadparameter:** `wid` (integer)
- **JSON-Body:** `name`, `url`, `enabled`, `format`, `projectId`, `events`

**Aufruf**

```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": "…"}'
```

**Liefert**

`ok`

### `DELETE /api/webhooks/{wid}`

**Webhook löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `wid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

### `POST /api/webhooks/{wid}/test`

**Testen – Webhook**

- **Wer darf:** Administratoren
- **Pfadparameter:** `wid` (integer)

**Aufruf**

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

**Liefert**

`ok`, `detail`


## Bereich: `workflows`

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

Workflows: Status und die Übergänge dazwischen, mit ihren Bedingungen.

### `GET /api/workflows`

**Workflows auflisten**

- **Wer darf:** Jede angemeldete Person

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `[].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>Beispielantwort</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`

**Workflow anlegen**

- **Wer darf:** Administratoren
- **JSON-Body:** `name`, `description`, `copyFrom`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/workflows`.

### `GET /api/workflows/{wid}`

**Workflow lesen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `wid` (integer)

**Aufruf**

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

**Liefert**

| Feld | Typ | Beispiel |
|---|---|---|
| `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>Beispielantwort</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}`

**Workflow ändern**

- **Wer darf:** Administratoren
- **Pfadparameter:** `wid` (integer)
- **JSON-Body:** `name`, `description`, `initialStatusId`, `layout`, `statusIds`, `transitions`

**Aufruf**

```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": "…"}'
```

**Liefert**

Wie `GET /api/workflows/{wid}`.

### `DELETE /api/workflows/{wid}`

**Workflow löschen**

- **Wer darf:** Administratoren
- **Pfadparameter:** `wid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

### `POST /api/workflows/{wid}/duplicate`

**Duplizieren – Workflow**

<details><summary>Details aus dem Code (englisch)</summary>

A copy with the same statuses and transitions, attached to no project.

</details>

- **Wer darf:** Administratoren
- **Pfadparameter:** `wid` (integer)
- **JSON-Body:** `name`

**Aufruf**

```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": "…"}'
```

**Liefert**

JSON.


## Bereich: `worklogs`

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

Zeitbuchungen: ändern und löschen. Neue werden am Vorgang gebucht.

### `PUT /api/worklogs/{wid}`

**Zeitbuchung ändern**

<details><summary>Details aus dem Code (englisch)</summary>

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.

</details>

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `wid` (integer)
- **JSON-Body:** `seconds`, `timeSpent`, `started`, `comment`

**Aufruf**

```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": "…"}'
```

**Liefert**

`id`, `seconds`, `started`

### `DELETE /api/worklogs/{wid}`

**Zeitbuchung löschen**

- **Wer darf:** Jede angemeldete Person
- **Pfadparameter:** `wid` (integer)

**Aufruf**

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

**Liefert**

`deleted`

