openapi: 3.0.0 paths: /secret-key: get: description: "Where the instance secret key comes from, which seals the secrets the server stores (webhook signing secrets): the key file the server made on its first start (with its path, to back up), a variable the operator set, or none. Never the key itself. Needs the `admin.roles` permission." operationId: SecretKey_get parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/SecretKeyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Where the secret key is tags: - system x-required-permission: admin.roles /jobs/status: get: description: "Whether the background jobs (release planning and files, imports, webhook deliveries, …) are taken: the processes consuming them (`CCMS_ROLE` `worker` or `all`) heard from in the last minute, when one last consumed, the jobs due and running, and how long the longest-waiting one waited. `meta.level` is `warning` when jobs have waited five minutes while nothing consumed: no worker takes them. Counts only, never a job's content. Needs the `admin.roles` permission." operationId: JobsStatus_status parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/JobsStatusDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Background work tags: - jobs x-required-permission: admin.roles /storage-usage: get: description: "The storage this installation uses, per category: media (uploaded images and attachments) and archived PDFs (release outputs), which count towards the limit (`CCMS_STORAGE_LIMIT_BYTES`, none by default), and the Git content and the database for information. The totals move with every upload and delete and are counted afresh periodically (`recountedAt`); no store is counted on request. Needs the `admin.roles` permission." operationId: StorageUsage_get parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/StorageUsageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Storage used tags: - storage x-required-permission: admin.roles /storage-usage/files: get: description: The files uploaded into change sets, largest first, each once (by its hash), whichever change set holds it. Needs the `admin.roles` permission. operationId: StorageUsage_files parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/StoredFilePageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Largest uploaded files tags: - storage x-required-permission: admin.roles /audit-events/export: get: description: "Every event the filters select (the same filters as `GET /audit-events`, so the file holds exactly what the list pages through), newest first, as a download (`Content-Disposition: attachment`, `nosniff`, `Cache-Control: no-store`), streamed. `csv`: RFC 4180, a header row, lines ending in CRLF, columns `id`, `at`, `actor kind`, `actor id`, `action`, `subject type`, `subject id`, `comment`, `data` (`at` in ISO 8601 UTC, `data` as JSON text; a value a spreadsheet would run as a formula starts with `'`). `jsonl`: JSON Lines, one event per line with `id` and the members of `AuditEventAttributes`. The export itself is recorded first, as `audit-log.export` (`data`: the format and the filters given); when that fails, nothing is sent (500). A failure once the file has begun cuts the connection off, so a broken download never looks complete. `HEAD` is 405 (`Allow: GET`): every answer records an export. Needs the `admin.roles` permission." operationId: AuditExport_export parameters: - name: format required: true in: query description: "`csv` or `jsonl`." schema: type: string enum: - csv - jsonl - name: filter[subject] required: false in: query description: "Only events about this subject: `` (e.g. `role`) or `/` (e.g. `role/author`, `module/en/battery-charging`)." schema: type: string maxLength: 600 pattern: ^[^/]+(?:\/.+)?$ - name: filter[actor] required: false in: query description: "Only events by this actor: `` (`user` or `service`) or `/` (e.g. `user/sample-author`)." schema: type: string maxLength: 600 pattern: ^[^/]+(?:\/.+)?$ - name: filter[action] required: false in: query description: Only this action, e.g. `role.assign`. schema: type: string maxLength: 100 pattern: ^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+$ - name: filter[from] required: false in: query description: "Only events at or after this time: ISO 8601 with an offset, e.g. `2026-01-01T00:00:00Z`." schema: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - name: filter[to] required: false in: query description: "Only events before this time (exclusive): ISO 8601 with an offset, e.g. `2026-02-01T00:00:00Z`." schema: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: The file. content: text/csv: schema: type: string application/jsonl: schema: type: string "400": description: "`invalid-parameter`: no or an unknown `format`, or a malformed filter; `unsupported-parameter` for any other query parameter. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Export audit events tags: - audit x-required-permission: admin.roles /audit-events: get: description: "The append-only audit log, newest first: who changed what, when, and why. `GET /audit-events/export` downloads every event the same filters select. Needs the `admin.roles` permission." operationId: AuditEvents_list parameters: - name: filter[subject] required: false in: query description: "Only events about this subject: `` (e.g. `role`) or `/` (e.g. `role/author`, `module/en/battery-charging`)." schema: type: string maxLength: 600 pattern: ^[^/]+(?:\/.+)?$ - name: filter[actor] required: false in: query description: "Only events by this actor: `` (`user` or `service`) or `/` (e.g. `user/sample-author`)." schema: type: string maxLength: 600 pattern: ^[^/]+(?:\/.+)?$ - name: filter[action] required: false in: query description: Only this action, e.g. `role.assign`. schema: type: string maxLength: 100 pattern: ^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+$ - name: filter[from] required: false in: query description: "Only events at or after this time: ISO 8601 with an offset, e.g. `2026-01-01T00:00:00Z`." schema: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - name: filter[to] required: false in: query description: "Only events before this time (exclusive): ISO 8601 with an offset, e.g. `2026-02-01T00:00:00Z`." schema: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/AuditEventPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List audit events tags: - audit x-required-permission: admin.roles /backup-settings: get: description: "The settings in force: what the page set, with what the backup service’s environment fixes in its place (`meta.fixed`), the next three runs, whether the backup service runs, and the key by fingerprint. Never the S3 secret key nor the key’s identity. Needs `admin.backups` (403 `forbidden` otherwise)." operationId: Backups_settings parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/BackupSettingsDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.backups` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Backup settings tags: - backups x-required-permission: admin.backups patch: description: "What is left out stays; `location` is given whole (an S3 location’s secret key is write-only: a value sets it, null removes it, left out keeps it). A change applies at the backup service’s next pass, without a restart. Recorded as `backup-settings.update` with the old and new values (the S3 secret key only as `set`, `replaced` or `removed`). Needs `admin.backups` (403 `forbidden` otherwise)." operationId: Backups_update parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/UpdateBackupSettingsDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/BackupSettingsDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.backups` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`backup-setting-fixed-by-environment`: a variable of the backup service fixes that setting (`meta.setting`, `meta.variable`). `secret-key-missing`: the instance has no secret key to seal the S3 secret key with." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "One error per problem: `backup-path-outside-volume` (a subfolder that is absolute, holds `..` or a name outside letters, digits, `.`, `_`, `-`), `invalid-schedule`, `invalid-time-zone`, `invalid-endpoint`, `invalid-bucket`, `invalid-prefix`; several at once as `invalid-backup-settings`. `secret-required`: another endpoint, bucket or access key without the secret key again. `backup-identity-missing`: verifying by decrypting needs a key whose identity the server keeps (rotate the key)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long; nothing of it was written." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Change the backup settings tags: - backups x-required-permission: admin.backups /backup-keys: get: description: Every backup key, newest first, by fingerprint (a backup names the key it was encrypted to). Never an identity. Needs `admin.backups` (403 `forbidden` otherwise). operationId: Backups_keys parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/BackupKeyPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.backups` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Backup keys tags: - backups x-required-permission: admin.backups post: description: "Makes the backup key (an age X25519 key) and answers its identity **once**, in `meta.identity`: without it no backup can be restored, so keep it, away from the backups. With `meta.rotate: true`, replaces the current key: later backups are encrypted to the new one, earlier ones stay readable with the old one. The server keeps the identity sealed only while `verifyByDecrypting` is on. Recorded as `backup-key.create` or `backup-key.rotate` (fingerprints only). Needs `admin.backups` (403 `forbidden` otherwise)." operationId: Backups_makeKey parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateBackupKeyDocument" responses: "201": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/MadeBackupKeyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.backups` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`backup-key-exists`: there is a key already (rotate it). `backup-setting-fixed-by-environment`: `CCMS_BACKUP_KEY_FILE` sets the key. `secret-key-missing`: no instance secret key to seal the identity with." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long; nothing of it was written." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Make or rotate the backup key tags: - backups x-required-permission: admin.backups /backup-runs: get: description: "The runs, newest first: when, size, duration, location, the key’s fingerprint, verified or failed and why. Needs `admin.backups` (403 `forbidden` otherwise)." operationId: Backups_runs parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/BackupRunPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.backups` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Backup history tags: - backups x-required-permission: admin.backups /backup-requests: post: description: "Asks the backup service to back up now (`run`) or to test the location (`test-location`: write, read back and delete a small object, reporting the exact error). It takes the request within seconds; read its result with `GET /backup-requests/{id}`. A request of the same kind still waiting is answered instead of a second. Recorded as `backup.request`. Needs `admin.backups` (403 `forbidden` otherwise)." operationId: Backups_request parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateBackupRequestDocument" responses: "202": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/BackupRequestDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.backups` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`backup-service-not-running`: no heartbeat from the backup service in the last minute. `backup-key-missing`: no key to encrypt to yet." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long; nothing of it was written." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Back up now, or test the location tags: - backups x-required-permission: admin.backups /backup-requests/{requestId}: get: description: A request and, once the backup service answered it, its result. Needs `admin.backups` (403 `forbidden` otherwise). operationId: Backups_requestOf parameters: - name: requestId required: true in: path description: The request’s ID (a UUID). schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/BackupRequestDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.backups` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: A backup request tags: - backups x-required-permission: admin.backups /backup-status: get: description: "For the admin overview: the last run, the last good one, and a warning when backups are not set up, the backup service is not running, the last run failed, or the last good backup is older than `CCMS_BACKUP_WARN_AFTER_HOURS` (default 26). Needs `admin.backups` (403 `forbidden` otherwise)." operationId: Backups_status parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/BackupStatusDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.backups` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Backup status tags: - backups x-required-permission: admin.backups /me: get: description: "The actor this request acts as: the user (signed in, #37; in demo mode, the one `X-Ccms-User` names) or the read-only service of the shared token, with its roles and effective permissions. `meta.session` when it acts through a signed-in session." operationId: Access_me parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ActorDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Who is calling tags: - access /users: get: description: Users by ID, deactivated ones included, with their email address and the roles assigned to them. Needs `admin.roles`. operationId: Access_users parameters: - name: filter[role] required: false in: query description: Only holders of this role (its ID). schema: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ - name: filter[status] required: false in: query description: "`active` or `deactivated`; left out: both." schema: type: string enum: - active - deactivated - name: filter[q] required: false in: query description: Only users whose ID, name or email address contains this text, ignoring case. schema: type: string minLength: 1 maxLength: 200 - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/UserPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Users tags: - access x-required-permission: admin.roles post: description: "A person added by hand, until sign-in creates them: an ID the client chooses, a name, an email address and roles; active at once. Recorded as `user.create` (IDs only) and `role.assign` per role. Changes apply at once (from the next request of whoever they concern) and are recorded in the audit log. Needs `admin.roles`." operationId: AccessAdmin_createUserRoute parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateUserDocument" responses: "201": headers: Location: description: The new user. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/UserDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`user-exists`: the ID is taken. `email-taken`: another user has this email address." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unknown-role`: a role to give does not exist (`meta.roles`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Add a user tags: - access x-required-permission: admin.roles /demo/users: get: description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the active users `X-Ccms-User` may name, for a user switcher, to any actor with the token (without email addresses). 404 `not-found` when demo mode is off, which is how a client learns it is." operationId: Access_demoUsers parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/UserPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Users to act as (demo mode) tags: - access /health/ready: get: description: Whether this instance should receive traffic, for load balancers; needs no token. 200 when the database and the blob store answer (each within 2 seconds) and queries do not wait for a connection, a JSON:API 503 error (`database-unavailable`, `blob-store-unavailable` or `database-saturated`) otherwise. Unlike `/health`, a failing answer is no reason to restart the instance. operationId: Health_ready parameters: [] responses: "200": description: "" content: application/json: schema: $ref: "#/components/schemas/Health" "503": description: "Not ready: the database is unavailable (`database-unavailable`), the blob store is (`blob-store-unavailable`) or the database pool is exhausted (`database-saturated`). A JSON:API error with `Retry-After`; the reason stays in the log." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Readiness check tags: - health security: [] /about: get: description: The licence (AGPL-3.0-only), where this deployment’s source code is and where its user guide is, for links in a client; needs no token. operationId: About_get parameters: [] responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/AboutDocument" "400": description: A query parameter the route does not support, or a malformed one. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Licence and source code tags: - about security: [] /branding: get: description: "The product name, the logos, mark and icons (as `sha256:`, served at `GET /branding/images/{hash}`) and the colours, null where the neutral default applies; `meta.tokens` holds the theme tokens the colours give for light and dark, `meta.contrast` the contrast of every pair they make. Needs no token: the editor reads it before anyone signs in, and it holds nothing sensitive. `Cache-Control: public, no-cache` with an ETag: send it back as `If-None-Match` for a 304." operationId: Branding_read parameters: [] responses: "200": headers: ETag: description: Changes whenever the branding (or what it derives) does; send it back as `If-None-Match`. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/BrandingDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: A query parameter the route does not support, or a malformed one. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read the branding tags: - branding security: [] patch: description: "The fields given; left out stays, null is the default again (every field null: reset to the defaults). An image field names an image uploaded with `POST /branding/images` (else 422 `unknown-image`); the favicon and the app icon must be square (422 `image-not-square`, `meta.width`, `meta.height`). The primary colour is used as given on light pages, and a lighter one of the same hue is derived for dark pages; the accent tints the light sidebar. Every pair they make is checked, text at 4.5:1 and shapes at 3:1, against the theme's own surfaces: one that falls short is 422 `insufficient-contrast`, an error per pair with `meta.theme`, `meta.pair`, `meta.ratio` and `meta.required`, and nothing changes. Status and safety colours are never brandable. Applies at once; audited as `branding.update` (each field changed, from and to). Needs the `admin.branding` permission." operationId: Branding_update parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/UpdateBrandingDocument" responses: "200": headers: ETag: description: Changes whenever the branding (or what it derives) does; send it back as `If-None-Match`. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/BrandingDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.branding` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unknown-image`, `image-not-square`, `insufficient-contrast` (one error each, `source.pointer` naming the field), or the body is not a branding document." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the change waited too long for another." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Change the branding tags: - branding x-required-permission: admin.branding /branding/images: post: description: "A logo, the mark or an icon, for `PATCH /branding` to name by its `reference` (`sha256:`); it shows nowhere until then. Send it as `multipart/form-data` with one file part named `file` and nothing else, with `X-Ccms-Request`. The type comes from the bytes: PNG or WebP. SVG is refused, not sanitised (an SVG can carry scripts and references; export the logo as PNG), as is anything else: 422 `unsupported-image-type` (`meta.accepted`). At most 1048576 bytes (422 `too-large`, `meta.max`, reading stops there) and 4096 pixels a side (422 `image-too-large`), and one still picture: an animated PNG or WebP is 422 `animated-image`, and a file that is not a well-formed PNG or WebP up to its end 422 `unsupported-image-type`. At most 200 images in use or uploaded within a day (409 `too-many-uploads`): an unused one is removed a day after its upload, or at once with `DELETE /branding/images/{hash}`. Counted towards the storage limit as content files are (`CCMS_STORAGE_LIMIT_BYTES`): past it 409 `storage-limit-reached` (`meta.limit`), nothing kept, audited as `storage.upload-refused`. Recorded with a `branding.image-upload` audit event; the same image again is 200 with the first upload, and nothing new is stored or audited. Needs the `admin.branding` permission." operationId: Branding_upload parameters: - name: X-Ccms-Request in: header description: "Required (any non-empty value) with a body of type multipart/form-data: a cross-site form cannot send it. Not needed with application/vnd.api+json." required: false schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: multipart/form-data: schema: type: object required: - file properties: file: type: string format: binary responses: "200": description: "This image was uploaded before: the first upload, unchanged." content: application/vnd.api+json: schema: $ref: "#/components/schemas/BrandingImageDocument" "201": description: Uploaded. content: application/vnd.api+json: schema: $ref: "#/components/schemas/BrandingImageDocument" "400": description: "`invalid-body`: not one file part named `file` and nothing else, or the form is malformed or cut off. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.branding` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`too-many-uploads`: 200 images are in use or were uploaded within a day (`meta.max`); `storage-limit-reached`: the installation's storage limit (`meta.limit`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "415": description: "`unsupported-media-type`: not `multipart/form-data`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unsupported-image-type` (`meta.accepted`), `animated-image`, `too-large` (`meta.max`), `image-too-large` (`meta.maxSide`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`blob-store-unavailable`, `database-timeout`, or `upload-interrupted`: the same file was removed while it was recorded (upload again); `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Upload a branding image tags: - branding x-required-permission: admin.branding get: description: "The images uploaded for the branding, last uploaded first, each with the fields naming it now (`meta.usedIn`; none: unused, removed a day after its upload, or at once with `DELETE /branding/images/{hash}`). Needs the `admin.branding` permission." operationId: Branding_list parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/BrandingImagePageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.branding` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List the branding images tags: - branding x-required-permission: admin.branding /branding/images/{hash}: delete: description: "Deletes an image uploaded for the branding that no field names, however recent: its record and its file, unless a change set holds an upload of the same bytes, content refers to them (a module or page design at any branch or tag, an open change set, a working copy), or they are an import's bundle or a release's file; then the file stays. Audited as `branding.image-delete` (`fileKept`). One a field names is 409 `branding-image-in-use` (`meta.usedIn`). An unused image is also removed on its own a day after its upload. Needs the `admin.branding` permission." operationId: Branding_remove parameters: - name: hash required: true in: path description: SHA-256 of the image, 64 lowercase hex characters. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Deleted. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.branding` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no image with this hash was uploaded for the branding (or the hash is not 64 lowercase hex characters)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`branding-image-in-use`: a field names it (`meta.usedIn`, the fields)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`branding-image-busy` (another deletion of the same file is under way), `blob-store-unavailable`, `database-timeout`, `too-many-change-sets`; nothing was deleted. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Delete an unused branding image tags: - branding x-required-permission: admin.branding get: description: "An image a field of the branding names now, for anyone (the logo shows on the sign-in page); any other hash is 404, also one uploaded but not in use, and never a content image. PNG or WebP as recorded at upload, with `X-Content-Type-Options: nosniff`, a sandboxing `Content-Security-Policy` and `Cache-Control: public, no-cache` with the hash as ETag (304 on `If-None-Match` while the branding still uses it): the bytes of a hash never change, but whether it is served does, so a removed logo is not kept by caches." operationId: Branding_image parameters: - name: hash required: true in: path description: SHA-256 of the image, 64 hex characters. schema: type: string pattern: ^[a-f0-9]{64}$ responses: "200": description: The image. content: image/png: schema: type: string format: binary image/webp: schema: type: string format: binary "304": description: The `If-None-Match` ETag (the hash) and the image still in use. "400": description: Not a SHA-256 hash. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: the branding uses no image with this hash." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`blob-store-unavailable`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a branding image tags: - branding security: [] /assets: get: description: "The files a module the reader may see shows as an image or attaches at `?ref=`, each with its type, size, dimensions (images) and file name (attachments) and, in `meta.usedIn`, the modules the reader may see that use it (`meta.usedAs`: how). `filter[q]` finds files by their alt text, title, attachment name, description and file name and the modules using them. Ordered by the ID of the first such module; with `filter[changeSet]`, the files uploaded into that change set come first (last uploaded first). Content outside the reader’s scope is never listed nor counted: an image only such modules show is not there, and `meta.page.total` counts only what is listed. The ETag is a hash of the answer (uploads and the blob store change it too), so it is never `immutable`." operationId: AssetList_list parameters: - name: filter[q] required: false in: query description: "Only files this text is found in, 1 to 200 characters after trimming (empty: 400): the alt text or title of an image block showing it, the name, description or file name of an attachment block attaching it, or the title or ID of a module showing it, as one piece of text (case and diacritics do not matter); or the file name of its upload into the change set of `filter[changeSet]`; a whole SHA-256 also finds the file of that hash. Only modules the reader may see are searched, so a file is never found through one outside their scope." schema: type: string minLength: 1 maxLength: 200 - name: filter[type] required: false in: query description: "Only files of this type: a top-level type (`image`: every image), a media type (`image/png`: only PNGs), or `attachment`: the files an attachment block the reader may see attaches, and uploads into the change set of `filter[changeSet]` of a type no image or font upload has (decided by the blocks and uploads, so it also lists a missing file); `font` (or `font/ttf`, …): the fonts the page designs at `?ref=` name and those uploaded into the change set of `filter[changeSet]`, each with `attributes.font` (its family, style, copyright and licence). Lowercase. A missing file (`meta.missing`) has no type, so a media type filter never matches it." schema: type: string pattern: ^[a-z0-9][a-z0-9!#$&^_.+-]{0,62}(\/[a-z0-9][a-z0-9!#$&^_.+-]{0,62})?$ - name: filter[changeSet] required: false in: query description: "A change set of the reader’s own (its ID): its uploaded images are listed too, first, also before a module refers to them. Read at its branch with `?ref=change-sets/` to see what its modules show. Only its author: 403 for another reader of drafts, 404 `not-found` for anyone else and for an ID that names no change set (as for an unknown ref)." schema: type: string minLength: 1 maxLength: 64 - name: filter[lang] required: false in: query description: "Only files a module in this language (that the reader may see) uses: an image block shows it or an attachment block attaches it there. `meta.languages` names every language using a file." schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ - name: filter[unused] required: false in: query description: "`true`: instead, the files nobody uses, to tidy up: uploads into any change set and files in the blob store that no module file refers to at `main`, any other branch that is not a change set’s, any tag, the head of any open change set or any working copy, last uploaded or stored more than 24 hours ago (renditions aside), last uploaded first. Each can be deleted (`DELETE /assets/{hash}`). `filter[q]` then matches the upload’s file name, `filter[type]` works as otherwise, `filter[changeSet]` keeps that change set’s uploads, `filter[lang]` finds nothing (an unused file has no language). Needs `content.read.draft` and `content.edit`, each in a role whose scope restricts nothing (403 otherwise). `false`: as if left out." schema: type: string enum: - "true" - "false" - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/AssetPageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: `filter[changeSet]` names another author’s change set (to a reader of drafts); `filter[unused]=true` without `content.read.draft` and `content.edit`, each in a role whose scope restricts nothing. `forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List images and attachments tags: - assets x-required-permission: content.read /assets/{hash}: delete: description: 'Deletes a file nobody uses, with its renditions and its upload records, from the blob store, recorded with an `asset.delete` audit event. Unused, checked again right before deleting: no module file refers to it at `main`, any other branch that is not a change set’s, any tag, the head of any open change set, or any working copy, and it is not an import’s uploaded bundle while that import is kept, nor an image uploaded for the branding, nor an archived release PDF (a `done` release output’s file) no upload records; its last upload (into any change set) or its storing is more than 24 hours ago; and it is not itself a rendition. Otherwise 409 `asset-in-use` with `meta.usedIn`: the places (`{ in: "main" | "release", ref }`, or `{ in: "branch" | "change-set" | "working-copy" | "import" | "branding" | "release-output" | "recent-upload" | "rendition" }`, at most 50), and `meta.deletableAt` for a recent upload. Deleting the uploads of an archived release PDF’s bytes keeps the file; the audit event says so (`fileKept: true`). The same rules hold for attachments. Needs `content.read.draft` and `content.edit`, each in a role whose scope restricts nothing (403 otherwise).' operationId: AssetDelete_remove parameters: - name: hash required: true in: path description: SHA-256 of the file, 64 lowercase hex characters. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Deleted. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: the actor lacks the `content.edit` permission. `forbidden`: not both `content.read.draft` and `content.edit`, each in a role whose scope restricts nothing. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: neither the blob store nor an upload record holds the file (or the hash is not 64 lowercase hex characters)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`asset-in-use`: used somewhere, uploaded or stored within 24 hours, or a rendition (`meta.usedIn`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Delete an unused file tags: - assets x-required-permission: content.edit /change-sets/{changeSetId}/assets: post: description: "Stores the file in the blob store under its SHA-256 and answers with `reference` (`sha256:`), for an image or attachment block's `asset` in a module's working copy; nothing is committed to Git (the module commits the reference at a save point). Send it as `multipart/form-data` with one file part named `file` and nothing else; its file name is kept (made a valid file name: `fileName`). The part's `Content-Type` is ignored. **An image** (`kind=image`, the default) is recognised from the bytes: PNG or JPEG; SVG and anything else is 422 `unsupported-image-type`; at most `CCMS_MAX_UPLOAD_BYTES` (default 10 MiB). **An attachment** (`kind=attachment`) may be any type: its media type is decided from the bytes and the file name's extension (bytes showing HTML, SVG, an executable or a script win over any name); dangerous types (HTML, SVG, executables, installers, scripts) and what the `CCMS_ATTACHMENT_TYPES_*` settings refuse are 422 `unsupported-attachment-type` (`meta.contentType`, `meta.extension`, `meta.reason`); at most `CCMS_MAX_ATTACHMENT_BYTES` (default 50 MiB). **A font** (`kind=font`, for a page design's `fonts`) is recognised from its structure, never its name: a TrueType or OpenType font (`font/ttf`, `font/otf`), WOFF or WOFF2 (`font/woff`, `font/woff2`) whose tables are all within the file and which has a family name; a collection or anything else is 422 `unsupported-font-type` (`meta.accepted`, `meta.reason`: `not-a-font` or `malformed`); at most `CCMS_MAX_FONT_BYTES` (default 10 MiB) and 100 fonts per change set. A larger file is 422 `too-large` (`meta.max`), and reading stops there. Only the change set's author, while it is a draft (409 `invalid-state` otherwise, as for locks and saves), and at most 1,000 files per change set (409 `too-many-uploads`); with a storage limit set (`CCMS_STORAGE_LIMIT_BYTES`), a file that would take the installation past it is 409 `storage-limit-reached` (`meta.limit`), nothing is stored and the refusal is audited (`storage.upload-refused`): 403 for anyone else who holds `content.read.draft`, 404 for anyone who does not. Recorded with an `asset.upload` audit event. The same file again is 200 with the first upload, and nothing new is stored or audited. Needs the `content.edit` permission." operationId: ChangeSetAssets_upload parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: kind required: false in: query description: "`image` (default): a PNG or JPEG for an image block. `attachment`: a file of any type the settings take, for an attachment block. `font`: a TrueType, OpenType, WOFF or WOFF2 font for a page design." schema: type: string enum: - image - attachment - font - name: X-Ccms-Request in: header description: "Required (any non-empty value) with a body of type multipart/form-data: a cross-site form cannot send it. Not needed with application/vnd.api+json." required: false schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: multipart/form-data: schema: type: object required: - file properties: file: type: string format: binary responses: "200": description: "The change set holds this image already: the first upload, unchanged." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ChangeSetAssetDocument" "201": description: Uploaded. headers: Location: description: Where its author previews it. schema: type: string content: application/vnd.api+json: schema: $ref: "#/components/schemas/ChangeSetAssetDocument" "400": description: "`invalid-body`: not one file part named `file` and nothing else, or the form is malformed or cut off. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID (or another author’s, for an actor without `content.read.draft`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state`: the change set is not a draft; `meta.state` says what it is. `too-many-uploads`: it holds 1,000 files already, or 100 fonts for a font (`meta.max`), refused before reading (an image it holds already too: its author has the reference). `storage-limit-reached`: the upload would take the installation past its storage limit (`meta.limit` in bytes); refused before reading once the limit is reached, and nothing is stored." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "415": description: "`unsupported-media-type`: not `multipart/form-data`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unsupported-image-type`: an image neither PNG nor JPEG (`meta.accepted`); `unsupported-font-type`: a font that is no well-formed TrueType, OpenType, WOFF or WOFF2 font (`meta.accepted`, `meta.reason`); `unsupported-attachment-type`: an attachment of a type the settings refuse (`meta.contentType`, `meta.extension`, `meta.reason`: `dangerous`, `denied` or `not-allowed`); `too-large`: more than `CCMS_MAX_UPLOAD_BYTES` for an image, `CCMS_MAX_ATTACHMENT_BYTES` for an attachment, `CCMS_MAX_FONT_BYTES` for a font (`meta.max`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`blob-store-unavailable`: the blob store does not answer; `database-timeout`: the transaction waited too long; `upload-interrupted`: the image was removed while it was recorded (another refused upload of it cleaned up). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Upload an image, an attachment or a font into a change set tags: - assets x-required-permission: content.edit /change-sets/{changeSetId}/assets/{hash}: get: description: "An image or an attachment uploaded into this change set, for its author to see before a module refers to it (`GET /assets/{hash}` serves it only once a module the reader may see refers to it). PNG and JPEG are shown in place; any other type is sent as `Content-Disposition: attachment` under the upload's file name (else the hash). Only to the change set's author, as their working copies are: 403 for anyone else who holds `content.read.draft`, 404 for anyone who does not. Any hash not uploaded into this change set is 404. Streamed as `GET /assets/{hash}` does (stored type, `nosniff`, a sandboxing `Content-Security-Policy`), `Cache-Control: private, no-cache`. Needs the `content.read` permission." operationId: ChangeSetAssets_preview parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: hash required: true in: path description: SHA-256 of the file, 64 lowercase hex characters. schema: type: string - name: width required: false in: query description: "A rendition instead of the file: a WebP at most this many pixels wide (320, 640, 1280), never upscaled. Only for PNG, JPEG, GIF and WebP images." schema: type: integer enum: - 320 - 640 - 1280 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "The file, with its stored type: an image in place, anything else as a download; with `width`, its WebP rendition." content: image/png: schema: type: string format: binary image/jpeg: schema: type: string format: binary image/webp: schema: type: string format: binary application/octet-stream: schema: type: string format: binary "400": description: "`unsupported-parameter`: a query other than `width`; `invalid-parameter`: a width other than 320, 640 or 1280, or one asked of a file that has no renditions. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no such change set (as for the upload), or no such file uploaded into it." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Preview an image or a file uploaded into a change set tags: - assets x-required-permission: content.read /settings: get: description: "The installation’s own settings, kept in the database and changed at once: not the project configuration (`GET /config`), which changes in a change set. `selfApproval` says who may approve their own change set; the review screen reads it from a change set’s `meta.review.selfApproval`. Needs the `admin.roles` permission." operationId: Settings_read parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/InstallationSettingsDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read the installation settings tags: - settings x-required-permission: admin.roles patch: description: What is left out stays. Applies at once. A changed `selfApproval` is audited as `settings.self-approval` (`from`, `to`); approvals already given stay, whatever it changes to (the rule is read when an approval is given). A change that changes nothing records nothing. Needs the `admin.roles` permission. operationId: Settings_update parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/UpdateInstallationSettingsDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/InstallationSettingsDocument" "400": description: "The body is not an installation settings document (an unknown setting or value). Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the change waited too long for another." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Change the installation settings tags: - settings x-required-permission: admin.roles /config/usages: get: description: One `ConfigUsage` per value the configuration at `?ref=` defines (languages, module types, audiences, facets and their values, variant attributes and their values, text attributes, safety symbols), in the configuration’s order, with the modules (by ID) and manuals that name it in `meta`. Counted on what the reader may see; unreadable files are left out. For the project settings (“used by 3 modules”); the usage check that refuses removing a value in use reads past the reader’s scope (`config-in-use`, see the configuration’s working copy). operationId: Project_usages parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ConfigUsagePageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: How much content uses each configured value tags: - project x-required-permission: content.read /module-summaries: get: description: "The modules the reader may see, one per module ID with the languages it exists in, ordered by title. For a content browser: filters run on the server, before paging, and `meta.changed` says whether a module differs from the released branch (`main`), as the reader sees that (a language deleted on the branch alone does not count; a module outside what the reader sees on `main` counts as changed). Module files that cannot be read are left out (`GET /modules` lists them)." operationId: ModuleSummaries_list parameters: - name: filter[lang] required: false in: query description: Only modules that exist in this language; titles in it, and `filter[keyword]` matched in it. schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ - name: filter[type] required: false in: query description: Only modules of this module type. schema: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ - name: filter[audience] required: false in: query description: "Only modules that count as this audience level: their own, or the last, most restricted level for a module naming none, as manuals and the access check place it. A level the configuration does not list matches nothing, and a module naming such a level matches no level." schema: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ - name: filter[facet] required: false in: query description: "Only modules with this facet value, as `:` (e.g. `region:north`). Repeat it for several, at most 32: a module has to have every one." schema: anyOf: - type: string - type: array items: type: string style: form explode: true - name: filter[keyword] required: false in: query description: "Only modules with this keyword, case and diacritics aside (`Wärme` is `warme`); 1 to 64 characters, no comma. Repeat it for several, at most 32: a module has to have every one." schema: anyOf: - type: string - type: array items: type: string style: form explode: true - name: filter[changed] required: false in: query description: "`true`: only modules that differ from the released branch (`main`); `false`: only those that do not." schema: type: string enum: - "true" - "false" - name: filter[q] required: false in: query description: Only modules whose title (in any language) or ID contains this text, case aside; 1 to 200 characters after trimming. schema: type: string minLength: 1 maxLength: 200 - name: filter[snippet] required: false in: query description: "`true`: only snippets, the modules of a type the configuration marks `snippet: true`; `false`: only the others." schema: type: string enum: - "true" - "false" - name: filter[deprecated] required: false in: query description: "`true`: only deprecated modules (`attributes.deprecated`, #266); `false`: only the others. A content browser hides deprecated modules with `false`. Not applied to deleted modules (`filter[status]`), listed either way." schema: type: string enum: - "true" - "false" - name: filter[status] required: false in: query description: "`current` (the default): the modules there; `deleted`: the modules deleted on the ref's first-parent line (among its newest 1000 commits) that the reader sees no file of now, each summarised from the last versions of its deleted files that the reader may see (`meta.deleted`; a module outside their scope is never listed). Without `content.read.draft`, only the deleted files whose last version released content (`main`’s head, a release tag) holds exactly, each from that file as the reader reads it there. `any`: both, in one list. Every other filter but `filter[deprecated]` applies to a deleted module's last versions." schema: type: string enum: - current - deleted - any - name: filter[id] required: false in: query description: "Only the modules of these IDs, comma-separated (`a,b,c`), 1 to 200: a screen reads the summaries of the modules it shows (a manual's outline) instead of the whole list. An ID that names no module the reader sees is left out, like any module that does not match." schema: type: string maxLength: 20200 - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ModuleSummaryPageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List module summaries tags: - modules x-required-permission: content.read /change-sets: get: description: "Change sets, newest first: every one for a holder of the `content.read.draft` permission, only the caller's own for anyone else (authors always see their own work; another author's filter then lists nothing). Each says in `meta.branchMissing` whether its branch is gone from the content repository. `meta.counts` counts the change sets of each state the other filters leave, as the reader sees them, for a list's state filters." operationId: ChangeSets_list parameters: - name: filter[state] required: false in: query description: "Only change sets in this state: `draft`, `in-review`, `approved`, `merged` or `abandoned`." schema: type: string enum: - draft - in-review - approved - merged - abandoned - name: filter[author] required: false in: query description: Only change sets started by this user (or service) ID. schema: type: string minLength: 1 maxLength: 200 - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ChangeSetPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List change sets tags: - change-sets post: description: "Creates the change set’s own branch (`change-sets/`, named by the server) at the base branch’s current commit, then records the change set and a `change-set.create` audit event. With `maintenanceLine` (a maintenance line’s ID) the base is the line’s branch: fixes to an older product revision, merged into it and released from it. Needs the `content.edit` permission." operationId: ChangeSets_create parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateChangeSetDocument" responses: "201": headers: Location: description: The new change set. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ChangeSetDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: '`invalid-state`: the maintenance line is closed (`meta.state: "closed"`): no new change sets start on it.' content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-base`: `baseRef` (or, without it, the server’s default ref) names no branch, or a change set’s; `maintenanceLine` names no line; or both are given." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Start a change set tags: - change-sets x-required-permission: content.edit /change-sets/{changeSetId}: get: description: "Any change set for a holder of the `content.read.draft` permission, only the caller's own for anyone else: another author's change set is then 404, exactly like one that does not exist. `meta.branchMissing` says whether its branch is gone from the content repository (reads at it then answer 404 `change-set-branch-missing`); it is never recreated. `meta.behind`, for an open one, counts the commits its base branch has that its branch does not." operationId: ChangeSets_get parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ChangeSetDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a change set tags: - change-sets patch: description: "Sets an open change set’s `title` or `description` (`null` clears it) and records a `change-set.edit` audit event with the old and new values; a value that is the same changes nothing and is not audited. Nothing else changes this way (any other member is 400 `invalid-body`). Only its author: 403 for anyone else who holds `content.read.draft`, and 404, exactly like a missing change set, for anyone who does not. Needs the `content.edit` permission." operationId: ChangeSets_edit parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/EditChangeSetDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ChangeSetDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state`: the change set is no longer open (merged or abandoned); `meta.state` says which. `id-mismatch`: the resource object names another change set than the path." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Rename a change set tags: - change-sets x-required-permission: content.edit /change-sets/{changeSetId}/changes: get: description: "The modules and manuals that differ between the change set’s base commit and its head (the review head once submitted, else its branch’s head), each with what differs: its metadata fields and, for a module, its blocks by block ID (`added`, `changed`, `removed`; unchanged blocks are not listed). Derived from Git, never stored. Each side is read as the reader may read that commit, and shows only what they would also see on the other: a module or manual they may not see there is not there, exactly like a missing one, and one they see on neither side is neither listed nor counted. Other files (the configuration, templates, images) are not listed. The change set is found as `GET /change-sets/{changeSetId}` finds it; its author reads its base as released content when it started from released content. Needs the `content.read` permission." operationId: ChangeSets_changes parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ChangeSetChangePageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or a commit of it the reader may not open." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`branch-missing`: the change set’s branch is gone." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`too-many-changes`: more than 10000 files differ; `invalid-content`: the configuration at a side cannot be read." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List what a change set changes tags: - change-sets x-required-permission: content.read /change-sets/{changeSetId}/abandon: post: description: "Marks an open change set `abandoned` and records a `change-set.abandon` audit event. Nothing is deleted in Git: its branch stays readable. Only its author may abandon it: 403 for anyone else who holds `content.read.draft`, and 404, exactly like a missing change set, for anyone who does not. One exception: an admin (`admin.roles`, holding `content.read.draft`) may abandon another author’s change set whose branch is gone from the content repository (`meta.branchMissing`; the event then has `data.branchMissing`). Needs the `content.edit` permission." operationId: ChangeSets_abandon parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/AbandonChangeSetDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ChangeSetDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state`: the change set is no longer open (merged or abandoned); `meta.state` says which." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Abandon a change set tags: - change-sets x-required-permission: content.edit /locks: get: description: Who holds which module or manual, for which change set; newest first. Only locks whose subject, as committed on its change set's branch, lies within the reader's `content.read.draft` scope are listed (and counted); a subject with nothing committed only for a reader of all of its language (a module) or manuals of every audience. Without `content.read.draft`, only the caller's own locks, within their `content.read` scope (authors always see their own work). operationId: Locks_list parameters: - name: filter[holder] required: false in: query description: Only locks held by this user (or service) ID. schema: type: string minLength: 1 maxLength: 200 - name: filter[changeSet] required: false in: query description: Only locks of this change set (its ID). schema: type: string format: uuid pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$ - name: filter[subject] required: false in: query description: "Only the lock on this subject: `module//`, `manual/`, `config` or `term/`, e.g. `module/en/battery-charging`." schema: type: string maxLength: 300 - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/LockPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List locks tags: - locks /locks/{lockId}: get: description: "A lock the reader may not know of (as for the list: outside their scope, or, without `content.read.draft`, another holder's) is 404, exactly like a lock that does not exist." operationId: Locks_get parameters: - name: lockId required: true in: path description: The lock’s ID (a UUID). One that names no lock, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/LockDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no lock with this ID (released or broken, or never taken), or one the actor may not know of (outside their `content.read.draft` scope), answered exactly alike." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a lock tags: - locks delete: description: "Removes the lock, recorded with a `lock.release` audit event. Only its holder may release it (an admin may break it): 403 for anyone else who may read it, and 404, exactly like a missing lock, for anyone who may not (no `content.read.draft`, or the lock outside its scope). With `ifUnchanged=true`, only while the lock’s change set has no changes to its subject (no working copy of it, no commit changing it since its base): else 409 `has-changes` and the lock stays. The editor frees a module so from another of the holder’s change sets. Needs the `content.edit` permission." operationId: Locks_release parameters: - name: lockId required: true in: path description: The lock’s ID (a UUID). One that names no lock, malformed or not, is 404. schema: type: string format: uuid - name: ifUnchanged required: false in: query description: "`true`: release only while the lock’s change set has no changes to its subject (409 `has-changes` otherwise). Default `false`." schema: type: string enum: - "true" - "false" - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Released. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no lock with this ID (released or broken, or never taken), or one the actor may not know of (outside their `content.read.draft` scope), answered exactly alike." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`has-changes` (with `ifUnchanged=true`): the lock’s change set has a working copy of its subject, or a commit changing it since its base (`meta.changeSetId`); the lock stays." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Release a lock tags: - locks x-required-permission: content.edit /change-sets/{changeSetId}/locks: post: description: "Takes the lock on the subject for the change set, recorded with a `lock.acquire` audit event: 201 with the new lock. A subject the change set holds already is answered 200 with its lock (nothing changes). Only the change set’s author takes locks for it (403; for an actor without `content.read.draft` another author’s change set is 404, exactly like a missing one), only while it is a draft. The subject, as committed on the change set’s branch, must lie within a role holding `content.edit` and be one the actor reads; a subject with nothing committed only for an actor who edits and reads all of its language (a module) or manuals of every audience. Else 403, one answer whatever the reason. Needs the `content.edit` permission." operationId: Locks_acquire parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/AcquireLockDocument" responses: "200": description: The change set held the lock already. content: application/vnd.api+json: schema: $ref: "#/components/schemas/LockDocument" "201": description: The lock taken. headers: Location: description: The new lock. schema: type: string content: application/vnd.api+json: schema: $ref: "#/components/schemas/LockDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID (or, for an actor without `content.read.draft`, another author’s)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`locked`: another change set holds the subject; for an actor who may read that lock (`GET /locks` lists it to them), `meta` names the lock (`lockId`), its `holder`, `changeSetId` and `since`, and, while that change set is there, its `changeSetTitle`, `changeSetState` and `hasChanges`: whether it has changes to the subject (a working copy, or a commit changing it since its base), so its holder can tell whether `DELETE /locks/{lockId}?ifUnchanged=true` would free it (anyone else gets no `meta`). `invalid-state`: the change set is no draft (`meta.state`). `too-many-locks`: the holder holds the most locks one may (`meta.max`). `lock-contended`: the subject was locked and released again while trying, more than once; try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Lock a module or manual for a change set tags: - locks x-required-permission: content.edit /locks/{lockId}/break: post: description: An admin removes a lock held by someone else, with a required comment, recorded with a `lock.break` audit event naming the holder. Needs the `admin.roles` permission. operationId: Locks_break parameters: - name: lockId required: true in: path description: The lock’s ID (a UUID). One that names no lock, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/BreakLockDocument" responses: "204": description: Broken. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no lock with this ID (released or broken, or never taken), or one the actor may not know of (outside their `content.read.draft` scope), answered exactly alike." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Break someone’s lock tags: - locks x-required-permission: admin.roles /locks/break: post: description: "An admin removes every lock of one change set (`meta.changeSet`) or one holder (`meta.holder`: exactly one of the two), with a required comment, in one transaction: a holder who left, or lost `content.edit`, cannot release. Each lock gets its own `lock.break` audit event (the comment, the holder, `data.bulk`). Answers with `meta.count`, which may be 0. A holder holds at most 1,000 locks, so a call breaks at most that many. A lock taken after the call is a new one and stays. Needs the `admin.roles` permission." operationId: Locks_breakAll parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/BreakLocksDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/BreakLocksResultDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Break all locks of a change set or a holder tags: - locks x-required-permission: admin.roles /change-sets/{changeSetId}/modules/{lang}/{moduleId}/working-copy: put: description: "Autosave: stores the editor’s content as the change set’s working copy (Postgres), without a commit and without an audit event; a save point commits it later. The shape is checked (400 otherwise); validation issues come back in `meta.issues` without refusing it, since a draft may be incomplete. Send `meta.version`: the version last read or saved (0 for none yet); the answer has the next one. Send `meta.baseCommit`: the commit the content is based on. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). Needs the change set to be a draft holding the subject’s lock, and the `content.edit` permission covering the content (and the committed file)." operationId: WorkingCopies_saveModule parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: lang required: true in: path description: A language with subtags of 2 to 8 characters (`en`, `pt-BR`); any case. One that is not is 404. schema: example: en type: string - name: moduleId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: battery-charging - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/SaveModuleWorkingCopyDocument" responses: "200": description: Saved, at its new version. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ModuleWorkingCopyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or neither a working copy nor a committed file the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`lock-required`: the change set does not hold the subject’s lock. `version-conflict`: the working copy is at another version (`meta.version`; read it again). `stale-working-copy`: the file changed on the branch since `meta.baseCommit` (`meta.head`). `invalid-state`: the change set is no draft (`meta.state`). `asset-deleted`: a file it names is being deleted as unused (`meta.assets`; upload it again; once deleted it is 422 `unknown-asset`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`subject-mismatch`: the content names another module or manual than the path. `table-too-large` (a module, or a page design’s regions): a table has more than 1,000 columns or 50,000 cells (rows × columns), or the tables of a module or of a design’s regions more than 1,000,000 cells together; one error per such table (or one at `blocks` or `regions` for the total), `source.pointer` at it, `meta.columns`, `meta.cells` and `meta.totalCells` the caps. `too-large`: more than `meta.max` bytes of JSON. `too-many-files`: a module names more than `meta.max` different images and attachments. `unknown-asset`: an image or attachment block names a file you may not use (`meta.assets`): only one a module you may see on the change set’s branch or at its base uses, or one uploaded into a change set of yours, is taken; any other is refused alike, whether or not it is stored. `translation-record-protected`: a page design’s or manual’s `translations` changed in a language whose translation you do not manage (`translation.manage`; `meta.languages`): keep it as the branch or the change set’s base has it." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Save a module’s working copy tags: - working copies x-required-permission: content.edit get: description: The change set’s working copy, else the file committed on its branch (`version` 0, `meta.saved` false), with its validation issues. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). What lies outside the reader’s scope (their `content.read.draft` roles; for an author without that permission, their `content.read` roles) is not found. Reads with `?ref=` on the branch keep showing the committed file. Needs the `content.read` permission. operationId: WorkingCopies_getModule parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: lang required: true in: path description: A language with subtags of 2 to 8 characters (`en`, `pt-BR`); any case. One that is not is 404. schema: example: en type: string - name: moduleId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: battery-charging - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ModuleWorkingCopyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or neither a working copy nor a committed file the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a module’s working copy tags: - working copies x-required-permission: content.read delete: description: Throws the working copy away; the committed file stays as it is. No lock needed. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). Needs the `content.edit` permission. operationId: WorkingCopies_discardModule parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: lang required: true in: path description: A language with subtags of 2 to 8 characters (`en`, `pt-BR`); any case. One that is not is 404. schema: example: en type: string - name: moduleId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: battery-charging - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Discarded. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or no working copy." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Discard a module’s working copy tags: - working copies x-required-permission: content.edit /change-sets/{changeSetId}/manuals/{manualId}/working-copy: put: description: "Autosave: stores the editor’s content as the change set’s working copy (Postgres), without a commit and without an audit event; a save point commits it later. The shape is checked (400 otherwise); validation issues come back in `meta.issues` without refusing it, since a draft may be incomplete. Send `meta.version`: the version last read or saved (0 for none yet); the answer has the next one. Send `meta.baseCommit`: the commit the content is based on. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). Needs the change set to be a draft holding the subject’s lock, and the `content.edit` permission covering the content (and the committed file). A manual whose committed manifest names modules the author may not see is refused (403)." operationId: WorkingCopies_saveManual parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: manualId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: operating - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/SaveManualWorkingCopyDocument" responses: "200": description: Saved, at its new version. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ManualWorkingCopyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or neither a working copy nor a committed file the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`lock-required`: the change set does not hold the subject’s lock. `version-conflict`: the working copy is at another version (`meta.version`; read it again). `stale-working-copy`: the file changed on the branch since `meta.baseCommit` (`meta.head`). `invalid-state`: the change set is no draft (`meta.state`). `asset-deleted`: a file it names is being deleted as unused (`meta.assets`; upload it again; once deleted it is 422 `unknown-asset`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`subject-mismatch`: the content names another module or manual than the path. `table-too-large` (a module, or a page design’s regions): a table has more than 1,000 columns or 50,000 cells (rows × columns), or the tables of a module or of a design’s regions more than 1,000,000 cells together; one error per such table (or one at `blocks` or `regions` for the total), `source.pointer` at it, `meta.columns`, `meta.cells` and `meta.totalCells` the caps. `too-large`: more than `meta.max` bytes of JSON. `too-many-files`: a module names more than `meta.max` different images and attachments. `unknown-asset`: an image or attachment block names a file you may not use (`meta.assets`): only one a module you may see on the change set’s branch or at its base uses, or one uploaded into a change set of yours, is taken; any other is refused alike, whether or not it is stored. `translation-record-protected`: a page design’s or manual’s `translations` changed in a language whose translation you do not manage (`translation.manage`; `meta.languages`): keep it as the branch or the change set’s base has it." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Save a manual’s working copy tags: - working copies x-required-permission: content.edit get: description: The change set’s working copy, else the file committed on its branch (`version` 0, `meta.saved` false), with its validation issues. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). What lies outside the reader’s scope (their `content.read.draft` roles; for an author without that permission, their `content.read` roles) is not found. Reads with `?ref=` on the branch keep showing the committed file. Needs the `content.read` permission. operationId: WorkingCopies_getManual parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: manualId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: operating - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ManualWorkingCopyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or neither a working copy nor a committed file the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a manual’s working copy tags: - working copies x-required-permission: content.read delete: description: Throws the working copy away; the committed file stays as it is. No lock needed. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). Needs the `content.edit` permission. operationId: WorkingCopies_discardManual parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: manualId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: operating - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Discarded. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or no working copy." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Discard a manual’s working copy tags: - working copies x-required-permission: content.edit /change-sets/{changeSetId}/config/working-copy: put: description: "Autosave: stores the editor’s content as the change set’s working copy (Postgres), without a commit and without an audit event; a save point commits it later. The shape is checked (400 otherwise); validation issues come back in `meta.issues` without refusing it, since a draft may be incomplete. Send `meta.version`: the version last read or saved (0 for none yet); the answer has the next one. Send `meta.baseCommit`: the commit the content is based on. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). Needs the change set to be a draft holding the subject’s lock, and the `content.edit` permission covering the content (and the committed file). Changing the configuration needs `content.edit` through a role whose scope restricts nothing, and `admin.roles` (403 otherwise, also for its lock). The whole configuration is sent; a change that would make content on the change set’s branch invalid (a variant attribute or value still used, a language with modules, a module type, audience, facet value, text attribute or safety symbol in use) is refused with the usages (422 `config-in-use`); archive a variant value (`archived: true`) instead of removing it. A save point checks it again." operationId: WorkingCopies_saveConfig parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/SaveConfigWorkingCopyDocument" responses: "200": description: Saved, at its new version. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ConfigWorkingCopyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or neither a working copy nor a committed file the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`lock-required`: the change set does not hold the subject’s lock. `version-conflict`: the working copy is at another version (`meta.version`; read it again). `stale-working-copy`: the file changed on the branch since `meta.baseCommit` (`meta.head`). `invalid-state`: the change set is no draft (`meta.state`). `asset-deleted`: a file it names is being deleted as unused (`meta.assets`; upload it again; once deleted it is 422 `unknown-asset`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`config-in-use`: content on the branch uses what the change removes; one error per usage (`source.pointer` the module or manual and block, `meta.subject`, `meta.issue` the validation code, `meta.at`). `too-large`: more than `meta.max` bytes of JSON." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Save the configuration’s working copy tags: - working copies x-required-permission: content.edit get: description: The change set’s working copy, else the file committed on its branch (`version` 0, `meta.saved` false), with its validation issues. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). What lies outside the reader’s scope (their `content.read.draft` roles; for an author without that permission, their `content.read` roles) is not found. Reads with `?ref=` on the branch keep showing the committed file. Needs the `content.read` permission. operationId: WorkingCopies_getConfig parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ConfigWorkingCopyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or neither a working copy nor a committed file the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read the configuration’s working copy tags: - working copies x-required-permission: content.read delete: description: Throws the working copy away; the committed file stays as it is. No lock needed. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). Needs the `content.edit` permission. operationId: WorkingCopies_discardConfig parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Discarded. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or no working copy." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Discard the configuration’s working copy tags: - working copies x-required-permission: content.edit /change-sets/{changeSetId}/terms/{termId}/working-copy: put: description: "Autosave: stores the editor’s content as the change set’s working copy (Postgres), without a commit and without an audit event; a save point commits it later. The shape is checked (400 otherwise); validation issues come back in `meta.issues` without refusing it, since a draft may be incomplete. Send `meta.version`: the version last read or saved (0 for none yet); the answer has the next one. Send `meta.baseCommit`: the commit the content is based on. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). Needs the change set to be a draft holding the subject’s lock, and the `content.edit` permission covering the content (and the committed file). A term needs `content.edit` through one role covering everything in each language it holds, as committed and as sent (its scope restricts nothing but languages)." operationId: WorkingCopies_saveTerm parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: termId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: charger - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/SaveTermWorkingCopyDocument" responses: "200": description: Saved, at its new version. content: application/vnd.api+json: schema: $ref: "#/components/schemas/TermWorkingCopyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or neither a working copy nor a committed file the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`lock-required`: the change set does not hold the subject’s lock. `version-conflict`: the working copy is at another version (`meta.version`; read it again). `stale-working-copy`: the file changed on the branch since `meta.baseCommit` (`meta.head`). `invalid-state`: the change set is no draft (`meta.state`). `asset-deleted`: a file it names is being deleted as unused (`meta.assets`; upload it again; once deleted it is 422 `unknown-asset`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`subject-mismatch`: the content names another module or manual than the path. `table-too-large` (a module, or a page design’s regions): a table has more than 1,000 columns or 50,000 cells (rows × columns), or the tables of a module or of a design’s regions more than 1,000,000 cells together; one error per such table (or one at `blocks` or `regions` for the total), `source.pointer` at it, `meta.columns`, `meta.cells` and `meta.totalCells` the caps. `too-large`: more than `meta.max` bytes of JSON. `too-many-files`: a module names more than `meta.max` different images and attachments. `unknown-asset`: an image or attachment block names a file you may not use (`meta.assets`): only one a module you may see on the change set’s branch or at its base uses, or one uploaded into a change set of yours, is taken; any other is refused alike, whether or not it is stored. `translation-record-protected`: a page design’s or manual’s `translations` changed in a language whose translation you do not manage (`translation.manage`; `meta.languages`): keep it as the branch or the change set’s base has it." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Save a term’s working copy tags: - working copies x-required-permission: content.edit get: description: The change set’s working copy, else the file committed on its branch (`version` 0, `meta.saved` false), with its validation issues. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). What lies outside the reader’s scope (their `content.read.draft` roles; for an author without that permission, their `content.read` roles) is not found. Reads with `?ref=` on the branch keep showing the committed file. Needs the `content.read` permission. A committed file that is no term reads as none. operationId: WorkingCopies_getTerm parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: termId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: charger - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TermWorkingCopyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or neither a working copy nor a committed file the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a term’s working copy tags: - working copies x-required-permission: content.read delete: description: Throws the working copy away; the committed file stays as it is. No lock needed. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). Needs the `content.edit` permission. operationId: WorkingCopies_discardTerm parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: termId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: charger - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Discarded. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or no working copy." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Discard a term’s working copy tags: - working copies x-required-permission: content.edit /change-sets/{changeSetId}/page-designs/{designId}/working-copy: put: description: "Autosave: stores the editor’s content as the change set’s working copy (Postgres), without a commit and without an audit event; a save point commits it later. The shape is checked (400 otherwise); validation issues come back in `meta.issues` without refusing it, since a draft may be incomplete. Send `meta.version`: the version last read or saved (0 for none yet); the answer has the next one. Send `meta.baseCommit`: the commit the content is based on. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). Needs the change set to be a draft holding the subject’s lock, and the `content.edit` permission covering the content (and the committed file). A page design (#390) needs `content.edit` through a role whose scope restricts nothing: it is every manual's look that uses it, in every language. Its `meta.issues` say where in the design (`at`, a dotted path; a region's block after `#`)." operationId: WorkingCopies_saveDesign parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: designId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: product-line - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/SavePageDesignWorkingCopyDocument" responses: "200": description: Saved, at its new version. content: application/vnd.api+json: schema: $ref: "#/components/schemas/PageDesignWorkingCopyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or neither a working copy nor a committed file the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`lock-required`: the change set does not hold the subject’s lock. `version-conflict`: the working copy is at another version (`meta.version`; read it again). `stale-working-copy`: the file changed on the branch since `meta.baseCommit` (`meta.head`). `invalid-state`: the change set is no draft (`meta.state`). `asset-deleted`: a file it names is being deleted as unused (`meta.assets`; upload it again; once deleted it is 422 `unknown-asset`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`subject-mismatch`: the content names another module or manual than the path. `table-too-large` (a module, or a page design’s regions): a table has more than 1,000 columns or 50,000 cells (rows × columns), or the tables of a module or of a design’s regions more than 1,000,000 cells together; one error per such table (or one at `blocks` or `regions` for the total), `source.pointer` at it, `meta.columns`, `meta.cells` and `meta.totalCells` the caps. `too-large`: more than `meta.max` bytes of JSON. `too-many-files`: a module names more than `meta.max` different images and attachments. `unknown-asset`: an image or attachment block names a file you may not use (`meta.assets`): only one a module you may see on the change set’s branch or at its base uses, or one uploaded into a change set of yours, is taken; any other is refused alike, whether or not it is stored. `translation-record-protected`: a page design’s or manual’s `translations` changed in a language whose translation you do not manage (`translation.manage`; `meta.languages`): keep it as the branch or the change set’s base has it." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Save a page design’s working copy tags: - working copies x-required-permission: content.edit get: description: The change set’s working copy, else the file committed on its branch (`version` 0, `meta.saved` false), with its validation issues. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). What lies outside the reader’s scope (their `content.read.draft` roles; for an author without that permission, their `content.read` roles) is not found. Reads with `?ref=` on the branch keep showing the committed file. Needs the `content.read` permission. A committed file that is no page design reads as none. operationId: WorkingCopies_getDesign parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: designId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: product-line - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/PageDesignWorkingCopyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or neither a working copy nor a committed file the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a page design’s working copy tags: - working copies x-required-permission: content.read delete: description: Throws the working copy away; the committed file stays as it is. No lock needed. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). Needs the `content.edit` permission. operationId: WorkingCopies_discardDesign parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: designId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: product-line - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Discarded. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or no working copy." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Discard a page design’s working copy tags: - working copies x-required-permission: content.edit /change-sets/{changeSetId}/page-design-templates/{templateId}/files/working-copy: put: description: "Autosave: stores the editor’s content as the change set’s working copy (Postgres), without a commit and without an audit event; a save point commits it later. The shape is checked (400 otherwise); validation issues come back in `meta.issues` without refusing it, since a draft may be incomplete. Send `meta.version`: the version last read or saved (0 for none yet); the answer has the next one. Send `meta.baseCommit`: the commit the content is based on. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). Needs the change set to be a draft holding the subject’s lock, and the `content.edit` permission covering the content (and the committed file). A text file of a page design’s own template (#396), `templates//`: like a page design, it needs `content.edit` through a role whose scope restricts nothing (it lays out every manual whose design names the template). The content is the file’s whole text, at most 256 KiB as UTF-8; a path no file has yet makes a new one (`manual.typ` a new template) at the save point. Whether the template compiles is not checked here: the template’s preview (`GET /page-design-templates/{templateId}/preview/pages/{page}.png`) shows it, and the change set’s checks hold a broken one (`page-design-template-error`). Deleting a file is a save point’s `deletes`." operationId: WorkingCopies_saveTemplateFile parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: templateId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: house - name: path required: true in: query description: "The file’s path in the template’s folder (`templates//`): names of letters, digits, `_`, `-` and `.` joined by `/`, none starting with `.`, at most 8 deep and 150 characters, ending in a text file’s extension (`.typ`, `.yaml`, `.yml`, `.json`, `.toml`, `.csv`, `.txt`, `.xml`, `.svg`, `.bib`). Any other path is 404, never a file outside the folder." schema: type: string maxLength: 1000 example: parts/notice.typ - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/SaveTemplateFileWorkingCopyDocument" responses: "200": description: Saved, at its new version. content: application/vnd.api+json: schema: $ref: "#/components/schemas/TemplateFileWorkingCopyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or neither a working copy nor a committed file the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`lock-required`: the change set does not hold the subject’s lock. `version-conflict`: the working copy is at another version (`meta.version`; read it again). `stale-working-copy`: the file changed on the branch since `meta.baseCommit` (`meta.head`). `invalid-state`: the change set is no draft (`meta.state`). `asset-deleted`: a file it names is being deleted as unused (`meta.assets`; upload it again; once deleted it is 422 `unknown-asset`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`template-too-large` (#803): with this text, the template’s folder would hold more than `meta.maxFiles` files or `meta.maxBytes` bytes together (the files at the branch, each of the change set’s drafts at its length in place of its file; `meta.files`, `meta.bytes`: what it would hold); a save adding neither a file nor bytes is taken, so a folder past them can be made smaller. `path-conflict`: a file and a folder of one name. `subject-mismatch`: the content is no template file’s (its `text`). `too-large`: more than `meta.max` bytes of JSON." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Save a template file’s working copy tags: - working copies x-required-permission: content.edit get: description: The change set’s working copy, else the file committed on its branch (`version` 0, `meta.saved` false), with its validation issues. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). What lies outside the reader’s scope (their `content.read.draft` roles; for an author without that permission, their `content.read` roles) is not found. Reads with `?ref=` on the branch keep showing the committed file. Needs the `content.read` permission. A committed file that is no UTF-8 text (an image the template shows) reads as none. operationId: WorkingCopies_getTemplateFile parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: templateId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: house - name: path required: true in: query description: "The file’s path in the template’s folder (`templates//`): names of letters, digits, `_`, `-` and `.` joined by `/`, none starting with `.`, at most 8 deep and 150 characters, ending in a text file’s extension (`.typ`, `.yaml`, `.yml`, `.json`, `.toml`, `.csv`, `.txt`, `.xml`, `.svg`, `.bib`). Any other path is 404, never a file outside the folder." schema: type: string maxLength: 1000 example: parts/notice.typ - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TemplateFileWorkingCopyDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or neither a working copy nor a committed file the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a template file’s working copy tags: - working copies x-required-permission: content.read delete: description: Throws the working copy away; the committed file stays as it is. No lock needed. Only the change set’s author works on its working copies (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). Needs the `content.edit` permission. operationId: WorkingCopies_discardTemplateFile parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: templateId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: house - name: path required: true in: query description: "The file’s path in the template’s folder (`templates//`): names of letters, digits, `_`, `-` and `.` joined by `/`, none starting with `.`, at most 8 deep and 150 characters, ending in a text file’s extension (`.typ`, `.yaml`, `.yml`, `.json`, `.toml`, `.csv`, `.txt`, `.xml`, `.svg`, `.bib`). Any other path is 404, never a file outside the folder." schema: type: string maxLength: 1000 example: parts/notice.typ - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Discarded. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or no working copy." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Discard a template file’s working copy tags: - working copies x-required-permission: content.edit /change-sets/{changeSetId}/commits: post: description: "A save point: commits the change set’s working copies (all, or `subjects`) and `deletes` (a deleted module’s translation record in its language with it) in one commit on its branch, each printed canonically, with the actor as author, then drops those working copies and records a `change-set.commit` audit event (and one `.write` or `.delete` per file). Only the change set’s author, while it is a draft, and only for subjects whose lock it holds; scope is checked again against the branch head, as for a save. Invalid content is refused (422, one error per problem). A page design still named by the configuration or a manual, as the commit leaves them, is not deleted (409 `design-in-use`, #554). A working copy holding exactly the committed file is dropped without a commit; when nothing changes, no commit is made (200). The client decides when (closing a module, submitting, every few minutes); the server has no timer. Needs the `content.edit` permission." operationId: Commits_commit parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateCommitDocument" responses: "200": description: "Nothing changed: no commit." content: application/vnd.api+json: schema: $ref: "#/components/schemas/NoCommitDocument" "201": description: Committed. content: application/vnd.api+json: schema: $ref: "#/components/schemas/CommitDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: '`lock-required`: the change set does not hold a subject’s lock (`meta.subject`). `stale-working-copy`: a subject’s file changed on the branch since its working copy was based on it (`meta.subjects`, `meta.head`). `branch-moved`: the branch moved while committing, twice (try again). `working-copy-changed`: working copies were saved or discarded while committing, twice (`meta.subjects`; try again). `invalid-state`: the change set is no draft (`meta.state`). `design-in-use`: a page design to delete is still named by the configuration (`pdf.design`) or a manual (`design`) as the commit leaves them (`meta.designs`; `meta.usedIn`: `{ in: "config", design }` or `{ in: "manual", design, manual? }`, a manual you may not read without its ID; at most 50, `meta.more` counts the rest).' content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-working-copy`: one error per problem, `source.pointer` naming the subject (and block), `meta.issue` the validation code. `config-in-use`: the configuration committed would make content on the branch invalid (one error per usage, as for its working copy). `unknown-asset`: a module names a file you may not use (`meta.assets`), checked again as saving checks it. `translation-record-protected`: a page design’s or manual’s translation record changed in a language whose translation you do not manage (`meta.subject`, `meta.languages`), checked again as saving checks it. `duplicate-subject`, `nothing-to-delete`, `not-deletable` (the configuration), `too-large`, `too-many-changes` (`meta.max`), `too-many-files`, `invalid-message`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database, but the Git commit may have landed on the branch already: it is recorded by the next save point or reconciler pass, and a retry then finds nothing left to commit (200, `meta.commit` null). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Commit working copies tags: - working copies x-required-permission: content.edit /change-sets/{changeSetId}/reverts: post: description: "Takes modules, manuals, terms or the configuration back out of the change set: one commit on its branch, made as a save point is, that puts each subject's file back as it is at the change set's base commit (a subject the change set created is deleted), then drops their working copies and releases their locks, with a `change-set.revert` audit event (and the commit's own, and one `lock.release` per lock). A subject whose file is unchanged and that has only a working copy makes no commit (`meta.commit` null). Only the change set's author, while it is a draft, and only for subjects whose lock it holds; scope is checked as for deleting the file at the head and changing it at the base. A configuration put back that content kept at the head no longer fits is 422 `config-in-use`; a page design the change set added, taken out while the configuration or a manual names it, is 409 `design-in-use` (#554). Needs the `content.edit` permission." operationId: Commits_revert parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateRevertDocument" responses: "200": description: Taken out. content: application/vnd.api+json: schema: $ref: "#/components/schemas/RevertDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`lock-required`: the change set does not hold a subject’s lock (`meta.subject`). `branch-moved`, `working-copy-changed`: the branch or a working copy moved while committing, twice (try again). `invalid-state`: the change set is no draft (`meta.state`). `design-in-use`: a page design the change set added, taken out, is named by the configuration or a manual the revert leaves (`meta` as for a commit’s)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`not-changed`: the change set does not change a subject (`meta.subject`). `not-restorable`: its file at the base is not UTF-8 text (`meta.subject`). `duplicate-subject`, `too-many-changes` (`meta.max`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database, but the Git commit may have landed on the branch already: it is recorded by the next save point or reconciler pass, and a retry then finds nothing left to commit (200, `meta.commit` null). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Take changes out of a change set tags: - working copies x-required-permission: content.edit /change-sets/{changeSetId}/review: get: description: "Read only: every approval it needs (`required`: the review, and a sign-off for each restricted module type it changes), the approvals of its review head (of its branch’s head while a draft) and what is still `pending`, and the approvals that `lapsed` (their approver lost the role or scope), all as approve, sign-off and merge judge them; `granted` is always empty. The change set is found as `GET /change-sets/{changeSetId}` finds it. Needs `content.read.draft`, as reviewing does." operationId: ChangeSetWorkflow_review parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ReviewDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read.draft` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID (or another author’s, for an actor without `content.read.draft`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`branch-missing` (a draft whose branch is gone), `base-missing` (its base branch is gone)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Where a change set’s review stands tags: - change-sets x-required-permission: content.read.draft /change-sets/{changeSetId}/submit: post: description: "`draft` → `in-review`: its branch’s head becomes its `reviewHead`, what approvals are of and a merge merges. Then it is frozen (no lock, save or save point) until a reviewer returns it; its locks are kept. By its author, or an editor whose `content.edit` scope covers everything it changes. Audited as `change-set.submit`." operationId: ChangeSetWorkflow_submit parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/TransitionDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ChangeSetDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID (or another author’s, for an actor without `content.read.draft`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state` (not a draft; `meta.state`), `uncommitted-working-copies` (make a save point or discard them first; `meta.count`), `no-changes`, `branch-moved`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`translation-record-protected`: a page design or manual the change set changed, which an update from the base reported conflicting, holds a translation record that differs from its base commit’s in a language whose translation you do not manage (`meta.subject`, `meta.languages`): update again, or save it with the base commit’s record." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database (a merge may have landed in Git already: it is recorded by the reconciler). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Submit a change set for review tags: - change-sets x-required-permission: content.edit /change-sets/{changeSetId}/return: post: description: "`in-review` or `approved` (not merged, say after a conflict) → `draft`, with the changes requested in the comment. Its review head is cleared and its approvals removed; its locks stay. By a reviewer whose `content.review` scope covers everything it changes. Never by its author: whoever started it or wrote a commit it holds, the writers of what a carry-forward or a move onto a rewritten base carried into it included (403; 409 `too-many-commits` when its line is too long to read whole). Audited as `change-set.return`." operationId: ChangeSetWorkflow_return parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/TransitionDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ChangeSetDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.review` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID (or another author’s, for an actor without `content.read.draft`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state`: not in review or approved (`meta.state`; `merged` when a merge that had landed unrecorded is recorded now)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database (a merge may have landed in Git already: it is recorded by the reconciler). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Return a change set to its author tags: - change-sets x-required-permission: content.review /change-sets/{changeSetId}/approve: post: description: "Records the review approval of its review head, by a reviewer whose `content.review` scope covers everything it changes. Not by its author: whoever started it or wrote a commit it holds, the writers of what a carry-forward or a move onto a rewritten base carried into it included (403; 409 `too-many-commits` when its line is too long to read whole), unless the installation’s self-approval rule (`GET /settings`) is `review` or `review-and-sign-off`: then their scope is checked as anyone’s, and the approval, its audit event and `meta.review` carry `self: true` (`selfApproved`). It becomes `approved` once nothing is pending: the review, and a sign-off for each restricted module type it changes; until then it stays `in-review`. `meta.review` says where it stands. Audited as `change-set.approve`." operationId: ChangeSetWorkflow_approve parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/TransitionDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ReviewDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.review` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID (or another author’s, for an actor without `content.read.draft`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state` (not in review; `meta.state`), `already-approved`, `head-moved`: its branch moved after it was submitted (pushed to outside the API), so no approval holds; it has been returned to draft (`meta.reviewHead`, `meta.head`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database (a merge may have landed in Git already: it is recorded by the reconciler). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Approve a change set in review tags: - change-sets x-required-permission: content.review /change-sets/{changeSetId}/sign-off: post: description: "The extra approval restricted module types (`restricted: true` in the configuration) need: one sign-off per such type it changes whose changed modules all lie within the approver’s `content.approve` scope. Not by its author: whoever started it or wrote a commit it holds, the writers of what a carry-forward or a move onto a rewritten base carried into it included (403; 409 `too-many-commits` when its line is too long to read whole), unless the installation’s self-approval rule (`GET /settings`) is `review-and-sign-off`: then their scope is checked as anyone’s, and the approval, its audit event and `meta.review` carry `self: true` (`selfApproved`). Otherwise as approve. Audited as `change-set.sign-off`." operationId: ChangeSetWorkflow_signOff parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/TransitionDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ReviewDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.approve` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID (or another author’s, for an actor without `content.read.draft`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state`, `no-sign-off-needed` (it changes no module of a restricted type), `already-approved`, `head-moved`: its branch moved after it was submitted (pushed to outside the API), so no approval holds; it has been returned to draft (`meta.reviewHead`, `meta.head`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database (a merge may have landed in Git already: it is recorded by the reconciler). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Sign off a change set’s restricted module types tags: - change-sets x-required-permission: content.approve /change-sets/{changeSetId}/merge: post: description: "Merges exactly its review head into its base branch (`baseRef`) with a merge commit carrying one `Approved-by` trailer per approver, then marks it `merged`, releases its locks and records `change-set.merge`. By a publisher whose `release.publish` scope covers everything it changes. Each approval counts only while its approver still holds the role and scope it took. A conflict changes nothing: the change set stays approved but unmerged; nor does a merge that would leave content invalid under the configuration it keeps (422 `config-in-use`)." operationId: ChangeSetWorkflow_merge parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/TransitionDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/MergeDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `release.publish` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID (or another author’s, for an actor without `content.read.draft`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`merge-conflict` (`meta.conflicts`: `{ path, kinds }`, at most 100; `meta.total`), `invalid-state`, `not-approved` (`meta.pending`), `approval-lapsed` (an approval it needs no longer holds: its approver lost the role or scope it took; `meta.pending`, `meta.lapsed`: `{ requirement, approver }`), `base-moved` (try again), `base-missing`, `base-rewritten` (the base no longer holds the change set’s base commit), `head-moved`: its branch moved after it was submitted (pushed to outside the API), so no approval holds; it has been returned to draft (`meta.reviewHead`, `meta.head`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`config-in-use`: the merged tree would hold content invalid under the configuration it keeps (a value one side removed, the other uses); one error per usage, `source.pointer` naming the subject and block, `meta.subject`, `meta.issue`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database (a merge may have landed in Git already: it is recorded by the reconciler). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Merge an approved change set into its base tags: - change-sets x-required-permission: release.publish /change-sets/{changeSetId}/refresh: post: description: "Merges its base branch’s head into its branch (a fast-forward when it has no commits of its own), so it holds what was merged there since it started; its `baseCommit` moves on to that head, and what it changes is counted from there. A draft, by its author only. A conflict writes nothing to Git: 409 `refresh-conflict` lists the files, and each module, manual, configuration or term among them is recorded as reported (`GET /change-sets/{changeSetId}/refresh-conflicts`). To resolve, make them what they should be in the editor (saving them), then update again with them in `meta.keep`, or name those to keep as they are in `meta.keepMine` (“Keep my version”): their working copies are committed first, as a save point, and where they conflict the change set’s version is kept. A subject in `meta.keep` whose keeping matters (its file conflicts, or its working copy is in the way) must have been saved since it was reported, against a base whose file is still the one reported: else 409 `refresh-unresolved`, and nothing is written. The reports are cleared once an update goes through. Audited as `change-set.refresh`, with the subjects resolved by editing (`resolvedByEditing`) and kept by choice (`keptByChoice`). Working copies whose file did not change move on to the new head. The merge commit gets an outbox row like a save point." operationId: ChangeSetWorkflow_refresh parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/RefreshChangeSetDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/RefreshDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID (or another author’s, for an actor without `content.read.draft`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`refresh-conflict` (`meta.conflicts`: `{ path, subject?, kinds }`, at most 100; `meta.total`; kinds are git’s, `contents`, `modify/delete`, …, or `working-copy`: a working copy not yet committed of a file the base changed: commit or discard it first, or keep it), `refresh-unresolved` (subjects in `meta.keep` not saved since they were reported, or whose file the base changed again since: `meta.unresolved`: `{ path, subject }`; `meta.total`; save them or name them in `meta.keepMine`), `invalid-state` (not a draft; `meta.state`), `lock-required` (a kept subject that conflicts: take its lock first; `meta.subject`), `stale-working-copy` and the other answers of a save point (committing the kept working copies), `base-missing` (its base branch is gone, or is a draft you may not read), `base-rewritten` (the base no longer holds its base commit), `branch-missing`, `branch-moved` (its branch kept moving; try again), `unrelated-histories`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`duplicate-subject` (a subject named twice in `meta.keep` or `meta.keepMine`, or in both), `translation-record-protected` (a kept page design or manual whose translation record differs from the base’s in a language whose translation you do not manage: save it with the base branch’s record as it is now first), and the answers of a save point for a kept working copy (`invalid-working-copy`, …)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database (a merge may have landed in Git already: it is recorded by the reconciler). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Update a change set from its base tags: - change-sets x-required-permission: content.edit /change-sets/{changeSetId}/refresh-conflicts: get: description: "The modules, manuals, configuration and terms an update from the base reported as conflicting (`refresh-conflict`, or `refresh-unresolved`), in subject order, each with the base head it was reported against and when its working copy was first saved since (`savedAt`): what “Update again” may keep (#437). Cleared once an update goes through. By the change set’s author only (403 for anyone else who reads drafts). Needs the `content.edit` permission." operationId: ChangeSetWorkflow_listRefreshConflicts parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/RefreshConflictPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID (or another author’s, for an actor without `content.read.draft`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List the conflicts an update reported tags: - change-sets x-required-permission: content.edit /change-sets/{changeSetId}/carry-forward: post: description: "For a change set merged into a maintenance line: starts a new draft change set on `main` and applies the same change there, three-way (its own diff only, never what the line held before it). Each module, manual, configuration or term it changes is locked for the new change set, and what applied cleanly is committed there as a save point; what did not (a conflict, a lock another change set holds, a subject outside the actor’s scope on `main`, a file that is no subject) is left as it is on `main` and listed in `meta.carryForward.conflicts`, with the blocks to apply by hand where it can tell. Never automatic. Records `change-set.create` (with `carriedForwardFrom`) on the new change set and `change-set.carry-forward` on this one, with an outbox row naming both. By its author, or an editor whose `content.edit` scope covers everything it changes." operationId: ChangeSetWorkflow_carryForward parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/TransitionDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/CarryForwardDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID (or another author’s, for an actor without `content.read.draft`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state`: it is not merged (`meta.state`). `not-on-maintenance-line`: it was merged elsewhere. `already-carried-forward`: a change set carrying it forward exists and is not abandoned (`meta.changeSetId`). `no-changes`: `main` holds the change already. `branch-missing`: there is no `main`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`too-many-changes`: it changes more files than one commit takes." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database (a merge may have landed in Git already: it is recorded by the reconciler). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Carry a fix forward to main tags: - change-sets x-required-permission: content.edit /change-sets/{changeSetId}/rebase: post: description: 'For an open change set whose base branch was rewritten (`meta.base.state: "rewritten"` on `GET /change-sets/{changeSetId}`: its base commit is no longer in the base’s history, after a force-push or a restore), which can therefore be neither updated nor merged: starts a new draft change set on the base’s current head, with the same title and description, and applies the change set’s own changes there (its base commit to its branch’s head), three-way. Its working copies are committed first, as a save point, for a draft. Each module, manual, configuration or term it changes is locked for the new change set, and what applied cleanly is committed there as a save point; what did not (a conflict, a lock another change set holds, a subject outside your scope, a file that is no subject) is left as the base has it and listed in `meta.rebase.conflicts`, with the blocks to apply by hand where it can tell. The old change set is abandoned, superseded by the new one (`meta.supersededBy`, `meta.supersedes`); its branch and comments stay readable. Approvals do not carry over. Records `change-set.create` (with `supersedes`) on the new change set, and `change-set.abandon` (with `supersededBy`) and `change-set.rebase` on the old one. By its author only (it closes the change set; 403 for anyone else); the new change set is yours too. Moved already: 409 `already-superseded`, naming the new one in `meta.changeSetId`.' operationId: ChangeSetWorkflow_rebase parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/TransitionDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/RebaseDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID (or another author’s, for an actor without `content.read.draft`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state`: it is no longer open (`meta.state`). `base-not-rewritten`: its base still holds its base commit: update it instead. `already-superseded`: a change set not abandoned holds its changes already (`meta.changeSetId`). `uncommitted-working-copies`: it has working copies only its author can commit, or it is in review (`meta.subjects`). `base-missing`: its base branch is gone, or is a draft you may not read. `branch-missing`: its branch is gone. The answers of a save point for its working copies (`stale-working-copy`, …)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`too-many-changes`: it changes more files than one commit takes. The answers of a save point for its working copies (`invalid-working-copy`, …)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database (a merge may have landed in Git already: it is recorded by the reconciler). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Move a change set onto its rewritten base’s current head tags: - change-sets x-required-permission: content.edit /manuals/{id}/variants/{variant}/{lang}/pdf/pages/{page}.png: get: description: "One page of the PDF `GET …/pdf` gives (the same reader, `?ref=` and `?workingCopy=`), rasterised, for thumbnails: page 1 is the title page. `?design=` lays it out with another page design, for the design screen’s preview. Cached per commit like the PDF. Sent with `nosniff` and a sandboxing `Content-Security-Policy`." operationId: ManualPdf_page parameters: - name: id required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: operating - name: variant required: true in: path description: Variant slug as listed by `GET /manuals/{id}`, e.g. `model=large`. schema: type: string minLength: 1 maxLength: 500 description: Variant slug as listed by `GET /manuals/{id}`, e.g. `model=large`. example: model=large - name: lang required: true in: path schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ example: en - name: page required: true in: path description: The page, from 1 (the title page) to 9999. schema: type: string pattern: ^[1-9][0-9]{0,3}$ example: "1" - name: width required: false in: query description: The image's width in pixels (16–2400, default 480); the height follows the page. schema: type: string pattern: ^[0-9]{1,4}$ - name: design required: false in: query description: "For the design screen: lay the manual out with this page design (`design/.yaml`, read at `ref`, and its working copy with `workingCopy=true`) in place of the manual's own; `builtin` for the built-in design. A design that is not there gives the built-in design, as for a manual naming one. Default: the manual's own (its manifest's `design`, else `pdf.design`)." schema: anyOf: - type: string enum: - builtin - type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ - name: workingCopy required: false in: query description: "For authors (left out of the delivery document): true reads the change set’s working copies (what its editor autosaved, not committed yet) in place of their files, modules and manuals alike; module references resolve to their own working copies where there are any; an image uploaded into the change set links to `GET /change-sets/{changeSetId}/assets/{hash}` in an HTML page, and the PDF shows it. Needs `ref` to name the change set’s branch (`change-sets/`; else 400 `invalid-parameter`) and only for its author: 403 for anyone else who may read drafts, 404 for anyone who may not. `private, no-cache`, without the commit’s ETag. Default: false." schema: type: string enum: - "true" - "false" default: "false" - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: The page as PNG. content: image/png: schema: type: string format: binary headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string "304": description: The `If-None-Match` ETag is still current. "400": description: "Malformed manual ID, variant slug, language, page or width. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: No such manual, or the PDF has fewer pages (`meta.pages` says how many). content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`expansion-too-large`: once its module references are included the manual holds more than 500,000 content nodes, 12,000,000 characters or 1,000,000 table cells (rows × columns) (a module referred to over several paths counts once per path), or its blocks and references nest more than 100 deep, so nothing of it is made (`meta.nodes`, `meta.chars`, `meta.tableCells`, `meta.depth`: the limits)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "500": description: Compiling failed; the error's `meta.diagnostics` has the compiler's messages. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: The renderer is busy or the server is shutting down; `Retry-After` says when to try again. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Render a page of a manual’s PDF as PNG tags: - manuals x-required-permission: content.read /manuals/{id}/variants/{variant}/{lang}/pdf/layout-warnings: get: description: "What the page design’s layout of the PDF `GET …/pdf/pages/{page}.png` shows (the same reader, `?ref=`, `?workingCopy=` and `?design=`) could not fit: a title or back page region cut off (`page-design-overflow`) and a running header or footer shortened with an ellipsis (`running-head-truncated`), once per place, with the first page and how many pages. The PDF is rendered if it is not yet (cached as for its pages). Empty for a manual laid out without a page design." operationId: ManualLayout_list parameters: - name: id required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: operating - name: variant required: true in: path description: Variant slug as listed by `GET /manuals/{id}`, e.g. `model=large`. schema: type: string minLength: 1 maxLength: 500 description: Variant slug as listed by `GET /manuals/{id}`, e.g. `model=large`. example: model=large - name: lang required: true in: path schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ example: en - name: design required: false in: query description: "For the design screen: lay the manual out with this page design (`design/.yaml`, read at `ref`, and its working copy with `workingCopy=true`) in place of the manual's own; `builtin` for the built-in design. A design that is not there gives the built-in design, as for a manual naming one. Default: the manual's own (its manifest's `design`, else `pdf.design`)." schema: anyOf: - type: string enum: - builtin - type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ - name: workingCopy required: false in: query description: "For authors (left out of the delivery document): true reads the change set’s working copies (what its editor autosaved, not committed yet) in place of their files, modules and manuals alike; module references resolve to their own working copies where there are any; an image uploaded into the change set links to `GET /change-sets/{changeSetId}/assets/{hash}` in an HTML page, and the PDF shows it. Needs `ref` to name the change set’s branch (`change-sets/`; else 400 `invalid-parameter`) and only for its author: 403 for anyone else who may read drafts, 404 for anyone who may not. `private, no-cache`, without the commit’s ETag. Default: false." schema: type: string enum: - "true" - "false" default: "false" - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/LayoutWarningPageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "As for the PDF: `invalid-content`, `pdf-accessibility`, `render-timeout` or `expansion-too-large`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List what a manual’s PDF layout cannot fit tags: - manuals x-required-permission: content.read /modules/{lang}/{id}/hidden-content: get: description: "The companion of `GET /modules/{lang}/{id}/preview`: the module’s variant blocks whose conditions leave them out for `variant`, outermost only, in document order, each with its condition and a plain-text label. Read like the preview: `?ref=` may name a branch (a change set’s, for its author), and a module the reader may not see is 404, exactly like a missing one; a variant the configuration does not hold is 422 `unknown-variant`." operationId: ModuleHiddenContent_hidden parameters: - name: lang required: true in: path schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ example: en - name: id required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: battery-charging - name: variant required: false in: query description: "The variant, as for the module’s preview (`model=large,software=2.3`). Default: none set, so every variant block whose condition tests an attribute is hidden." schema: type: string maxLength: 500 - name: workingCopy required: false in: query description: "For authors (left out of the delivery document): true reads the change set’s working copies (what its editor autosaved, not committed yet) in place of their files, modules and manuals alike; module references resolve to their own working copies where there are any; an image uploaded into the change set links to `GET /change-sets/{changeSetId}/assets/{hash}` in an HTML page, and the PDF shows it. Needs `ref` to name the change set’s branch (`change-sets/`; else 400 `invalid-parameter`) and only for its author: 403 for anyone else who may read drafts, 404 for anyone who may not. `private, no-cache`, without the commit’s ETag. Default: false." schema: type: string enum: - "true" - "false" default: "false" - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/HiddenContentPageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unknown-variant`: the variant names an attribute or value the configuration does not hold. (`invalid-content` for a broken file, as on every content route.) `expansion-too-large`: once its module references are included the manual holds more than 500,000 content nodes, 12,000,000 characters or 1,000,000 table cells (rows × columns) (a module referred to over several paths counts once per path), or its blocks and references nest more than 100 deep, so nothing of it is made (`meta.nodes`, `meta.chars`, `meta.tableCells`, `meta.depth`: the limits)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List what a module hides for a variant tags: - modules x-required-permission: content.read /manuals/{id}/variants/{variant}/{lang}/hidden-content: get: description: "The companion of the manual’s HTML and PDF: what its conditions leave out for the variant, outermost only, in document order: variant blocks of the modules it includes, module entries and groups. Resolved exactly as the HTML and the PDF are, so it lists only what the reader could read: a module outside their scope or above the manual’s audience is never named. A manual, variant or language the reader may not have is 404, exactly like a missing one." operationId: ManualHiddenContent_hidden parameters: - name: id required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: operating - name: variant required: true in: path description: Variant slug as listed by `GET /manuals/{id}`, e.g. `model=large`. schema: type: string minLength: 1 maxLength: 500 description: Variant slug as listed by `GET /manuals/{id}`, e.g. `model=large`. example: model=large - name: lang required: true in: path schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ example: en - name: workingCopy required: false in: query description: "For authors (left out of the delivery document): true reads the change set’s working copies (what its editor autosaved, not committed yet) in place of their files, modules and manuals alike; module references resolve to their own working copies where there are any; an image uploaded into the change set links to `GET /change-sets/{changeSetId}/assets/{hash}` in an HTML page, and the PDF shows it. Needs `ref` to name the change set’s branch (`change-sets/`; else 400 `invalid-parameter`) and only for its author: 403 for anyone else who may read drafts, 404 for anyone who may not. `private, no-cache`, without the commit’s ETag. Default: false." schema: type: string enum: - "true" - "false" default: "false" - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/HiddenContentPageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unknown-variant`: the variant names an attribute or value the configuration does not hold. (`invalid-content` for a broken file, as on every content route.) `expansion-too-large`: once its module references are included the manual holds more than 500,000 content nodes, 12,000,000 characters or 1,000,000 table cells (rows × columns) (a module referred to over several paths counts once per path), or its blocks and references nest more than 100 deep, so nothing of it is made (`meta.nodes`, `meta.chars`, `meta.tableCells`, `meta.depth`: the limits)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List what a manual hides for one of its variants tags: - manuals x-required-permission: content.read /releases: post: description: "Tags the commit `main` points to now (the whole repository) as `revision` of `product`, with an annotated tag named by `CCMS_RELEASE_TAG` (default `release/{product}/{revision}`; the publisher as tagger; the notes as the message’s body; trailers `Product`, `Revision` and `Actor`), then records the release and a `release.publish` audit event. A release is immutable: its tag is never moved or deleted, and its product and revision (or tag name) can never be used again. A request cut off before it was recorded (the server stopped, Git or the database failed) is finished by the next request for the same release once 60 s have passed, as first requested; until then that is 409 `release-pending` (`meta.releaseId`, `meta.retryAfter` in seconds): try again then. Needs the `release.publish` permission in a role whose scope covers the product in every language, module type and audience, and `content.read` (to read `openfolia.yaml` at `main`). With `maintenanceLine` (a maintenance line’s ID), the release is cut from the head of the line’s branch instead, of the line’s product (else 422 `invalid-product`), and listed under `GET /maintenance-lines/{id}/releases`; that head holds unreleased fixes, so it also needs `content.read.draft` (without it the branch is not there: 409 `branch-missing`)." operationId: Releases_create parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateReleaseDocument" responses: "201": headers: Location: description: The new release. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ReleaseDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `release.publish` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`release-exists`: a release of this product and revision, or a tag of this name (in any case, or clashing with a branch or tag), exists already (`meta.releaseId` when it is a release). `release-pending`: it is being made, or was cut off and is finished by a request after `meta.retryAfter` seconds (`meta.releaseId`). `branch-missing`: there is no `main` (or no branch of the maintenance line given)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-product`: the product is no value of the product facet in `openfolia.yaml` at `main` (`meta.facet`). `no-product-facet`: `openfolia.yaml` configures no facet. `invalid-release-name`: the tag name the pattern gives is no valid one. `invalid-notes`: the notes end in lines Git reads as trailers. `unknown-maintenance-line`: no maintenance line with the ID given. `invalid-content`: `openfolia.yaml` at `main` cannot be read." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the database took too long; `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Cut a release tags: - releases x-required-permission: release.publish /releases/{releaseId}/withdraw: post: description: "Marks the release withdrawn, with who, when and the reason (required), a `release.withdraw` audit event and a `release.withdrawn` outbox row, in one transaction. Nothing else changes: the tag stays (tags are immutable) and reads at it keep working, but the release no longer counts as a module’s latest release (`meta.status.release`), and every reader sees it withdrawn, with the reason, in `GET /releases` and `GET /changelog`. It cannot be undone. Needs the `release.publish` permission in a role whose scope covers the release’s product in every language, module type and audience, and `content.read`." operationId: Releases_withdraw parameters: - name: releaseId required: true in: path description: The release’s ID (a UUID). One that names no release, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/WithdrawReleaseDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ReleaseDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: no role with `release.publish` covers the release’s product everywhere. `forbidden`: the actor lacks the `release.publish` permission. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no release with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`release-withdrawn`: it is withdrawn already." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Withdraw a release tags: - releases x-required-permission: release.publish /releases/{releaseId}/outputs/plan: post: description: "Queues the planning of the release’s outputs again, with a `release.outputs-plan` audit event: for a release whose planning failed for good (the outputs list is short or empty). Planning adds only the outputs the release does not have and renders only those, so it never renders one twice. `meta.queued` false: its planning is queued or running already. A release of more outputs (every manual at its tag × its variants × the configured languages) than a release may have (`CCMS_RELEASE_MAX_OUTPUTS`) is 422 `too-many-outputs`, and nothing is queued. Takes no body (send `Content-Type: application/vnd.api+json`). Needs the `release.publish` permission in a role whose scope covers the release’s product in every language, module type and audience, and `content.read`." operationId: ReleaseOutputs_replan parameters: - name: releaseId required: true in: path description: The release’s ID (a UUID). One that names no release, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "202": description: Planning queued (or already queued). content: application/vnd.api+json: schema: $ref: "#/components/schemas/ReleaseOutputsReplanDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: no role with `release.publish` covers the release’s product everywhere. `forbidden`: the actor lacks the `release.publish` permission. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no release with this ID, or no output of it you may read." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`too-many-outputs`: the release would have more outputs than a release may have; `meta.wanted` (how many) and `meta.max` (the limit, `CCMS_RELEASE_MAX_OUTPUTS`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Plan a release’s outputs again tags: - releases x-required-permission: release.publish /releases/{releaseId}/outputs/{outputId}/retry: post: description: "Queues a `failed` output again (`queued`, its error cleared, `meta.retries` one more), with a `release.output-retry` audit event; it renders in the background, at the release’s tag as before. A publisher who may not read the output (no role of theirs covers all of its manual, as for `GET …/outputs`) gets only its `state` and counts back. Only a failed output: one queued, rendering or done is 409 `output-not-failed`. Takes no body (send `Content-Type: application/vnd.api+json`). Needs the `release.publish` permission in a role whose scope covers the release’s product in every language, module type and audience, and `content.read`." operationId: ReleaseOutputs_retry parameters: - name: releaseId required: true in: path description: The release’s ID (a UUID). One that names no release, malformed or not, is 404. schema: type: string format: uuid - name: outputId required: true in: path description: The output’s ID (a UUID). One that names no output of the release you may read, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "202": description: Queued again. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ReleaseOutputDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: no role with `release.publish` covers the release’s product everywhere. `forbidden`: the actor lacks the `release.publish` permission. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no release with this ID, or no output of it you may read." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`output-not-failed`: the output is not `failed` (`meta.state`). `retry-limit`: it was queued again 10 times already (`meta.retries`). `output-busy`: its last attempt is still ending; try again in a moment." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Render a failed output again tags: - releases x-required-permission: release.publish /maintenance-lines: get: description: "Maintenance lines, newest first: each the branch an older product revision is fixed on, started from one of its releases. Needs the `content.read.draft` permission (a line’s branch holds unreleased fixes)." operationId: MaintenanceLines_list parameters: - name: filter[product] required: false in: query description: Only lines of this product. schema: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ - name: filter[state] required: false in: query description: Only `open` lines, or only `closed` ones. schema: type: string enum: - open - closed - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/MaintenanceLinePageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read.draft` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List maintenance lines tags: - maintenance-lines x-required-permission: content.read.draft post: description: "Starts a line for fixing an older product revision: creates the branch named by `CCMS_MAINTENANCE_BRANCH` (default `maintenance/{product}/{revision}`, the base release’s) at exactly the release’s commit, then records the line and a `maintenance-line.start` audit event. Change sets start on it with `maintenanceLine` (`POST /change-sets`) and merge into its branch; releases are cut from its head with `maintenanceLine` (`POST /releases`). One line per release. Needs the `release.publish` permission in a role whose scope covers the release’s product in every language, module type and audience, and `content.read` (to read `openfolia.yaml` at the release’s tag)." operationId: MaintenanceLines_start parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/StartMaintenanceLineDocument" responses: "201": headers: Location: description: The new line. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/MaintenanceLineDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `release.publish` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no published release with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`maintenance-line-exists`: a line was started from this release already (`meta.maintenanceLineId`). `branch-exists`: a branch of the line’s name exists at another commit, or clashes with a branch or tag." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-maintenance-branch`: the product and revision make no branch name by the pattern." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Start a maintenance line tags: - maintenance-lines x-required-permission: release.publish /maintenance-lines/{maintenanceLineId}: get: description: "One maintenance line: its product and revision, its branch and where it points now (`meta.head`), its base release, who started it and whether it is closed. Needs the `content.read.draft` permission." operationId: MaintenanceLines_get parameters: - name: maintenanceLineId required: true in: path description: The maintenance line’s ID (a UUID). One that names no line, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/MaintenanceLineDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read.draft` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no maintenance line with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a maintenance line tags: - maintenance-lines x-required-permission: content.read.draft /maintenance-lines/{maintenanceLineId}/releases: get: description: The releases cut from the line’s branch (`POST /releases` with `maintenanceLine`), newest first; its base release is `relationships.baseRelease`, not one of them. Needs the `content.read.draft` permission. operationId: MaintenanceLines_releases parameters: - name: maintenanceLineId required: true in: path description: The maintenance line’s ID (a UUID). One that names no line, malformed or not, is 404. schema: type: string format: uuid - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ReleasePageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read.draft` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no maintenance line with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List the releases of a maintenance line tags: - maintenance-lines x-required-permission: content.read.draft /maintenance-lines/{maintenanceLineId}/close: post: description: "Closes a line for good: its branch, its change sets and its releases stay (open change sets may still be merged, releases still cut), but no new change set starts on it. Records a `maintenance-line.close` audit event with the comment. Needs the `release.publish` permission as starting a line does." operationId: MaintenanceLines_close parameters: - name: maintenanceLineId required: true in: path description: The maintenance line’s ID (a UUID). One that names no line, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CloseMaintenanceLineDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/MaintenanceLineDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `release.publish` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no maintenance line with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: '`invalid-state`: the line is closed already (`meta.state: "closed"`).' content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Close a maintenance line tags: - maintenance-lines x-required-permission: release.publish /roles: get: description: "Roles by name: their permissions and scope, and in `meta.holders` how many users and service accounts hold each. Needs `admin.roles`." operationId: AccessAdmin_roles parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/RolePageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Roles tags: - access x-required-permission: admin.roles post: description: A role (name, description, permissions, scope) under an ID the client chooses, held by nobody yet. Recorded as `role.create`. Changes apply at once (from the next request of whoever they concern) and are recorded in the audit log. Needs `admin.roles`. operationId: AccessAdmin_create parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateRoleDocument" responses: "201": headers: Location: description: The new role. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/RoleDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`role-exists`: the ID is taken." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Create a role tags: - access x-required-permission: admin.roles /roles/{roleId}: get: description: Needs `admin.roles`. operationId: AccessAdmin_role parameters: - name: roleId required: true in: path description: The role’s ID (a lowercase key). One that names no role is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/RoleDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no role with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: A role tags: - access x-required-permission: admin.roles patch: description: Its name, description, permissions or scope (replaced whole); attributes left out stay. Recorded as `role.update`. Changes apply at once (from the next request of whoever they concern) and are recorded in the audit log. Needs `admin.roles`. operationId: AccessAdmin_update parameters: - name: roleId required: true in: path description: The role’s ID (a lowercase key). One that names no role is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/UpdateRoleDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/RoleDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no role with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`last-admin`: it would leave no active user holding `admin.roles`. `role-held-by-service-account`: it would give `admin.roles` to a role service accounts hold. `id-mismatch`: `data.id` is not the path’s." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Change a role tags: - access x-required-permission: admin.roles delete: description: Only a role nobody holds. Recorded as `role.delete`. Changes apply at once (from the next request of whoever they concern) and are recorded in the audit log. Needs `admin.roles`. operationId: AccessAdmin_delete parameters: - name: roleId required: true in: path description: The role’s ID (a lowercase key). One that names no role is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Deleted. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no role with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`role-in-use`: users or service accounts hold it (`meta.holders`), or a group mapping gives it (`meta.groupMappings`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Delete a role tags: - access x-required-permission: admin.roles /users/{userId}: get: description: Deactivated or not. Needs `admin.roles`. operationId: AccessAdmin_user parameters: - name: userId required: true in: path description: The user’s ID. One that names no user is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/UserDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no user with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: A user tags: - access x-required-permission: admin.roles patch: description: Its name or email address, and its roles (`relationships.roles` replaces them), in one change; what is left out stays. A new address ends the link to set a password and the open code by email sent to the old one. Recorded as `user.update` (the fields changed, never their values) and `role.assign` or `role.unassign` per role. Changes apply at once (from the next request of whoever they concern) and are recorded in the audit log. Needs `admin.roles`. operationId: AccessAdmin_updateUserRoute parameters: - name: userId required: true in: path description: The user’s ID. One that names no user is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/UpdateUserDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/UserDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no user with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`email-taken`: another user has this email address. `last-admin`: it would leave no active user holding `admin.roles`. `id-mismatch`: `data.id` is not the path’s." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unknown-role`: a role to give does not exist (`meta.roles`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Change a user tags: - access x-required-permission: admin.roles /users/{userId}/relationships/roles: post: description: Adds the roles listed; one it holds already stays. Answers the roles it holds now. Recorded as `role.assign` per role added. Changes apply at once (from the next request of whoever they concern) and are recorded in the audit log. Needs `admin.roles`. operationId: AccessAdmin_addRoles parameters: - name: userId required: true in: path description: The user’s ID. One that names no user is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/RoleRelationshipDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/UserRolesDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no user with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unknown-role`: a role to give does not exist (`meta.roles`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Give a user roles tags: - access x-required-permission: admin.roles delete: description: Removes the roles listed; one it does not hold is ignored. Answers the roles it holds now. Recorded as `role.unassign` per role removed. Changes apply at once (from the next request of whoever they concern) and are recorded in the audit log. Needs `admin.roles`. operationId: AccessAdmin_removeRoles parameters: - name: userId required: true in: path description: The user’s ID. One that names no user is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/RoleRelationshipDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/UserRolesDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no user with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`last-admin`: it would leave no active user holding `admin.roles`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Take roles from a user tags: - access x-required-permission: admin.roles /users/{userId}/deactivate: post: description: From its next request on, the user cannot act (403 `user-deactivated`), and approvals it gave no longer hold. Every lock it holds is released (`meta.locksReleased`, each a `lock.release` audit event). Its sessions, its link to set a password and its open code by email end. Its roles stay, for a reactivation. Recorded as `user.deactivate`. Changes apply at once (from the next request of whoever they concern) and are recorded in the audit log. Needs `admin.roles`. operationId: AccessAdmin_deactivate parameters: - name: userId required: true in: path description: The user’s ID. One that names no user is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/DeactivatedUserDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no user with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`already-deactivated`: it is. `last-admin`: it would leave no active user holding `admin.roles`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Deactivate a user tags: - access x-required-permission: admin.roles /users/{userId}/reactivate: post: description: The user may act again, with the roles it had. Recorded as `user.reactivate`. Changes apply at once (from the next request of whoever they concern) and are recorded in the audit log. Needs `admin.roles`. operationId: AccessAdmin_reactivate parameters: - name: userId required: true in: path description: The user’s ID. One that names no user is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/UserDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no user with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`not-deactivated`: it is active." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Reactivate a user tags: - access x-required-permission: admin.roles /service-accounts: get: description: Service accounts by ID, deactivated ones included, with their roles. Needs `admin.roles`. operationId: ServiceAccounts_list parameters: - name: filter[role] required: false in: query description: Only holders of this role (its ID). schema: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ - name: filter[status] required: false in: query description: "`active` or `deactivated`; left out: both." schema: type: string enum: - active - deactivated - name: filter[q] required: false in: query description: Only service accounts whose ID or name contains this text, ignoring case. schema: type: string minLength: 1 maxLength: 200 - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ServiceAccountPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Service accounts tags: - access x-required-permission: admin.roles post: description: "An ID the client chooses, a name, a description and roles; active at once, without tokens (issue one with `POST /service-accounts/{id}/tokens`). Recorded as `service-account.create` (IDs only) and `role.assign` per role. Changes apply at once (from the next request of the service account) and are recorded in the audit log. Needs `admin.roles`, held by a user: a service account cannot change access, whatever its roles." operationId: ServiceAccounts_create parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateServiceAccountDocument" responses: "201": headers: Location: description: The new service account. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ServiceAccountDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`service-account-exists`: the ID is taken." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unknown-role`: a role to give does not exist (`meta.roles`). `admin-role-for-service-account`: a role to give holds `admin.roles`, which no service account may hold (`meta.roles`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Add a service account tags: - access x-required-permission: admin.roles /service-accounts/{serviceAccountId}: get: description: Deactivated or not. Needs `admin.roles`. operationId: ServiceAccounts_one parameters: - name: serviceAccountId required: true in: path description: The service account’s ID. One that names no service account is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ServiceAccountDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no service account with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: A service account tags: - access x-required-permission: admin.roles patch: description: "Its name or description, and its roles (`relationships.roles` replaces them), in one change; what is left out stays. Recorded as `service-account.update` (the fields changed, never their values) and `role.assign` or `role.unassign` per role. Changes apply at once (from the next request of the service account) and are recorded in the audit log. Needs `admin.roles`, held by a user: a service account cannot change access, whatever its roles." operationId: ServiceAccounts_update parameters: - name: serviceAccountId required: true in: path description: The service account’s ID. One that names no service account is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/UpdateServiceAccountDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ServiceAccountDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no service account with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`id-mismatch`: `data.id` is not the path’s." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unknown-role`: a role to give does not exist (`meta.roles`). `admin-role-for-service-account`: a role to give holds `admin.roles`, which no service account may hold (`meta.roles`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Change a service account tags: - access x-required-permission: admin.roles /service-accounts/{serviceAccountId}/relationships/roles: post: description: "Adds the roles listed; one it holds already stays. Answers the roles it holds now. Recorded as `role.assign` per role added. Changes apply at once (from the next request of the service account) and are recorded in the audit log. Needs `admin.roles`, held by a user: a service account cannot change access, whatever its roles." operationId: ServiceAccounts_addRoles parameters: - name: serviceAccountId required: true in: path description: The service account’s ID. One that names no service account is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/RoleRelationshipDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/UserRolesDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no service account with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unknown-role`: a role to give does not exist (`meta.roles`). `admin-role-for-service-account`: a role to give holds `admin.roles`, which no service account may hold (`meta.roles`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Give a service account roles tags: - access x-required-permission: admin.roles delete: description: "Removes the roles listed; one it does not hold is ignored. Answers the roles it holds now. Recorded as `role.unassign` per role removed. Changes apply at once (from the next request of the service account) and are recorded in the audit log. Needs `admin.roles`, held by a user: a service account cannot change access, whatever its roles." operationId: ServiceAccounts_removeRoles parameters: - name: serviceAccountId required: true in: path description: The service account’s ID. One that names no service account is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/RoleRelationshipDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/UserRolesDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no service account with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Take roles from a service account tags: - access x-required-permission: admin.roles /service-accounts/{serviceAccountId}/deactivate: post: description: "From its next request on, none of its tokens may act (403 `service-account-deactivated`). Every lock it holds is released (`meta.locksReleased`, each a `lock.release` audit event). Its roles and tokens stay, for a reactivation. Recorded as `service-account.deactivate`. Changes apply at once (from the next request of the service account) and are recorded in the audit log. Needs `admin.roles`, held by a user: a service account cannot change access, whatever its roles." operationId: ServiceAccounts_deactivate parameters: - name: serviceAccountId required: true in: path description: The service account’s ID. One that names no service account is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/DeactivatedServiceAccountDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no service account with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`already-deactivated`: it is." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Deactivate a service account tags: - access x-required-permission: admin.roles /service-accounts/{serviceAccountId}/reactivate: post: description: "Its tokens (those neither revoked nor expired) may act again, with the roles it had. Recorded as `service-account.reactivate`. Changes apply at once (from the next request of the service account) and are recorded in the audit log. Needs `admin.roles`, held by a user: a service account cannot change access, whatever its roles." operationId: ServiceAccounts_reactivate parameters: - name: serviceAccountId required: true in: path description: The service account’s ID. One that names no service account is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ServiceAccountDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no service account with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`not-deactivated`: it is active." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Reactivate a service account tags: - access x-required-permission: admin.roles /service-accounts/{serviceAccountId}/tokens: get: description: "Newest first, revoked and expired ones included, with expiry and last use: never a token itself. Needs `admin.roles`." operationId: ServiceAccounts_tokens parameters: - name: serviceAccountId required: true in: path description: The service account’s ID. One that names no service account is 404. schema: type: string - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ServiceTokenPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no service account with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: A service account’s tokens tags: - access x-required-permission: admin.roles post: description: "A new bearer token for the service account, in `meta.token`: **shown only in this answer**; only its hash is stored. It expires (by default in 90 days, at most 366); send it as `Authorization: Bearer `. Recorded as `service-token.issue` (its ID and expiry, never the token). Changes apply at once (from the next request of the service account) and are recorded in the audit log. Needs `admin.roles`, held by a user: a service account cannot change access, whatever its roles." operationId: ServiceAccounts_issue parameters: - name: serviceAccountId required: true in: path description: The service account’s ID. One that names no service account is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/IssueServiceTokenDocument" responses: "201": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/IssuedServiceTokenDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no service account with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`service-account-deactivated`: reactivate it first. `too-many-tokens`: it holds 10 tokens neither revoked nor expired." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-expiry`: `expiresAt` is not in the future, or more than 366 days ahead." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Issue a token tags: - access x-required-permission: admin.roles /service-accounts/{serviceAccountId}/tokens/{tokenId}/revoke: post: description: "From the next request on the token is refused (401 `token-revoked`). It stays listed, with when it was revoked. Recorded as `service-token.revoke`. Changes apply at once (from the next request of the service account) and are recorded in the audit log. Needs `admin.roles`, held by a user: a service account cannot change access, whatever its roles." operationId: ServiceAccounts_revoke parameters: - name: serviceAccountId required: true in: path description: The service account’s ID. One that names no service account is 404. schema: type: string - name: tokenId required: true in: path description: The token’s ID (16 hex digits, its public part). One the service account has no token of is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ServiceTokenDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no such service account, or no such token of it." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`already-revoked`: it is." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Revoke a token tags: - access x-required-permission: admin.roles /auth/providers: get: description: "The identity providers people may sign in with, for the sign-in page’s buttons: empty when sign-in is not set up (`CCMS_OIDC_ISSUER`; never in demo mode). Anyone may ask, before signing in." operationId: Auth_providers parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/IdentityProviderPageDocument" "400": description: A query parameter the route does not support, or a malformed one. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Identity providers tags: - sign-in security: [] /auth/sign-out: post: description: Ends the session of the request's cookie (`__Host-openfolia-session`) and removes the cookie, recorded as `user.sign-out`. Answers the identity provider's sign-out address in `meta.signOutUrl` (coming back to the editor's sign-in page, which must be registered with the provider as a post-logout redirect), or null. Always 200, with or without a session. operationId: Auth_signOut parameters: [] responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/SignedOutDocument" "400": description: A query parameter the route does not support, or a malformed one. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Sign out tags: - sign-in security: [] /group-mappings: get: description: Which identity-provider group’s members hold which role, by group, then role. A person’s groups are those the provider sent at their last sign-in. Needs `admin.roles`. operationId: Auth_mappings parameters: - name: filter[group] required: false in: query description: Only the mappings of this group (exact). schema: type: string minLength: 1 maxLength: 256 - name: filter[role] required: false in: query description: Only the mappings giving this role (its ID). schema: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/GroupMappingPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Group mappings tags: - sign-in x-required-permission: admin.roles post: description: "The group’s members hold the role: at once for everyone the provider last put in the group, at sign-in for the others. Recorded as `group-mapping.create`, and `role.assign` (`data.via` `groups`) per user given the role. Needs `admin.roles`." operationId: Auth_create parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateGroupMappingDocument" responses: "201": headers: Location: description: The new mapping. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/GroupMappingDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`group-mapping-exists`: the group holds the role already." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unknown-role`: no such role (`meta.roles`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Map a group to a role tags: - sign-in x-required-permission: admin.roles /group-mappings/{mappingId}: get: description: Needs `admin.roles`. operationId: Auth_mapping parameters: - name: mappingId required: true in: path description: The mapping’s ID (a UUID). One that names no mapping is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/GroupMappingDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no mapping with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: A group mapping tags: - sign-in x-required-permission: admin.roles delete: description: The group’s members lose the role at once (a direct assignment of it stays). Recorded as `group-mapping.delete`, and `role.unassign` (`data.via` `groups`) per user losing the role. Needs `admin.roles`. operationId: Auth_delete parameters: - name: mappingId required: true in: path description: The mapping’s ID (a UUID). One that names no mapping is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Removed. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no mapping with this ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`last-admin`: it would leave no active user holding `admin.roles`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Remove a group mapping tags: - sign-in x-required-permission: admin.roles /auth/{provider}/sign-in: get: description: "Where the editor's sign-in button sends the browser: a 303 to the identity provider, with a sealed cookie (`__Host-openfolia-sign-in`, ten minutes) holding what the callback checks (state, nonce, PKCE verifier). `returnTo`: a path inside the editor to go back to (default `/`). When the provider cannot be reached, a 303 to the editor's sign-in page with `?error=provider-unavailable`." operationId: SignIn_signIn parameters: - name: provider required: true in: path schema: example: oidc type: string - name: returnTo required: false in: query schema: example: /manuals responses: "303": description: To the provider. summary: Begin signing in (browser) tags: - sign-in security: [] /auth/{provider}/callback: get: description: "Where the identity provider sends the browser back. Checks the answer against the sealed cookie, finds or makes the person's user, applies their groups' roles and starts a session: the cookie `__Host-openfolia-session` (`Secure`, `HttpOnly`, `SameSite=Lax`) and a 303 to the editor at `returnTo`. Anything else is a 303 to the editor's sign-in page with `?error=` (`provider-unavailable`, `access-denied`, `sign-in-failed`, `sign-in-expired`, `user-deactivated`, `sign-in-not-allowed`), never more detail. Takes whatever query the provider sends." operationId: SignIn_callback parameters: - name: provider required: true in: path schema: example: oidc type: string responses: "303": description: To the editor, signed in; or to its sign-in page, with `?error=`. summary: Finish signing in (browser) tags: - sign-in security: [] /auth/options: get: description: "What the sign-in page offers: the email and password form, “Forgot password” (only when email can carry the link), “Email me a code” (#634, only when email is set up), and how many identity providers. Anyone may ask, before signing in." operationId: Password_options parameters: [] responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/SignInOptionsDocument" "400": description: A query parameter the route does not support, or a malformed one. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Sign-in options tags: - sign-in security: [] /auth/password/sign-in: post: description: "Checks the email address and password and starts a session: the cookie `__Host-openfolia-session`, as a provider’s sign-in does, ending the browser’s previous session. An unknown address, a person without a password and a wrong password are all 401 `invalid-credentials`, in the same time. Recorded as `user.sign-in` (`data.method` `password`)." operationId: Password_signIn parameters: [] requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/PasswordSignInDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/SignedInDocument" "400": description: A query parameter the route does not support, or a malformed one. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: "`invalid-credentials`: the address or the password is not right (which is not said)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`user-deactivated` or `sign-in-not-allowed` (the session policy), said only with the right password; `cross-origin-request`: not from the editor’s origin." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`password-sign-in-off`: signing in with a password is off (`CCMS_PASSWORD_SIGN_IN=off`, or demo mode)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "429": description: "`too-many-failed-attempts`: too many failed sign-ins from this address or for this account; `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere; nothing of it was written. `sign-in-busy`: too many passwords are being checked at once. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Sign in with a password tags: - sign-in security: [] /auth/password/forgot: post: description: "When an active person has this address, emails them a link to choose a new password (valid 1 hour, once; it replaces their earlier link), at most once a minute. Always 202 with the same answer, at once, so neither the answer nor its time says whether the address is known. Recorded as `user.password-reset-requested` (`data.via` `email`). Each request counts against the client’s address, and toward the address’s reset requests (`CCMS_PASSWORD_FAILURES_*`, apart from its failed sign-ins: neither blocks the other)." operationId: Password_forgotPassword parameters: [] requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/ForgotPasswordDocument" responses: "202": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ForgotPasswordAcceptedDocument" "400": description: A query parameter the route does not support, or a malformed one. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`cross-origin-request`: not from the editor’s origin." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-configured`: “Forgot password” is not offered (no email, or no `CCMS_PUBLIC_URL`, or password sign-in off)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "429": description: "`too-many-failed-attempts`: too many failed sign-ins from this address or for this account; `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Forgot password tags: - sign-in security: [] /auth/password/link: post: description: What a link to set a password is for (an invite or a reset), whose it is and until when it works, for the page it opens. The token goes in the body, never in an address. Using it is `POST /auth/password/set`. operationId: Password_link parameters: [] requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/SignInLinkQueryDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/SignInLinkDocument" "400": description: A query parameter the route does not support, or a malformed one. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`cross-origin-request`: not from the editor’s origin." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`link-invalid`: no such link (malformed, used, replaced by a newer one, withdrawn, or its person deactivated)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`password-sign-in-off`: signing in with a password is off (`CCMS_PASSWORD_SIGN_IN=off`, or demo mode)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "410": description: "`link-expired`: the link ran out; ask for a new one." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Open a one-time link tags: - sign-in security: [] /auth/password/set: post: description: Sets the person’s password through their invite or reset link and signs them in (the session cookie). The link works once. **Every other session of the person ends.** Recorded as `user.password-set` (`data.via` `invite` or `reset`) and `user.sign-in`. A password the rules refuse leaves the link working. operationId: Password_setPassword parameters: [] requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/SetPasswordDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/SignedInDocument" "400": description: A query parameter the route does not support, or a malformed one. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`sign-in-not-allowed` (the session policy); `cross-origin-request`: not from the editor’s origin." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`link-invalid`: no such link (malformed, used, replaced by a newer one, withdrawn, or its person deactivated)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`password-sign-in-off`: signing in with a password is off (`CCMS_PASSWORD_SIGN_IN=off`, or demo mode)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "410": description: "`link-expired`: the link ran out; ask for a new one." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`password-too-short` (fewer than 12 characters), `password-too-long` (more than 256), `password-too-common` (a common password, a run along the keyboard, the person’s own address): `meta.minLength`, `meta.maxLength`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere; nothing of it was written. `sign-in-busy`: too many passwords are being checked at once. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Set a password with a one-time link tags: - sign-in security: [] /me/password: post: description: Checks your current password, then sets the new one. Your other sessions end; this one goes on. An open reset link and an open code by email end too. Recorded as `user.password-changed`. A wrong current password counts as a failed sign-in. operationId: Password_changePassword parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/ChangePasswordDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/PasswordChangedDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`wrong-password`: the current password is not right; `forbidden`: a service account has none. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`no-password`: you sign in with your identity provider only. `password-sign-in-off`: signing in with a password is off (`CCMS_PASSWORD_SIGN_IN=off`, or demo mode)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`password-too-short` (fewer than 12 characters), `password-too-long` (more than 256), `password-too-common` (a common password, a run along the keyboard, the person’s own address): `meta.minLength`, `meta.maxLength`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "429": description: "`too-many-failed-attempts`: too many failed sign-ins from this address or for this account; `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere; nothing of it was written. `sign-in-busy`: too many passwords are being checked at once. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Change your password tags: - sign-in /users/{userId}/invite: post: description: Makes a one-time link for the person to choose their password and sign in, valid `CCMS_INVITE_DAYS` (default 7) days, shown once (`meta.url`, `meta.token`). It replaces their earlier link. Emailed to their address too when email is set up (`meta.emailed`). Recorded as `user.invite`. Needs `admin.roles`. operationId: Password_invite parameters: - name: userId required: true in: path description: The user’s ID. One that names no user is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "201": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/SignInLinkMadeDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no such user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`user-deactivated`: reactivate them first. `password-sign-in-off`: signing in with a password is off (`CCMS_PASSWORD_SIGN_IN=off`, or demo mode)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`no-email-address`: the person has no email address to sign in with; add one first." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere; nothing of it was written. `sign-in-busy`: too many passwords are being checked at once. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Invite a user tags: - sign-in x-required-permission: admin.roles delete: description: The person’s open invite link stops working. Recorded as `user.invite-withdraw`. Needs `admin.roles`. operationId: Password_withdrawInvite parameters: - name: userId required: true in: path description: The user’s ID. One that names no user is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Withdrawn. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no such user, or no open invite." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere; nothing of it was written. `sign-in-busy`: too many passwords are being checked at once. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Withdraw an invite tags: - sign-in x-required-permission: admin.roles /users/{userId}/password-reset: post: description: Makes a one-time link for the person to choose a new password, valid 1 hour, shown once (`meta.url`, `meta.token`). It replaces their earlier link (an open invite too). Emailed to their address too when email is set up. Their sessions end only once they set the password. Recorded as `user.password-reset-requested` (`data.via` `admin`). Needs `admin.roles`. operationId: Password_passwordReset parameters: - name: userId required: true in: path description: The user’s ID. One that names no user is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "201": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/SignInLinkMadeDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no such user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`user-deactivated`: reactivate them first. `password-sign-in-off`: signing in with a password is off (`CCMS_PASSWORD_SIGN_IN=off`, or demo mode)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`no-email-address`: the person has no email address to sign in with; add one first." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere; nothing of it was written. `sign-in-busy`: too many passwords are being checked at once. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Make a password reset link tags: - sign-in x-required-permission: admin.roles /auth/email-code/request: post: description: When an active person has this address, emails them a six-digit code and a link that signs in, valid `CCMS_EMAIL_CODE_MINUTES` (default 10) minutes, once; a new code revokes the earlier one. Always 202 with the same answer, at once, so neither the answer nor its time says whether the address is known. Recorded as `user.email-code-requested`. Each request counts against the client’s address and toward the address’s code requests (`CCMS_PASSWORD_FAILURES_*`, apart from its tries and from passwords). operationId: EmailCode_request parameters: [] requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/EmailCodeRequestDocument" responses: "202": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/EmailCodeRequestedDocument" "400": description: A query parameter the route does not support, or a malformed one. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`cross-origin-request`: not from the editor’s origin." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`email-code-sign-in-off`: signing in with a code by email is off (`CCMS_EMAIL_CODE_SIGN_IN=off`, no email, or demo mode)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "429": description: "`too-many-failed-attempts`: too many tries from this address or for this account; `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Email me a code tags: - sign-in security: [] /auth/email-code/sign-in: post: description: "Checks the email address and the code emailed to it and starts a session: the cookie `__Host-openfolia-session`, as a password or a provider’s sign-in does, ending the browser’s previous session. The code works once. An unknown address, no code, a wrong code and one past its time are all 401 `invalid-code`, in the same time. A wrong code counts toward the address’s tries (`CCMS_PASSWORD_FAILURES_*`); the try that uses them up revokes the code, and further tries are 429 until the window ends. A code takes five tries at most. Recorded as `user.sign-in` (`data.method` `email-code`)." operationId: EmailCode_signIn parameters: [] requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/EmailCodeSignInDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/SignedInDocument" "400": description: A query parameter the route does not support, or a malformed one. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: "`invalid-code`: the address or the code is not right, or the code was used or ran out (which is not said)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`user-deactivated` or `sign-in-not-allowed` (the session policy), said only with the right code; `cross-origin-request`: not from the editor’s origin." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`email-code-sign-in-off`: signing in with a code by email is off (`CCMS_EMAIL_CODE_SIGN_IN=off`, no email, or demo mode)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "429": description: "`too-many-failed-attempts`: too many tries from this address or for this account; `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Sign in with a code by email tags: - sign-in security: [] /auth/email-code/link: post: description: Signs in with the token of the link in a code’s email (`/sign-in-code#`; the token goes in the body, never in an address) and sets the session cookie. The link and its code work once, together. Recorded as `user.sign-in` (`data.method` `email-code`, `via` `link`). operationId: EmailCode_link parameters: [] requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/EmailCodeLinkDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/SignedInDocument" "400": description: A query parameter the route does not support, or a malformed one. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`sign-in-not-allowed` (the session policy); `cross-origin-request`: not from the editor’s origin." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`link-invalid`: no such link (malformed, used, replaced by a newer code, revoked, or its person deactivated)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`email-code-sign-in-off`: signing in with a code by email is off (`CCMS_EMAIL_CODE_SIGN_IN=off`, no email, or demo mode)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "410": description: "`link-expired`: the link ran out; ask for a new code." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Sign in with the link from a code’s email tags: - sign-in security: [] /mail: get: description: "Whether the server sends email, and through which mail server: its host, port and TLS, whether it signs in, the sender’s address and name. Never the user or the password. Read-only: the settings are in the environment (`CCMS_MAIL_*`). Needs the `admin.roles` permission." operationId: Mail_get parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/MailSettingsDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Email’s settings tags: - system x-required-permission: admin.roles /mail/test: post: description: Queues a test email to the signed-in administrator’s own address, in `language` (else the installation’s), with the branding. It is sent in the background, as every email is, and retried; a failure for good is recorded as `mail.failed`. Recorded as `mail.test`. Needs the `admin.roles` permission. operationId: Mail_test parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/SendTestMailDocument" responses: "202": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/MailMessageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-configured`: email is off; `meta.reason` is `off` (no mail server, `CCMS_MAIL_URL`) or `no-secret-key` (no instance secret key)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`no-email-address`: the signed-in actor has no email address (a service account, a user without one)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long; nothing was queued. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Send a test email tags: - system x-required-permission: admin.roles /change-sets/{changeSetId}/comments: get: description: "Comments on blocks of the change set’s modules, in thread order: threads by when they were started, each followed by its replies, oldest first. Resolved threads are hidden unless `filter[resolved]` asks for them. Each says in `meta.orphaned` whether its block is gone from the change set’s head (named in `meta.head`). The change set is found as `GET /change-sets/{changeSetId}` finds it (another author’s is 404, exactly like a missing one, for an actor without `content.read.draft`). A comment is there for a reader who sees its module: at the change set’s head where it is there, else at its base; a module on neither side any more only for a reader of all of its language. Any other is 404, exactly like a missing one. Comments the reader may not see are neither listed nor counted. Needs the `content.read` permission." operationId: Comments_list parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: filter[module] required: false in: query description: "Only comments on this module: `/`, e.g. `en/battery-charging`." schema: type: string maxLength: 200 - name: filter[block] required: false in: query description: Only comments on this block ID. schema: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ - name: filter[resolved] required: false in: query description: "`false` (the default): open threads only; `true`: resolved threads only; `any`: both. A reply goes with its thread." schema: type: string enum: - "true" - "false" - any - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/CommentPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or a commit of it the reader may not open." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`branch-missing`: the change set’s branch is gone." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List a change set’s comments tags: - comments x-required-permission: content.read post: description: "A new thread on a block of a module (`attributes.subject` and `attributes.blockId`: a block, list item or procedure step in the module at the change set’s head or at its base, as the reader sees it), or a reply to a thread (`relationships.thread`: its first comment), on the thread’s block. Only the change set’s author, or a reviewer holding `content.review` in a role that covers the module (403 otherwise, one answer whatever the reason), and only on an open change set (`draft`, `in-review` or `approved`). Recorded with a `comment.create` audit event (the change set, module, block and head; never the text). The anchor is the block’s ID: the comment stays on the block while it is edited or moved, and stays, `meta.orphaned`, once a save point removes it. Needs the `content.read` permission." operationId: Comments_create parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateCommentDocument" responses: "201": headers: Location: description: The new comment. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/CommentDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: the actor lacks `content.read`, or is neither the change set’s author nor a holder of `content.review` in a role covering the module (one answer whatever the reason). `forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or a commit of it the reader may not open." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state`: the change set is not open (`meta.state`). `too-many-comments`: it holds 10000 comments already (`meta.max`). `branch-missing`: its branch is gone." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`block-not-found`: no such block in the module at the head or the base, or a module the reader may not see, answered alike. `invalid-thread`: `relationships.thread` names no thread of this change set the reader sees, or a reply." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Comment on a block, or reply to a thread tags: - comments x-required-permission: content.read /change-sets/{changeSetId}/comments/{commentId}: get: description: "The change set is found as `GET /change-sets/{changeSetId}` finds it (another author’s is 404, exactly like a missing one, for an actor without `content.read.draft`). A comment is there for a reader who sees its module: at the change set’s head where it is there, else at its base; a module on neither side any more only for a reader of all of its language. Any other is 404, exactly like a missing one. Needs the `content.read` permission." operationId: Comments_get parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: commentId required: true in: path description: The comment’s ID (a UUID). One that names no comment of this change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/CommentDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set or comment with this ID, or one the reader may not see, answered alike." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`branch-missing`: the change set’s branch is gone." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a comment tags: - comments x-required-permission: content.read patch: description: "Replaces the comment’s text; it stays on its block, in its thread, and is marked edited (`meta.editedAt`). The earlier text is not kept: a `comment.edit` audit event records that it was edited, never the text. The same text changes nothing and is not audited. Only the comment’s author, while they may comment on its module (as the change set’s author, or a reviewer holding `content.review` in a role that covers it): 403 for anyone else who sees the comment, and 404, exactly like a missing one, for anyone who does not. Only on an open change set (`draft`, `in-review` or `approved`). Nobody may edit or delete another person’s comment, admins included. Needs the `content.read` permission." operationId: Comments_edit parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: commentId required: true in: path description: The comment’s ID (a UUID). One that names no comment of this change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/EditCommentDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/CommentDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: the actor lacks `content.read`, did not write the comment, or may no longer comment on its module (one answer whatever the reason). `forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set or comment with this ID, or one the reader may not see, answered alike." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`comment-deleted`: the comment is deleted. `invalid-state`: the change set is not open (`meta.state`). `id-mismatch`: `data.id` is not the path’s. `branch-missing`: its branch is gone." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Edit one’s own comment tags: - comments x-required-permission: content.read delete: description: "Takes the comment back. A thread’s first comment with replies stays in its place without its text (`meta.deleted`, `body` null), so the thread stays readable; a reply, or a thread without replies, is gone (404 from then on), and the last reply of a deleted thread takes the thread with it. The text is not kept: a `comment.delete` audit event records that it was deleted (`data.kept`: whether it stays as deleted), never the text. Only the comment’s author, while they may comment on its module (as the change set’s author, or a reviewer holding `content.review` in a role that covers it): 403 for anyone else who sees the comment, and 404, exactly like a missing one, for anyone who does not. Only on an open change set (`draft`, `in-review` or `approved`). Nobody may edit or delete another person’s comment, admins included. Needs the `content.read` permission." operationId: Comments_delete parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: commentId required: true in: path description: The comment’s ID (a UUID). One that names no comment of this change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Deleted. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: the actor lacks `content.read`, did not write the comment, or may no longer comment on its module (one answer whatever the reason). `forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set or comment with this ID, or one the reader may not see, answered alike." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`comment-deleted`: the comment is deleted already. `invalid-state`: the change set is not open (`meta.state`). `branch-missing`: its branch is gone." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Delete one’s own comment tags: - comments x-required-permission: content.read /change-sets/{changeSetId}/comments/{commentId}/resolve: post: description: "Marks the thread (its first comment) resolved, recorded with a `comment.resolve` audit event. Its comments stay stored; lists hide resolved threads unless `filter[resolved]` asks for them. Only the change set’s author, or a reviewer holding `content.review` in a role that covers the module (403 otherwise, one answer whatever the reason), and only on an open change set (`draft`, `in-review` or `approved`). The change set is found as `GET /change-sets/{changeSetId}` finds it (another author’s is 404, exactly like a missing one, for an actor without `content.read.draft`). A comment is there for a reader who sees its module: at the change set’s head where it is there, else at its base; a module on neither side any more only for a reader of all of its language. Any other is 404, exactly like a missing one. Needs the `content.read` permission." operationId: Comments_resolve parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: commentId required: true in: path description: The comment’s ID (a UUID). One that names no comment of this change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/CommentDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: the actor lacks `content.read`, or is neither the change set’s author nor a holder of `content.review` in a role covering the module (one answer whatever the reason). `forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set or comment with this ID, or one the reader may not see, answered alike." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`already-resolved`: the thread is resolved. `invalid-state`: the change set is not open (`meta.state`). `branch-missing`: its branch is gone." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`not-a-thread`: the comment is a reply; resolve its thread (`meta.threadId`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Resolve a thread tags: - comments x-required-permission: content.read /change-sets/{changeSetId}/comments/{commentId}/reopen: post: description: "Marks a resolved thread (its first comment) open again, recorded with a `comment.reopen` audit event. Only the change set’s author, or a reviewer holding `content.review` in a role that covers the module (403 otherwise, one answer whatever the reason), and only on an open change set (`draft`, `in-review` or `approved`). The change set is found as `GET /change-sets/{changeSetId}` finds it (another author’s is 404, exactly like a missing one, for an actor without `content.read.draft`). A comment is there for a reader who sees its module: at the change set’s head where it is there, else at its base; a module on neither side any more only for a reader of all of its language. Any other is 404, exactly like a missing one. Needs the `content.read` permission." operationId: Comments_reopen parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: commentId required: true in: path description: The comment’s ID (a UUID). One that names no comment of this change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/CommentDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: the actor lacks `content.read`, or is neither the change set’s author nor a holder of `content.review` in a role covering the module (one answer whatever the reason). `forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set or comment with this ID, or one the reader may not see, answered alike." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`not-resolved`: the thread is open. `invalid-state`: the change set is not open (`meta.state`). `branch-missing`: its branch is gone." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`not-a-thread`: the comment is a reply; reopen its thread (`meta.threadId`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long (`CCMS_DATABASE_WRITE_LOCK_TIMEOUT_MS`, `CCMS_DATABASE_WRITE_STATEMENT_TIMEOUT_MS`); nothing of it was written to the database. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Reopen a thread tags: - comments x-required-permission: content.read /change-sets/{changeSetId}/module-renames: post: description: "Changes a module’s ID (#265): one commit on the change set’s branch, made as a save point is, that writes every language of the module under the new ID (with its translation record), deletes the old files, and rewrites every module reference, cross-reference and manifest entry naming the old ID at the branch head, and the `replacedBy` of every module deprecated in favour of it. The change set’s comments on the module follow it, with a `module.rename` audit event per language (and the commit’s own). Only the change set’s author, while it is a draft. It needs the change set to hold the locks of the module under both IDs, in every language, and of every module and manual it rewrites (`GET /change-sets/{changeSetId}/module-references/{moduleId}` lists them); their working copies must be committed or discarded first. Anything it touches outside the actor’s scope is one 403. Releases keep the old ID; it is not kept as an alias. Needs the `content.edit` permission." operationId: ModuleRenames_rename parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateModuleRenameDocument" responses: "201": description: "Renamed: the commit." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ModuleRenameDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or no module `from` (for an actor who edits and reads all of every language; anyone else gets the 403 a hidden one would)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`lock-required`: the change set does not hold a lock the rename needs (`meta.subject`). `id-taken`: a module has the new ID (`meta.moduleId`). `uncommitted-working-copies`: subjects it touches have working copies (`meta.subjects`). `translation-at-provider`: blocks of the module are in an open translation job (`meta.langs`). `branch-moved`, `working-copy-changed`: the branch or a working copy moved while committing, twice (try again). `invalid-state`: the change set is no draft (`meta.state`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-id`: `from` or `to` is no module ID, or they are the same (`meta.member`). `too-many-changes`: more files than one commit changes (`meta.max`). `not-renamable`: a file to move is not UTF-8 text (`meta.path`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: a transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written to the database, but the Git commit may have landed on the branch already (recorded by the next save point or reconciler pass as a save point). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Change a module’s ID tags: - working copies x-required-permission: content.edit /change-sets/{changeSetId}/module-references/{moduleId}: get: description: "What renaming the module would touch at the change set’s branch head: the languages it has a file in and every other module (per language) and manual whose module references, cross-references or entries name it, and every other module deprecated in favour of it (`replacedBy`), with those that have a working copy in the change set. Checked as the rename is (the author only, a draft only, one 403 when any of it lies outside the actor’s scope). Needs the `content.edit` permission." operationId: ModuleRenames_references parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: moduleId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: battery-charging - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: The module’s languages and the files naming it. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ModuleReferencesDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or no module with this ID (for an actor who edits and reads all of every language; anyone else gets the 403 a hidden one would)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state`: the change set is no draft (`meta.state`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: a transaction waited too long for a row held elsewhere, or a statement ran too long; nothing of it was written to the database, but the Git commit may have landed on the branch already (recorded by the next save point or reconciler pass as a save point). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: What renaming a module would touch tags: - working copies x-required-permission: content.edit /translations/status: get: description: "First one `TranslationStatus` (`kind` `config`) per target language for the project labels (#731: the labels in `openfolia.yaml`; every reader of the ref reads them in every language; `filter[manual]` keeps them, `filter[folder]` not; none while no label has text); then one (`kind` `design`) per page design with region text and target language (#568; designs carry no audience: every reader of the ref reads them in every language; `filter[manual]` keeps the manual's design, `filter[folder]` none), by name; then one (`kind` `manual`) per manual and target language the reader reads it in (#656, #731: its title, its groups’ titles and its cover images’ alternative text; `filter[manual]` keeps that manual's, `filter[folder]` none), by title; then one per source module (as the reader sees it in the source language) and target language the reader would see a translation in, at `?ref=`: `up-to-date`, `outdated` (with `meta.outdatedBlocks`), `missing` or `at-provider`. Filtered before paging, so `meta.page.total` counts only what the reader may see. Ordered by source title, module ID and the configured order of target languages. Source files that cannot be read are left out. Needs `translation.manage` or `content.read.draft` (in any scope), on top of reading content (`content.read`); what it lists is limited by the reader’s scope, its languages included." operationId: Translations_list parameters: - name: page[by] required: false in: query description: "What `page[size]`, `meta.page.total` and the pages count: `status` (the default), one `TranslationStatus` each; or `row` (#689), one row of the module × language matrix each (a module, a page design, a manual or the project labels), with every status the row has on the page, however many languages that is (at most `page[size]` × the target languages)." schema: type: string enum: - status - row - name: filter[lang] required: false in: query description: Only this target language; one that is not a target language matches nothing. schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ - name: filter[manual] required: false in: query description: Only the modules this manual includes, also through module references, as the reader reads it, its page design, its own text, and the project labels (its title page shows them); a manual the reader may not see matches nothing. schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ - name: filter[folder] required: false in: query description: "Only the modules in a folder of the content browser: `` (a module type) or `/` (and a value of the first configured facet). No page design, no manual and no project labels." schema: type: string maxLength: 200 pattern: ^[^/]+(?:\/[^/]+)?$ - name: filter[state] required: false in: query description: "Only this state: `up-to-date`, `outdated`, `missing`, `at-provider`." schema: type: string enum: - up-to-date - outdated - missing - at-provider - name: filter[q] required: false in: query description: Only modules whose source title or ID (page designs whose name or ID, manuals whose source title or ID; the project labels for text in `Project labels` or `config.project`, e.g. `labels` or `config`) contains this text, case and diacritics aside; 1 to 200 characters after trimming. schema: type: string minLength: 1 maxLength: 200 - name: filter[kind] required: false in: query description: "Only `module` rows, only `design` rows (a page design’s region text, #568), only `manual` rows (a manual’s own text: its title, its groups’ titles, #731, and its cover images’ alternative text, #656), or only the `config` row (the project labels in `openfolia.yaml`, #731)." schema: type: string enum: - module - design - manual - config - name: filter[module] required: false in: query description: "Only these source modules, comma-separated (`a,b,c`), 1 to 200 module IDs (#694): a content list reads the states of the modules on its page, with `page[by]=row` and a `page[size]` of at least their number (paged by status, the default, a page holds at most `page[size]` statuses: one per ID and target language). No page design, no manual and no project labels. An ID that names no source module the reader sees matches nothing, like a module that does not exist." schema: type: string maxLength: 20200 - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationStatusPageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List translation status tags: - translations x-required-permission: translation.manage /translations/status/{lang}/config/project: get: description: "The project labels (#731: module types’, audiences’, facets’ and their values’, variant attributes’ and their values’, text attributes’, safety symbols’ and callout styles’ labels in `openfolia.yaml`) in one target language, with every unit’s state in `meta.blocks` (`moduleTypes.`, `facets..`, …). Not found when the language is no target language or there is no label to translate. Needs `translation.manage` or `content.read.draft` (in any scope), on top of reading content (`content.read`); what it lists is limited by the reader’s scope, its languages included." operationId: Translations_readConfig parameters: - name: lang required: true in: path schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ example: de - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationStatusDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read the project labels’ translation status tags: - translations x-required-permission: translation.manage /translations/status/{lang}/designs/{designId}: get: description: A page design’s region text (#568) in one target language, with every unit’s state in `meta.blocks` (`.`). Not found when the language is no target language, there is no such design (or it cannot be read), or it has no region text. Needs `translation.manage` or `content.read.draft` (in any scope), on top of reading content (`content.read`); what it lists is limited by the reader’s scope, its languages included. operationId: Translations_readDesign parameters: - name: lang required: true in: path schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ example: de - name: designId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: product-line - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationStatusDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a page design’s translation status tags: - translations x-required-permission: translation.manage /translations/status/{lang}/manuals/{manualId}: get: description: "A manual’s own text (its title and its groups’ titles, #731; its cover images’ alternative text, #656) in one target language, with every unit’s state in `meta.blocks` (`title`, `group.`, `coverImage.default`, `coverImage.variant-`). Not found when the language is no target language, there is no such manual for the reader (or its manifest cannot be read), or they do not read it in that language. Needs `translation.manage` or `content.read.draft` (in any scope), on top of reading content (`content.read`); what it lists is limited by the reader’s scope, its languages included." operationId: Translations_readManual parameters: - name: lang required: true in: path schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ example: de - name: manualId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: operating-manual - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationStatusDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a manual’s own translation status tags: - translations x-required-permission: translation.manage /translations/status/{lang}/{moduleId}: get: description: One source module in one target language, with every translatable block’s state in `meta.blocks`. Not found, exactly like a module that does not exist, when the language is no target language, the module is not there for the reader in the source language, or the reader would not see a translation in that language. Needs `translation.manage` or `content.read.draft` (in any scope), on top of reading content (`content.read`); what it lists is limited by the reader’s scope, its languages included. operationId: Translations_read parameters: - name: lang required: true in: path schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ example: de - name: moduleId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: battery-charging - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationStatusDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a translation status tags: - translations x-required-permission: translation.manage /translations/exports: post: description: "Works out, per target language, the blocks of the subject’s modules at `ref` (default `main`) that need translating (`outdated` or `missing` in the translation status, and not at a provider in an open job), and records them as a translation job, `sent`: they are `at-provider` from then on, and `GET /translations/exports/{jobId}/file` gives the XLIFF. A module reached through several module references is sent once. A module counts in a language only where you read it (your `content.read` scope), would see a translation in that language and hold `translation.manage` on it there. Answers the job with its counts in `meta` (modules, units, words; per language in `meta.languages`), 201 with `Location`. With `meta.dryRun`: the same answer (200, `meta.dryRun: true`), nothing recorded. Records a `translation-job.export` audit event. Needs `translation.manage` and `content.read`." operationId: TranslationJobs_create parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateTranslationExportDocument" responses: "200": description: "A dry run: what would be sent." content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationJobDocument" "201": headers: Location: description: The new job. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationJobDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no such ref that you may read." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`export-conflict`: another export sent some of these blocks meanwhile; try again (it leaves them out)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-parameter` (`source.pointer` at the language): a language that is no configured target language, or one you do not manage translations into; checked before any module is read. `nothing-to-translate`: every block is up to date or at a provider in these languages, or there is no module you may send. `too-many-units`: more than 20,000 units (`meta.units`, `meta.max`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Export translations (delta) tags: - translations x-required-permission: translation.manage get: description: The translation jobs, newest first. A job is there for its exporter, and for whoever holds `translation.manage` for each of its target languages and `content.read` for its source and target languages, in roles whose scope restricts nothing but languages (so neither its subject nor its counts tell of content outside their scope); a job exported from a ref that was not released (its ref and commit are drafts) only for holders of `content.read.draft`, and for anyone but its exporter only where `content.read.draft` covers those languages in the same way. To anyone else it is not found. Needs `translation.manage`. operationId: TranslationJobs_list parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationJobPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List translation jobs tags: - translations x-required-permission: translation.manage /translations/exports/{jobId}: get: description: One translation job with its counts. A job is there for its exporter, and for whoever holds `translation.manage` for each of its target languages and `content.read` for its source and target languages, in roles whose scope restricts nothing but languages (so neither its subject nor its counts tell of content outside their scope); a job exported from a ref that was not released (its ref and commit are drafts) only for holders of `content.read.draft`, and for anyone but its exporter only where `content.read.draft` covers those languages in the same way. To anyone else it is not found. Needs `translation.manage`. operationId: TranslationJobs_get parameters: - name: jobId required: true in: path description: The translation job’s ID (a UUID). One that names no job, malformed or not, or a job in a language you do not manage, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationJobDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no such job for you." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a translation job tags: - translations x-required-permission: translation.manage /translations/exports/{jobId}/cancel: post: description: "Cancels a `sent` job: its units are no longer `at-provider`, so the next export sends them again. Answers the job, `cancelled`. Records a `translation-job.cancel` audit event. A job is there for its exporter, and for whoever holds `translation.manage` for each of its target languages and `content.read` for its source and target languages, in roles whose scope restricts nothing but languages (so neither its subject nor its counts tell of content outside their scope); a job exported from a ref that was not released (its ref and commit are drafts) only for holders of `content.read.draft`, and for anyone but its exporter only where `content.read.draft` covers those languages in the same way. To anyone else it is not found. Needs `translation.manage`." operationId: TranslationJobs_cancel parameters: - name: jobId required: true in: path description: The translation job’s ID (a UUID). One that names no job, malformed or not, or a job in a language you do not manage, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationJobDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no such job for you." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`job-not-open`: the job is returned or cancelled already (`meta.state`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Cancel a translation job tags: - translations x-required-permission: translation.manage /translations/exports/{jobId}/file: get: description: "The job as XLIFF 2.0 (core): with `lang`, that language’s document (`application/xliff+xml`); without, a ZIP with one per language (`translation--.xlf`). Always `Content-Disposition: attachment`. One `` per module, one `` per block sent (its `ccms:sourceHash` says what it was made from), inline marks as `` and `` (`packages/xliff`). Made again on every request from the job’s commit and units, as you may read the content there now: modules outside your scope are left out. The commit opens as released content when it was released when exported; else it needs `content.read.draft`. A job is there for its exporter, and for whoever holds `translation.manage` for each of its target languages and `content.read` for its source and target languages, in roles whose scope restricts nothing but languages (so neither its subject nor its counts tell of content outside their scope); a job exported from a ref that was not released (its ref and commit are drafts) only for holders of `content.read.draft`, and for anyone but its exporter only where `content.read.draft` covers those languages in the same way. To anyone else it is not found. Needs `translation.manage` and `content.read`." operationId: TranslationJobFile_file parameters: - name: jobId required: true in: path description: The translation job’s ID (a UUID). One that names no job, malformed or not, or a job in a language you do not manage, is 404. schema: type: string format: uuid - name: lang required: false in: query description: One language of the job; without it, a ZIP of every one. schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: The XLIFF document, or a ZIP of them. content: application/xliff+xml: schema: type: string format: binary application/zip: schema: type: string format: binary headers: Content-Disposition: description: "`attachment` with the file name." schema: type: string "400": description: "A malformed language, or an unsupported query parameter. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no such job for you, a language not in it, or nothing of it left that you may read." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Download a translation job’s XLIFF tags: - translations x-required-permission: translation.manage /translations/exports/{jobId}/package: get: description: "The job as a COTI level 1 package for a translation management system (`application/zip`, `_translation-.coti`, `Content-Disposition: attachment`): one translation project per target language, in a folder `-__`, each with its `COTI.xml` (`package-id` the job, `project-id` `-`, the export's time as `checkout-date`, the job's due day as `due-date`, languages as `-` codes, `status=\"none\"`) and the job's XLIFF in `translation files/`, exactly as `GET /translations/exports/{jobId}/file` gives it. A returned package is imported with `POST /translations/imports`. A job is there for its exporter, and for whoever holds `translation.manage` for each of its target languages and `content.read` for its source and target languages, in roles whose scope restricts nothing but languages (so neither its subject nor its counts tell of content outside their scope); a job exported from a ref that was not released (its ref and commit are drafts) only for holders of `content.read.draft`, and for anyone but its exporter only where `content.read.draft` covers those languages in the same way. To anyone else it is not found. Needs `translation.manage` and `content.read`." operationId: TranslationJobFile_package parameters: - name: jobId required: true in: path description: The translation job’s ID (a UUID). One that names no job, malformed or not, or a job in a language you do not manage, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: The package. content: application/zip: schema: type: string format: binary headers: Content-Disposition: description: "`attachment` with the file name." schema: type: string "400": description: "An unsupported query parameter. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no such job for you, or nothing of it left that you may read." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`job-not-open`: the job was cancelled." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Download a translation job as a COTI package tags: - translations x-required-permission: translation.manage /manuals/{id}/checks: get: description: "Blocking issues and warnings found in a manual at `?ref=`, each at its module (in one language) and block, or at the manual: the manifest’s validation issues, every published variant resolved in every language the reader may read it in (missing modules, translations and text or variant attributes, cross-references, module reference cycles), and the checks of every module it includes (validation, module references, images the blob store does not hold), and, unless `pdf.standard` is `none`, each variant’s PDF in each language rendered to check PDF/UA-1 (`pdf-accessibility`, `pdf-not-checked`), and, with a page design, what its layout cannot fit (`page-design-overflow`, `running-head-truncated`), and, with a callout legend beside an image, a legend cut off at the image’s height (`callout-label-overflow`, whatever `pdf.standard`), and, with a page design, a safety message taller than a page, broken across pages (`safety-message-split`). Only what the reader may see: nothing about a module they may not see is listed or counted. Ordered by subject (the manual, then modules by language and ID), then by where the block is. Derived on every request; depends on the blob store too, so never `immutable`." operationId: ManualChecks_list parameters: - name: id required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: operating - name: filter[severity] required: false in: query description: "Only checks of this severity: `blocking` or `warning`." schema: type: string enum: - blocking - warning - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/CheckPageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: The PDF renderer is busy or the server is shutting down (the checks render each PDF to check PDF/UA-1); `Retry-After` says when to try again. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Check a manual tags: - checks x-required-permission: content.read /change-sets/{changeSetId}/checks: get: description: "Blocking issues and warnings in what a change set changes, at its head (the review head once submitted, else its branch’s head): each changed module there (validation, module and cross-references, images the blob store does not hold, missing translations of a source-language module, and a `module-cycle` at each of its module references that leads back to it, whether or not a manual includes it), each changed manual there (as `GET /manuals/{id}/checks`), and the manuals and modules there that still refer to a module it removed. Read as the reader may read the head: nothing about a module they may not see is listed or counted, so a cycle through one is not reported to them. The change set is found as `GET /change-sets/{changeSetId}` finds it. Needs the `content.read` permission." operationId: ChangeSetChecks_list parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: filter[severity] required: false in: query description: "Only checks of this severity: `blocking` or `warning`." schema: type: string enum: - blocking - warning - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/CheckPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no change set with this ID, or a commit of it the reader may not open." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`branch-missing`: the change set’s branch is gone." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`too-many-changes`: more than 10000 files differ; `invalid-content`: the configuration at a side cannot be read." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "The PDF renderer is busy (`renderer-busy`: the checks render each PDF to check PDF/UA-1), too many checks are cutting the chunks of a whole commit (`chunk-sets-busy`, #710), or the server is shutting down; `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Check a change set tags: - checks x-required-permission: content.read /translations/imports: post: description: "Reads an uploaded XLIFF 2.0 document of a translation job (`GET /translations/exports/{jobId}/file`, translated), or a ZIP of them (one per target language), or a COTI level 1 package a translation management system returned (`GET /translations/exports/{jobId}/package`: each project’s `COTI.xml` names the job, its `package-id`, and the XLIFF files to read; nothing else in it is read), and decides each unit against what the job sent (read at its commit, as you read it there) and the base branch `baseRef` (default the server's default branch), as you see it: `ok`, `source-changed`, `broken-markup` (its `` and `` do not match its source: missing, extra, reordered across nesting, unknown IDs; refused alone, never the whole file), `unknown-block`, `unknown-module`, `outside-scope` (`meta.report`, one page per `page[number]` and `page[size]`, with the counts in `meta.counts`). The XML is read strictly: no DTD and no entities but the predefined ones, bounded in length, depth and nodes. **Nothing is written**: the documents and the report are kept for an hour (`attributes.expiresAt`), in the server's memory, so the import can be applied (`POST /translations/imports/{importId}/apply`). Send `multipart/form-data` (with `X-Ccms-Request`) with the file in the part `file` (at most `CCMS_MAX_UPLOAD_BYTES`) and the optional fields `dryRun` (`true`, the only value) and `baseRef`. Needs `translation.manage` for each document's target language." operationId: TranslationImports_create parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-Request in: header description: "Required (any non-empty value) with a body of type multipart/form-data: a cross-site form cannot send it. Not needed with application/vnd.api+json." required: false schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: multipart/form-data: schema: type: object required: - file properties: file: type: string format: binary description: An XLIFF 2.0 document, a ZIP of them, or a COTI package. dryRun: type: string enum: - "true" baseRef: type: string responses: "201": description: Checked and kept, to be applied within the hour. headers: Location: description: The import. schema: type: string content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationImportDocument" "400": description: "`invalid-body`: no file part named `file`, a field the form does not have or twice, `dryRun` other than `true`, a malformed or cut-off form. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: no `translation.manage`, or not for a document’s target language. `forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`unknown-job`: the documents name no translation job you may see (their `ccms:job`), as reading that job would be." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`job-not-open`: the job was cancelled (`meta.state`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "415": description: "`unsupported-media-type`: not `multipart/form-data`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`too-large` (the upload, or the XLIFF in a ZIP together, past `CCMS_MAX_UPLOAD_BYTES`; `meta.max`), `invalid-archive` (a ZIP read unsafely: `meta.reason`), `no-xliff` (a ZIP without an `.xlf` or `.xliff` file), `xliff-unsupported-encoding` (not UTF-8), `xliff-dtd-forbidden` (a ``, so a DTD or an entity declaration, internal or external; or a reference to an entity but XML’s five predefined ones: nothing is ever fetched or expanded), `xliff-not-well-formed`, `xliff-too-large`, `xliff-too-deep` (elements nest more than 64 deep), `xliff-too-many-nodes`, `xliff-too-many-attributes`, `not-xliff` (no XLIFF 2.0 document), `invalid-xliff` (no `srcLang` or `trgLang`, a `` or `` without an `id`, one twice); `meta.path` names the file in a ZIP. `duplicate-language`: two documents into one language. `mixed-jobs`: documents of different jobs. `language-mismatch`: a document’s languages are not its job’s (`meta.lang`). `invalid-base`: no branch `baseRef` you may know of. A COTI package (#140): `invalid-coti` (`meta.reason`, `meta.path`: a `COTI.xml` refused as an XLIFF would be, or no COTI document, two in one folder, no job named, a listed translation file missing, listed twice or no XLIFF), `coti-job-mismatch` (an XLIFF’s `ccms:job` is not its package’s job), `language-mismatch` (an XLIFF’s languages are not its project’s)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`import-busy`: the server checks other translation imports now; `too-many-imports`: it keeps as many as it holds. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Validate a translation import tags: - translations x-required-permission: translation.manage /translations/imports/{importId}: get: description: A translation import you uploaded, with one page of its report (`meta.report`, per module and target language; `filter[state]` for the units in one state) and its counts; once applied, its change set (`relationships.changeSet`) and commit (`meta.commit`), and the report as it was applied. Needs `translation.manage`. operationId: TranslationImports_get parameters: - name: importId required: true in: path description: The translation import’s ID (a UUID). One that names no stored import, malformed or not, someone else’s or one removed after it expired, is 404. schema: type: string format: uuid - name: filter[state] required: false in: query description: Only the units in this state (`ok`, `source-changed`, `broken-markup`, `unknown-block`, `unknown-module`, `outside-scope`), and the modules with one; before paging. `meta.counts` stays the whole report’s. schema: type: string enum: - ok - source-changed - broken-markup - unknown-block - unknown-module - outside-scope - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationImportDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no stored translation import with this ID that you uploaded (one is kept an hour after its upload, in the memory of the server that checked it)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a translation import tags: - translations x-required-permission: translation.manage /translations/imports/{importId}/apply: post: description: "Checks the stored documents again against the base as it is now, then, as you, through the change-set actions: starts a change set (named after the job, from the import’s base), locks each target module, writes each as a working copy with its units merged in by block ID (a block the target lacks comes from the source’s structure; image and attachment references, variant conditions and IDs of the target stay), and makes one save point with the working copies and each module’s translation record (the source hash each unit was exported from). Imported: `ok` units, and `source-changed` ones unless `meta.decisions` says `skip` (`keep` is the default; they stay `outdated`). In the save point’s transaction the job’s units imported become `returned` (the job too once none is left at the provider), with one `translation.import` audit event and a `translation.imported` outbox row (webhooks, notifications). The change set then goes through review like any other. Takes no body, or `{ meta: { decisions } }` (send `Content-Type: application/vnd.api+json`). A failure abandons the change set (nothing is committed) and leaves the import `validated`. Only the import’s uploader, once, within the hour. Needs `translation.manage`, and `content.edit` with the scope of every module written (as saving it would)." operationId: TranslationImports_apply parameters: - name: importId required: true in: path description: The translation import’s ID (a UUID). One that names no stored import, malformed or not, someone else’s or one removed after it expired, is 404. schema: type: string format: uuid - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/ApplyTranslationImportDocument" responses: "200": description: "Applied: the import with its change set and commit." content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationImportDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: no `content.edit`, or a module outside your scope (one answer whatever the reason). `forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no stored translation import with this ID that you uploaded (one is kept an hour after its upload, in the memory of the server that checked it)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state`: being applied, or applied already (`meta.state`). `job-not-open`: the job was cancelled since. `locked`: another change set holds a target module’s lock. `source-moved`: a source module is gone from the base. Any answer of the change-set actions (`branch-moved`, `working-copy-changed`, `lock-contended`, …)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`nothing-to-import`: no unit can be imported now. `unreadable-translation`: a target file cannot be read (`meta.lang`, `meta.moduleId`). `invalid-working-copy`: what the merge makes is not valid content. Any refusal of the validation, should the base or your roles have changed since." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`import-busy`: the server checks or applies other translation imports now. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Apply a translation import tags: - translations x-required-permission: translation.manage /translations/mark-current: post: description: "For a source fix that needs no new translation: in a draft change set of yours, the translation record of the module in `lang` takes the source’s current hash for every block the translation has (the branch head as `sourceCommit`), without changing the translated text, so they are `up-to-date` once merged. Through the change-set actions: takes the module’s lock (in `lang`) for the change set, then a save point writing only the record, with a `translation.mark-current` audit event. Needs `translation.manage` on the module in `lang`, and `content.edit` with its scope. With `designId` or `manualId` instead (#656), a page design’s region text or a manual’s own text (its cover images’ alternative text) is marked current the same way: their record is part of their file, so the save point holds a working copy of it with only the record changed. A design needs `translation.manage` restricted by nothing but languages and unrestricted `content.edit`; a manual `translation.manage` over its audience in `lang` and the right to change its manifest. With `config: true` instead (#731), the project labels in `openfolia.yaml` the same way (the configuration’s lock and a working copy of it): it needs `translation.manage` restricted by nothing but languages and the right to change the configuration (unrestricted `content.edit` and `admin.roles`)." operationId: TranslationImports_markAsCurrent parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/MarkCurrentDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationMarkCurrentDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: |- `forbidden`: no `translation.manage` on the module in `lang`, no `content.edit` on it, or not your change set. `forbidden`: the actor lacks the `translation.manage` permission. Or: Demo mode: `X-Ccms-User` names no user. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no such change set or source module for you." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state`: the change set is no draft. `locked`: another change set holds the module’s lock. `uncommitted-working-copies`: the change set has a working copy of the module; commit or discard it first." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-parameter`: `lang` is no target language. `translation-missing`: no translation of the module in `lang` (no text of the design, the manual or any project label of its own in `lang`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Mark a translation as current tags: - translations x-required-permission: translation.manage /reports/translations: get: description: "One `TranslationCoverage` per manual the reader may see and target language they may read it in, at `?ref=`: how many of the modules it includes (also through module references) are up to date, outdated, at a provider or missing in that language, and how many of their blocks. A module counts exactly where `GET /translations/status` lists it (so `filter[manual]`, `filter[lang]` and `filter[kind]=module` there list the modules counted here; beside them, `meta.design`, `meta.cover` and `meta.labels` count the units of the manual's page design's region text (#656), of its own text (its title, its groups' titles, #731, and its cover images' alternative text, #656) and of the project labels (#731), as the status lists them with `filter[kind]=design`, `filter[kind]=manual` and `filter[kind]=config`); nothing outside the reader’s scope is named or counted. Ordered by the manual’s title, its ID and the configured order of target languages; a manifest that cannot be read is left out. Paged; `GET /reports/translations/csv` downloads all of it. Needs `content.read.draft` (in any scope), on top of reading content (`content.read`); what it names and counts is limited by the reader’s scope, its languages included." operationId: Reports_listTranslations parameters: - name: filter[manual] required: false in: query description: Only this manual; one the reader may not see (or that does not exist) matches nothing. schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ - name: filter[lang] required: false in: query description: Only this target language; one that is not a target language matches nothing. schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/TranslationCoveragePageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read.draft` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Report translation coverage tags: - reports x-required-permission: content.read.draft /reports/module-usage: get: description: "One `ModuleUsage` per module the reader may see in some language, at `?ref=`, from the module index: how many manuals include it (directly or through module references) and how many modules refer to it, with `meta.usedIn`. Only manuals and modules the reader may see are named or counted, and a manual counts through module references only where the reader may see every module on the way. A module file that cannot be read is left out. Filtered and sorted before paging, so `meta.page.total` counts what is listed; `GET /reports/module-usage/csv` downloads all of it. Needs `content.read.draft` (in any scope), on top of reading content (`content.read`); what it names and counts is limited by the reader’s scope, its languages included." operationId: Reports_listModuleUsage parameters: - name: filter[unused] required: false in: query description: "`true`: only modules no manual includes, directly or through module references (a module only other modules refer to is unused if none of them is in a manual); `false`: only modules some manual includes." schema: type: string enum: - "true" - "false" - name: filter[type] required: false in: query description: Only modules of this module type; one the configuration does not know matches nothing. schema: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ - name: sort required: false in: query description: "Comma-separated fields (`id`, `title`, `type`, `manuals`, `modules`, `usage`; `manuals` and `modules` are the use counts, `usage` their sum), each `-`-prefixed for descending, each at most once; ties by title, then ID. Default: `title`." schema: type: string - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ModuleUsagePageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read.draft` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Report module usage tags: - reports x-required-permission: content.read.draft /reports/translations/csv: get: description: "One `TranslationCoverage` per manual the reader may see and target language they may read it in, at `?ref=`: how many of the modules it includes (also through module references) are up to date, outdated, at a provider or missing in that language, and how many of their blocks. A module counts exactly where `GET /translations/status` lists it (so `filter[manual]`, `filter[lang]` and `filter[kind]=module` there list the modules counted here; beside them, `meta.design`, `meta.cover` and `meta.labels` count the units of the manual's page design's region text (#656), of its own text (its title, its groups' titles, #731, and its cover images' alternative text, #656) and of the project labels (#731), as the status lists them with `filter[kind]=design`, `filter[kind]=manual` and `filter[kind]=config`); nothing outside the reader’s scope is named or counted. Ordered by the manual’s title, its ID and the configured order of target languages; a manifest that cannot be read is left out. A download (`Content-Disposition: attachment`, `nosniff`): CSV (RFC 4180, a header row, lines ending in CRLF; a value a spreadsheet would run as a formula starts with `'`). The whole report, unpaged; `X-Ccms-Rows` says how many rows follow the header. Columns: `manual`, `title`, `language`, `deprecated`, `modules`, `modules up to date`, `modules outdated`, `modules at provider`, `modules missing`, `percent up to date`, `blocks`, `blocks up to date`, `blocks outdated`, `blocks at provider`, `blocks missing`, `percent blocks up to date`, `design units`, `design units up to date`, `design units outdated`, `design units at provider`, `design units missing`, `cover units`, `cover units up to date`, `cover units outdated`, `cover units at provider`, `cover units missing`, `label units`, `label units up to date`, `label units outdated`, `label units at provider`, `label units missing` (percentages in whole percent, rounded down). Needs `content.read.draft` (in any scope), on top of reading content (`content.read`); what it names and counts is limited by the reader’s scope, its languages included." operationId: ReportCsv_translationsCsv parameters: - name: filter[manual] required: false in: query description: Only this manual; one the reader may not see (or that does not exist) matches nothing. schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ - name: filter[lang] required: false in: query description: Only this target language; one that is not a target language matches nothing. schema: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: The CSV file. content: text/csv: schema: type: string headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string X-Ccms-Rows: description: How many rows the file holds after its header. schema: type: integer "304": description: The `If-None-Match` ETag is still current. "400": description: "`invalid-parameter`: a malformed filter; `unsupported-parameter` for any other query parameter. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read.draft` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Download translation coverage as CSV tags: - reports x-required-permission: content.read.draft /reports/module-usage/csv: get: description: "One `ModuleUsage` per module the reader may see in some language, at `?ref=`, from the module index: how many manuals include it (directly or through module references) and how many modules refer to it, with `meta.usedIn`. Only manuals and modules the reader may see are named or counted, and a manual counts through module references only where the reader may see every module on the way. A module file that cannot be read is left out. A download (`Content-Disposition: attachment`, `nosniff`): CSV (RFC 4180, a header row, lines ending in CRLF; a value a spreadsheet would run as a formula starts with `'`). The whole report, unpaged; `X-Ccms-Rows` says how many rows follow the header. Columns: `module`, `title`, `type`, `deprecated`, `languages`, `manuals`, `modules`, `used in manuals`, `used in modules`; the manuals and modules using a module are their IDs, one per line in their cell, all of them. Sorted as `sort` says: Comma-separated fields (`id`, `title`, `type`, `manuals`, `modules`, `usage`; `manuals` and `modules` are the use counts, `usage` their sum), each `-`-prefixed for descending, each at most once; ties by title, then ID. Default: `title`. Needs `content.read.draft` (in any scope), on top of reading content (`content.read`); what it names and counts is limited by the reader’s scope, its languages included." operationId: ReportCsv_moduleUsageCsv parameters: - name: filter[unused] required: false in: query description: "`true`: only modules no manual includes, directly or through module references (a module only other modules refer to is unused if none of them is in a manual); `false`: only modules some manual includes." schema: type: string enum: - "true" - "false" - name: filter[type] required: false in: query description: Only modules of this module type; one the configuration does not know matches nothing. schema: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ - name: sort required: true in: query schema: type: string - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: The CSV file. content: text/csv: schema: type: string headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string X-Ccms-Rows: description: How many rows the file holds after its header. schema: type: integer "304": description: The `If-None-Match` ETag is still current. "400": description: "`invalid-parameter`: a malformed filter or sort; `unsupported-parameter` for any other query parameter. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read.draft` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Download module usage as CSV tags: - reports x-required-permission: content.read.draft /page-designs: get: description: "The page designs at `?ref=` (`design/.yaml`), by ID, each with the problems found checking it against the configuration. A file in `design/` that is no design is listed too (`UnreadablePageDesignResource`, with `meta.error`). A manual naming no design (and a configuration naming none as `pdf.design`) gets the built-in design, which is no file and not listed. Designs carry no audience: every reader of the ref reads them." operationId: PageDesigns_list parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/PageDesignPageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List page designs tags: - page-designs x-required-permission: content.read /page-designs/{designId}: get: description: One page design at `?ref=`, with the problems found checking it against the configuration and its assets (logo, fonts, cover images) against the blob store, else the repository’s older layout (`assets/` at that commit). A file that is no design is 422 `invalid-content`. operationId: PageDesigns_read parameters: - name: designId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: product-line - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/PageDesignDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a page design tags: - page-designs x-required-permission: content.read /page-design-templates: get: description: 'The own Typst templates at `?ref=` a page design can name as its `template` (#396): every folder `templates//` with a `manual.typ`, by ID; with `workingCopy=true` (the change set’s author) also one whose `manual.typ` only a working copy holds. Only the listing is read. Templates carry no audience: every reader of the ref learns of them. Their contract and the example template: the user guide, "Own templates".' operationId: PageDesignTemplates_list parameters: - name: workingCopy required: false in: query description: "For authors (left out of the delivery document): true reads the change set’s working copies (what its editor autosaved, not committed yet) in place of their files, modules and manuals alike; module references resolve to their own working copies where there are any; an image uploaded into the change set links to `GET /change-sets/{changeSetId}/assets/{hash}` in an HTML page, and the PDF shows it. Needs `ref` to name the change set’s branch (`change-sets/`; else 400 `invalid-parameter`) and only for its author: 403 for anyone else who may read drafts, 404 for anyone who may not. `private, no-cache`, without the commit’s ETag. Default: false." schema: type: string enum: - "true" - "false" default: "false" - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/PageDesignTemplatePageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List page design templates tags: - page-designs x-required-permission: content.read /page-design-templates/{templateId}/files: get: description: "The regular files of the template’s folder (`templates//`) at `?ref=`, by path (#396): its size, and whether the template screen edits it as text. With `workingCopy=true` (the change set’s author), files its working copies hold stand in for theirs (`meta.draft`), and files only a working copy holds are listed too. Only the listing is read. Templates carry no audience: every reader of the ref reads them." operationId: PageDesignTemplates_files parameters: - name: templateId required: true in: path description: The template’s folder name (`templates//`). schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: house - name: workingCopy required: false in: query description: "For authors (left out of the delivery document): true reads the change set’s working copies (what its editor autosaved, not committed yet) in place of their files, modules and manuals alike; module references resolve to their own working copies where there are any; an image uploaded into the change set links to `GET /change-sets/{changeSetId}/assets/{hash}` in an HTML page, and the PDF shows it. Needs `ref` to name the change set’s branch (`change-sets/`; else 400 `invalid-parameter`) and only for its author: 403 for anyone else who may read drafts, 404 for anyone who may not. `private, no-cache`, without the commit’s ETag. Default: false." schema: type: string enum: - "true" - "false" default: "false" - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/PageDesignTemplateFilePageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: the folder holds no file (nor a working copy of one)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List a page design template’s files tags: - page-designs x-required-permission: content.read /page-design-templates/{templateId}/file: get: description: One text file of the template’s folder at `?ref=` by its path in it (#396), as committed; with `workingCopy=true` (the change set’s author) the working copy’s text in its place. To change it, save a working copy in a change set (`PUT /change-sets/{changeSetId}/page-design-templates/{templateId}/files/working-copy?path=`). Every reader of the ref reads it. operationId: PageDesignTemplates_file parameters: - name: templateId required: true in: path description: The template’s folder name (`templates//`). schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: house - name: path required: true in: query description: The file’s path in the template’s folder. One that is no template text file’s (a name starting with `.`, a path leaving the folder, an image) is 404. schema: type: string maxLength: 1000 example: manual.typ - name: workingCopy required: false in: query description: "For authors (left out of the delivery document): true reads the change set’s working copies (what its editor autosaved, not committed yet) in place of their files, modules and manuals alike; module references resolve to their own working copies where there are any; an image uploaded into the change set links to `GET /change-sets/{changeSetId}/assets/{hash}` in an HTML page, and the PDF shows it. Needs `ref` to name the change set’s branch (`change-sets/`; else 400 `invalid-parameter`) and only for its author: 403 for anyone else who may read drafts, 404 for anyone who may not. `private, no-cache`, without the commit’s ETag. Default: false." schema: type: string enum: - "true" - "false" default: "false" - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/PageDesignTemplateFileTextDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no such text file in the template (or none that is UTF-8 text)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read a page design template’s text file tags: - page-designs x-required-permission: content.read /page-design-templates/{templateId}/preview/pages/{page}.png: get: description: "One page of a small manual that uses every function of the template contract (running text with each inline mark, every safety severity and admonition, steps, a list, a table, a section, an FAQ entry), laid out with the template `templateId` at `?ref=` (#396), as PNG: the template screen’s live preview. With `workingCopy=true` (the change set’s author) the working copies of the template’s files stand in for theirs. `?design=` lays it out with that page design’s settings (its colours, fonts, logo, regions); the built-in design’s by default. The template compiles in the renderer’s sandbox (its own folder’s files and the design’s files only, nothing of the host or the network, within the time and memory limits). Sent with `nosniff` and a sandboxing `Content-Security-Policy`." operationId: PageDesignTemplatePreview_page parameters: - name: templateId required: true in: path description: The template’s folder name (`templates//`). schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: house - name: page required: true in: path description: The page, from 1 (the title page) to 9999. schema: type: string pattern: ^[1-9][0-9]{0,3}$ example: "1" - name: width required: false in: query description: The image’s width in pixels (16–2400, default 480); the height follows the page. schema: type: string pattern: ^[0-9]{1,4}$ - name: design required: false in: query description: "The page design (`design/.yaml` at `ref`, its working copy with `workingCopy=true`) whose settings lay the probe out; the template replaces its own. Default: the built-in design." schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ - name: workingCopy required: false in: query description: "For authors (left out of the delivery document): true reads the change set’s working copies (what its editor autosaved, not committed yet) in place of their files, modules and manuals alike; module references resolve to their own working copies where there are any; an image uploaded into the change set links to `GET /change-sets/{changeSetId}/assets/{hash}` in an HTML page, and the PDF shows it. Needs `ref` to name the change set’s branch (`change-sets/`; else 400 `invalid-parameter`) and only for its author: 403 for anyone else who may read drafts, 404 for anyone who may not. `private, no-cache`, without the commit’s ETag. Default: false." schema: type: string enum: - "true" - "false" default: "false" - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: The page as PNG. content: image/png: schema: type: string format: binary "304": description: The `If-None-Match` ETag is still current. "400": description: "Malformed template ID, page, width or design. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: the template has no `manual.typ`, the design is not there, or the page is past the last (`meta.pages` says how many there are)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`template-error`: the template does not compile, does not finish in time, exhausts the memory limit, or its folder is past the caps (200 files, 16 MiB); `meta.problems` has each problem’s `file` (its repository path), `line` and `column` (1-based; 0: no place), `message` and `trace`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: The renderer is busy or the server is shutting down; `Retry-After` says when to try again. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Preview a page design template as a page image tags: - page-designs x-required-permission: content.read /page-design-template-example/files: get: description: "The renderer’s example template (#396), each file with its text, by path: the files a new own template starts from (`templates//`, saved as working copies), which lay a manual out as the classic layout does. Nothing of the content repository is read. Empty when the server’s renderer has no own templates." operationId: PageDesignTemplateExample_files parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/PageDesignTemplateFileTextPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List the example page design template’s files tags: - page-designs x-required-permission: content.read /variants: get: description: "The variant attributes of the project configuration at `?ref=`, in their configured order: an enum attribute with its values, a version attribute (compared numerically) without. What a variant picker offers; conditions name them by `id`." operationId: Variants_list parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/VariantAttributePageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List variant attributes tags: - variants x-required-permission: content.read /variants/matches: get: description: "Every variant combination a manual the reader may see lists (`variants:` in its manifest) that the condition holds for, in the order `GET /manuals` lists the manuals, then in the manifest’s order: `meta.page.total` is the number of builds it appears in. Evaluated as a manual is resolved: versions compare numerically (`2.10 > 2.9`, `2.3 = 2.3.0`), and a test on an attribute a combination does not set does not hold, not even negated. Manuals outside the reader’s scope are never named nor counted; one whose manifest cannot be read lists none." operationId: Variants_matches parameters: - name: when required: true in: query description: "A condition, as a variant block's `when=\"…\"` writes it in AsciiDoc: `model in (large, small)`, `software >= 2.3` (`<`, `<=`, `>`, `>=` on version attributes), `!(…)`, `&&` (binds tighter) and `||`, parentheses; a value that is not letters, digits, `.`, `_` and `-` in single quotes. At most 1000 characters." schema: type: string maxLength: 1000 example: model in (large) && software >= 2.3 - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/VariantBuildPageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "`invalid-parameter` (`source.parameter`: `when`): no condition, or one that does not parse; `detail` is the parser’s message. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`unknown-variant`: the condition names an attribute or value the configuration does not hold, compares an enum attribute, or compares a version attribute with something that is not a version (`software >= abc`); one error per problem, `meta.issue` its validation code. (`invalid-content` for a broken file, as on every content route.)" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Builds a condition holds for tags: - variants x-required-permission: content.read /variants/{attributeId}/usages: get: description: "The manuals (variant combinations, conditions of entries and text attributes) and then the modules (variant blocks, in any language: `languages`) that name the attribute, or with `filter[value]` that value of it, at `?ref=`, each by title, then ID: what the variants admin lists before a value is archived or removed (`meta.page.total` counts them). Read from the module index, so only what the reader may see is listed or counted. Not checked against the configuration: a value it no longer holds is still found where content names it. The builds a value appears in are `GET /variants/matches`." operationId: Variants_usages parameters: - name: attributeId required: true in: path schema: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ example: model - name: filter[value] required: false in: query description: Only where this value of the attribute is named (an enum attribute’s value ID); without it, where the attribute is named at all, by any value or comparison. schema: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: ref required: false in: query description: "Branch, tag or commit ID to read from. Default: the server's `CCMS_DEFAULT_REF`." schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: X-Ccms-Commit: description: The commit the response was read from. schema: type: string X-Ccms-Withdrawn: description: "`true` when `?ref=` names the tag of a withdrawn release (as `refs/tags/`, or `` when no branch has that name): the read still works, but the release was taken back. Who, when and why: `meta.withdrawal` of the tag in `GET /refs`, or `attributes.withdrawal` of the release in `GET /releases`. Absent otherwise." schema: type: string ETag: description: Changes with the commit, with what the reader may see and when the release whose tag is read is withdrawn. schema: type: string Cache-Control: description: "`immutable` when `?ref=` was a commit ID, except on routes whose answer also depends on refs (a module’s status): `no-cache` there." schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/VariantUsePageDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "`invalid-parameter`: `attributeId` or `filter[value]` is no configuration key. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.read` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: unknown ref, or no such item at that ref. `change-set-branch-missing`: `ref` is the branch of a change set the reader may see, and that branch is gone from the content repository (`meta.branch`; the change set says so in `meta.branchMissing`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-content`: a file needed for the answer is broken; the error's `meta.path` names it. `table-too-large`: a module file holds a table of more than 1,000 columns or 50,000 cells (rows × columns), or tables of more than 1,000,000 cells together, so it is not read (`meta.path`; `meta.columns`, `meta.cells`, `meta.totalCells`: the caps)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Where a variant attribute or value is used tags: - variants x-required-permission: content.read /me/notifications: get: description: "Your inbox, newest first: what concerns you (a change set to review, yours returned, approved, signed off or merged, your locks broken, your import done or failed, a release’s output failing, a major release of a manual you read), never what you caused yourself. `meta.unreadCount` counts your unread ones whatever the filter. Only your own notifications: nobody reads or marks another person’s. A service (the API token) has none. Any actor; no permission needed." operationId: Notifications_list parameters: - name: filter[unread] required: false in: query description: "`true`: only unread notifications; `false`: only read ones. Left out: all." schema: type: string enum: - "true" - "false" - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/NotificationPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List your notifications tags: - notifications /me/notifications/unread-count: get: description: "For the bell: how many of your notifications are unread, and your newest one’s ID. Cheap, for polling: send the `ETag` back as `If-None-Match`, and while nothing changed the answer is 304 without a body. Only your own notifications: nobody reads or marks another person’s. A service (the API token) has none. Any actor; no permission needed." operationId: Notifications_unreadCount parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": headers: ETag: description: Changes when the count or your newest notification does; for `If-None-Match`. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/UnreadCountDocument" "304": description: The `If-None-Match` ETag is still current. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Count your unread notifications tags: - notifications /me/notifications/{notificationId}: get: description: "Another person’s is 404, exactly like one that does not exist. Only your own notifications: nobody reads or marks another person’s. A service (the API token) has none. Any actor; no permission needed." operationId: Notifications_get parameters: - name: notificationId required: true in: path description: The notification’s ID (a positive whole number). One that is not yours, malformed or not, is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/NotificationDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no notification of yours with this ID (another person’s is answered alike)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read one of your notifications tags: - notifications /me/notifications/read: post: description: "`{ meta: { ids: [...] } }` marks those (1 to 200), `{ meta: { all: true } }` all of yours. One already read keeps when it was read. Answers how many were marked and how many are still unread. Only your own notifications: nobody reads or marks another person’s. A service (the API token) has none. Any actor; no permission needed." operationId: Notifications_read parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/MarkReadDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/MarkReadResultDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: an ID names no notification of yours (another person’s is answered alike); nothing was marked." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long for a row held elsewhere, or a statement ran too long; nothing was marked. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Mark your notifications read tags: - notifications /outbox/status: get: description: Whether the consumers of the outbox (notifications, webhooks, the change feed) read on. One whose position, or an outbox row, lay past every transaction of this database (restored from another server) is held and delivers nothing, so that nothing is skipped, until the operator runs the recipe in `backend/api/README.md`, "Outbox", "After a restore". Names only. Needs the `admin.roles` permission. operationId: OutboxStatus_status parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/OutboxStatusDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Outbox consumers tags: - jobs x-required-permission: admin.roles /me/preferences: get: description: "Whether the editor shows you tips and the first-run tour, the tips you closed and whether you finished the tour; the defaults (tips on, none closed, the tour to come) until you change one. A service reads the defaults. Only your own: nobody reads or changes another person’s. Any person; no permission needed." operationId: Preferences_read parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/PreferencesDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read your preferences tags: - preferences patch: description: "What is left out stays; `dismissedTips` replaces the whole list. Applies at once and is not audited (it changes nothing anyone else sees). Only your own: nobody reads or changes another person’s. Any person; no permission needed." operationId: Preferences_update parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/UpdatePreferencesDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/PreferencesDocument" "400": description: "The body is not a preferences document (an unknown preference, a malformed tip ID, more than 500 tips). Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: a service has no preferences to change. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`id-mismatch`: `data.id` is given and is not your user ID." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Change your preferences tags: - preferences /style-review: get: description: Whether this server has a model-based style review (`attributes.configured`), so a client offers it only where it works; it says nothing else about the endpoint or the model. Needs the `content.edit` permission, as a review does. operationId: StyleReview_status parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/StyleReviewStatusDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Whether the style review is set up tags: - style review x-required-permission: content.edit /change-sets/{changeSetId}/modules/{lang}/{moduleId}/style-review: post: description: "Asks the configured language model for style and consistency suggestions on one module of a change set: its working copy, else the file committed on its branch. **Off by default**: without a configured endpoint (`CCMS_STYLE_REVIEW_URL`) it is 404 `not-configured` and nothing is sent anywhere. **What is sent:** only the module’s translatable text (each block’s own text as plain text, by block ID) and the style guide in `openfolia.yaml` (`styleGuide`): no metadata, no comments, no other module. Nothing is stored; one `module.style-review` audit event records who asked, for which module, the outcome and how many suggestions (never the text). The suggestions are advice: each one names a block, a part and a range of its text; one that does not fit the module’s text is dropped (`meta.dropped`). Only the change set’s author, within their reading scope, as the working copy is read (403 for anyone else who holds `content.read.draft`; for anyone else another author’s change set is 404, exactly like a missing one). No body. Needs the `content.edit` permission (and `content.read`, which reading the module needs)." operationId: StyleReview_review parameters: - name: changeSetId required: true in: path description: The change set’s ID (a UUID). One that names no change set, malformed or not, is 404. schema: type: string format: uuid - name: lang required: true in: path description: A language with subtags of 2 to 8 characters (`en`, `pt-BR`); any case. One that is not is 404. schema: example: en type: string - name: moduleId required: true in: path schema: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ example: battery-charging - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/StyleReviewRequestDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/StyleReviewDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `content.edit` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-configured`: no model endpoint is set up on this server. `not-found`: no change set with this ID, or neither a working copy nor a committed file of the module the reader may see." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`too-large`: the module’s text and the style guide are more than `meta.max` characters." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "429": description: "`rate-limited`: more reviews this minute than `CCMS_STYLE_REVIEW_PER_MINUTE` allows the caller; `Retry-After` (and `meta.retryAfter`) says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`style-review-timeout`: the model took longer than `CCMS_STYLE_REVIEW_TIMEOUT_MS`. `style-review-unavailable`: the endpoint failed or answered with something other than suggestions. `style-review-busy`: too many reviews at once on this server. Each with `Retry-After`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Review a module’s style with a model tags: - style review x-required-permission: content.edit /importers: get: description: 'The installed importers, by ID: `bundle`, the documented import format itself (`@openfolia/content-model`, "Import format"), and any other installed behind the `Importer` port. `meta.optionsSchema` is what each takes as `options` in the upload form, as JSON Schema; `meta.maxBytes` the largest upload (`CCMS_IMPORT_MAX_BYTES`). Needs the `admin.roles` permission.' operationId: Importers_list parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ImporterPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: List the importers tags: - imports x-required-permission: admin.roles /imports: post: description: "Runs the importer on the uploaded file, then the import format's validator against the configuration at `baseRef` (default the server's default branch), the module and manual IDs there and the files already stored that you may read (used at `baseRef` as you see it, or uploaded into a change set of yours; any other reference not carried in the bundle is `missing-asset`, whether or not it is stored), and decides each item: `create`, `update` (an existing module or manual, only with `updateExisting`), `skip` (exists already; a file no written module uses) or `refuse` (an error, outside your scope, a file the asset rules refuse), with reasons; the report is in `meta.report`, with the counts, the converter's own report and the `passthrough` counts. **`dryRun=true`**: 200, nothing is stored (no blob, no row, no change set, no Git object). Otherwise 201: the upload and the report are kept for an hour (`attributes.expiresAt`) so the import can be applied (`POST /imports/:importId/apply`). Send `multipart/form-data` (with `X-Ccms-Request`) with the file in the part `file` (at most `CCMS_IMPORT_MAX_BYTES`) and the optional fields `importer` (default `bundle`), `options` (a JSON object, the importer's `meta.optionsSchema`), `updateExisting` and `dryRun` (`true` or `false`, default `false`) and `baseRef`. A ZIP is read safely: a path leaving its folder, an absolute one, links, the same path twice, more than `CCMS_IMPORT_MAX_FILES` entries, more than `CCMS_IMPORT_MAX_UNPACKED_BYTES` unpacked, deeper than `CCMS_IMPORT_MAX_PATH_DEPTH` folders, encryption, ZIP64 or a file holding more than it declares is 422 `invalid-archive` (`meta.reason`). Needs the `admin.roles` permission, and `content.edit` and `content.read` (each item is checked against your scope as saving it would be)." operationId: Imports_create parameters: - name: X-Ccms-Request in: header description: "Required (any non-empty value) with a body of type multipart/form-data: a cross-site form cannot send it. Not needed with application/vnd.api+json." required: false schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: multipart/form-data: schema: type: object required: - file properties: file: type: string format: binary importer: type: string default: bundle options: type: string description: "A JSON object: the importer’s options." updateExisting: type: string enum: - "true" - "false" dryRun: type: string enum: - "true" - "false" baseRef: type: string responses: "200": description: "A dry run: the report; nothing stored." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ImportDocument" "201": description: Stored with its report, to be applied within the hour. headers: Location: description: The import. schema: type: string content: application/vnd.api+json: schema: $ref: "#/components/schemas/ImportDocument" "400": description: "`invalid-body`: no file part named `file`, a field the form does not have or twice, a field that is not what it says (`source.parameter`), or the form is malformed or cut off. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "415": description: "`unsupported-media-type`: not `multipart/form-data`." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-archive`: the file is no ZIP the importer reads safely (`meta.reason`: `not-a-zip`, `corrupt`, `unsafe-path`, `path-too-deep`, `duplicate-path`, `link`, `too-many-files`, `too-large`, `encrypted`, `zip64`, `multi-disk`, `unsupported-compression`); `too-large`: the upload is larger than `CCMS_IMPORT_MAX_BYTES` (`meta.max`); `unknown-importer` (`meta.importers`); `invalid-options` (one error per problem, `source.pointer`); `invalid-base`: no branch `baseRef` to import into." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`import-busy`: the server checks other imports now; `blob-store-unavailable`; `upload-interrupted`: the same file was removed while it was stored (upload again). `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Check an import (a dry run, or stored to apply) tags: - imports x-required-permission: admin.roles /imports/{importId}: get: description: "A stored import you uploaded: its report (`meta.report`), its state and, while and after it is applied, its progress (`meta.progress`: the files uploaded, the modules and manuals committed, the save points) and the change set it writes into (`relationships.changeSet`); `meta.failure` says why it failed. Kept for an hour after its upload, or after its job ended. Needs the `admin.roles` permission." operationId: Imports_get parameters: - name: importId required: true in: path description: The import’s ID (a UUID). One that names no stored import, malformed or not, someone else’s or one removed after it expired, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/ImportDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no stored import with this ID that you uploaded (a dry run is never stored; a stored one is removed an hour after its upload or its end)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Read an import tags: - imports x-required-permission: admin.roles /imports/{importId}/apply: post: description: "Starts writing a validated import into a new change set (named after it), as you, in a background job: the job checks it again against `baseRef` as it is then (a report that would now differ fails it: `import-outdated`), creates the change set, uploads the files (the image and attachment upload path, with its type and size rules), writes the modules and then the manuals as working copies with their locks, and makes save points within `CCMS_IMPORT_COMMIT_FILES` files and `CCMS_IMPORT_COMMIT_BYTES` each (at most a save point's 1,000 files and 32 MiB), so a large import becomes several commits on one change set. Every step goes through the change-set actions an editor's would, with their checks. Follow it with `GET /imports/:importId` (`meta.progress`); its end is one `import.apply` audit event with the counts. Takes no body (send `Content-Type: application/vnd.api+json`), or `{ \"meta\": { \"skipRefused\": true } }`: an import whose report refuses items is then applied without them, only when `meta.report.applicableWithoutRefused` holds (the bundle without them decides every other item as the report does). Exactly the refused items are left out, and nothing else changes; the change set's description and every commit message list them with why, and the job checks again that the rest still stands. Without it, an import with a refused item is refused. Only the import's uploader, within the hour. Needs the `admin.roles` permission, and `content.edit` and `content.read` (each item is checked against your scope as saving it would be)." operationId: Imports_apply parameters: - name: importId required: true in: path description: The import’s ID (a UUID). One that names no stored import, malformed or not, someone else’s or one removed after it expired, is 404. schema: type: string format: uuid - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/ApplyImportDocument" responses: "202": description: "Applying: its job is queued." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ImportDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `admin.roles` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no stored import with this ID that you uploaded (a dry run is never stored; a stored one is removed an hour after its upload or its end)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`invalid-state`: it is not `validated` (being applied, or done already; `meta.state`). `import-expired`: uploaded more than an hour ago." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`import-not-applicable`: its report refuses something or writes nothing; `meta.skipRefused` says whether applying it with `skipRefused` would leave the refused items out and apply the rest." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Apply an import tags: - imports x-required-permission: admin.roles /webhooks: get: description: Every subscriber the caller sees, oldest first, paused and disabled ones too; never a secret. `meta.headerLimits` holds the custom headers’ limits. Only its owner, or a manager whose reading scope covers any owner of one with its events, sees a webhook; to anyone else it does not exist (404, left out of lists). Needs `webhook.manage`. operationId: Webhooks_list parameters: - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/WebhookPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `webhook.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Webhooks tags: - webhooks x-required-permission: webhook.manage post: description: "A URL, the events to send it, a description, an optional audience limit (`maxAudience`) and custom headers (`headers`; a secret one's value is stored sealed and never shown again); active at once. Owned by the caller: it is sent only events about content they may read. Answers its signing secret **once**, in `meta.secret`; only a sealed copy is stored. At most 100 webhooks. Recorded as `webhook.create` (its host, events and the custom headers' names, never a value). Needs `webhook.manage`, and is recorded in the audit log (never a secret, never the URL’s path or query)." operationId: Webhooks_create parameters: - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/CreateWebhookDocument" responses: "201": headers: Location: description: The new webhook. schema: type: string description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/WebhookWithSecretDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `webhook.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no webhook with this ID. `not-configured`: webhooks are off on this server (no secret key: `CCMS_SECRET_KEY` unset and `CCMS_SECRET_KEY_GENERATE=false`), for the routes that make a secret." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`too-many-webhooks`: there are 100 already (`meta.max`)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-url`: not a URL deliveries may go to (`meta.problem`: `not-a-url`, `scheme` (not https), `credentials` (a user name or password in it), `fragment`, `too-long`, `blocked-address` (a private, loopback, link-local or otherwise non-public address, or `localhost`)). The custom headers cannot be used: one error per problem, each with its own `code` and `source.pointer`: `header-name-invalid` (not an RFC 9110 token), `header-name-refused` (a name the server sets or that would break the delivery), `header-name-duplicate`, `header-value-invalid` (a line break, another control character or text outside ASCII), `header-value-required` (a header that is not secret, a new secret one, or every secret one when the URL changes), `too-many-headers` (more than 20), `headers-too-large` (more than 8,192 characters)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Add a webhook tags: - webhooks x-required-permission: webhook.manage /webhooks/{webhookId}: get: description: Never its secret. Only its owner, or a manager whose reading scope covers any owner of one with its events, sees a webhook; to anyone else it does not exist (404, left out of lists). Needs `webhook.manage`. operationId: Webhooks_one parameters: - name: webhookId required: true in: path description: The webhook’s ID (a UUID). One that names no webhook is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/WebhookDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `webhook.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no webhook with this ID. `not-configured`: webhooks are off on this server (no secret key: `CCMS_SECRET_KEY` unset and `CCMS_SECRET_KEY_GENERATE=false`), for the routes that make a secret." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: A webhook tags: - webhooks x-required-permission: webhook.manage patch: description: "Its URL, events, description, audience limit or custom headers (`headers`, all of them: a secret one given without a value keeps its stored value, except when the URL changes: a secret is never sent to a receiver it was not given for); `active: false` pauses it and `active: true` resumes it (also one disabled for failing). What is left out stays, the secret too. Whoever points it at another URL becomes its owner: it is then sent what they may read, and the deliveries still waiting, made for the old owner, are skipped. Someone else changes its custom headers only with a reading scope that restricts nothing (403 `forbidden`), and its URL, events or audience limit only with a reading scope covering any owner of one with the old and the new events (403 `forbidden`); changing only its events keeps the owner. The secret stays: a new owner rotates it. Recorded as `webhook.update` (the fields changed; the custom headers changed by name). Needs `webhook.manage`, and is recorded in the audit log (never a secret, never the URL’s path or query)." operationId: Webhooks_update parameters: - name: webhookId required: true in: path description: The webhook’s ID (a UUID). One that names no webhook is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string requestBody: required: true content: application/vnd.api+json: schema: $ref: "#/components/schemas/UpdateWebhookDocument" responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/WebhookDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `webhook.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no webhook with this ID. `not-configured`: webhooks are off on this server (no secret key: `CCMS_SECRET_KEY` unset and `CCMS_SECRET_KEY_GENERATE=false`), for the routes that make a secret." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`id-mismatch`: `data.id` is not the path’s." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "422": description: "`invalid-url`: not a URL deliveries may go to (`meta.problem`: `not-a-url`, `scheme` (not https), `credentials` (a user name or password in it), `fragment`, `too-long`, `blocked-address` (a private, loopback, link-local or otherwise non-public address, or `localhost`)). The custom headers cannot be used: one error per problem, each with its own `code` and `source.pointer`: `header-name-invalid` (not an RFC 9110 token), `header-name-refused` (a name the server sets or that would break the delivery), `header-name-duplicate`, `header-value-invalid` (a line break, another control character or text outside ASCII), `header-value-required` (a header that is not secret, a new secret one, or every secret one when the URL changes), `too-many-headers` (more than 20), `headers-too-large` (more than 8,192 characters)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Change a webhook tags: - webhooks x-required-permission: webhook.manage delete: description: With its delivery log; deliveries still waiting are not sent. Recorded as `webhook.delete`. Needs `webhook.manage`, and is recorded in the audit log (never a secret, never the URL’s path or query). operationId: Webhooks_delete parameters: - name: webhookId required: true in: path description: The webhook’s ID (a UUID). One that names no webhook is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "204": description: Deleted. "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `webhook.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no webhook with this ID. `not-configured`: webhooks are off on this server (no secret key: `CCMS_SECRET_KEY` unset and `CCMS_SECRET_KEY_GENERATE=false`), for the routes that make a secret." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Delete a webhook tags: - webhooks x-required-permission: webhook.manage /webhooks/{webhookId}/secret: post: description: A new signing secret, answered **once** in `meta.secret`. The one before keeps signing beside it for a day (a second `v1` in `X-Ccms-Signature`, `meta.previousSecretUntil`), so the receiver can switch over without missing a delivery. Only its owner, or a manager whose reading scope covers any owner of any webhook, may rotate it (403 `forbidden`). No body. Recorded as `webhook.rotate-secret`. Needs `webhook.manage`, and is recorded in the audit log (never a secret, never the URL’s path or query). operationId: Webhooks_rotate parameters: - name: webhookId required: true in: path description: The webhook’s ID (a UUID). One that names no webhook is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/WebhookWithSecretDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `webhook.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no webhook with this ID. `not-configured`: webhooks are off on this server (no secret key: `CCMS_SECRET_KEY` unset and `CCMS_SECRET_KEY_GENERATE=false`), for the routes that make a secret." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Rotate a webhook’s secret tags: - webhooks x-required-permission: webhook.manage /webhooks/{webhookId}/deliveries: get: description: "Its delivery log, newest first: each event sent, its body, status, attempts and the last attempt’s status code or error. Never a signature or secret. Settled deliveries are kept for `CCMS_WEBHOOKS_KEEP_DAYS` days. A body is null for a reader who may not see what the owner it was made for may. Needs `webhook.manage`." operationId: Webhooks_deliveries parameters: - name: webhookId required: true in: path description: The webhook’s ID (a UUID). One that names no webhook is 404. schema: type: string - name: filter[status] required: false in: query description: "`pending`, `succeeded`, `failed` or `skipped`." schema: type: string enum: - pending - succeeded - failed - skipped - name: filter[event] required: false in: query description: Only deliveries of this event. schema: type: string enum: - manual.released - module.released - module.deprecated - manual.deprecated - release.withdrawn - translation.imported - ping - name: page[number] required: false in: query description: "Page to return, from 1. Default: 1." schema: type: integer minimum: 1 - name: page[size] required: false in: query description: "Resources per page. Default: 50, at most 200." schema: type: integer minimum: 1 maximum: 200 - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/WebhookDeliveryPageDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `webhook.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no webhook with this ID. `not-configured`: webhooks are off on this server (no secret key: `CCMS_SECRET_KEY` unset and `CCMS_SECRET_KEY_GENERATE=false`), for the routes that make a secret." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: A webhook’s deliveries tags: - webhooks x-required-permission: webhook.manage /webhooks/{webhookId}/test: post: description: 'Sends a signed `ping` event at once (`{ type: "ping", idempotencyKey, occurredAt, data: { webhookId } }`) and answers its delivery with the result (`status` `succeeded` or `failed`, `lastStatusCode`, `lastError`); it is in the log too. Sent as every delivery is (the address checked after resolving the host, the signature, no redirect, the timeout), also to a paused or disabled webhook, once: never retried, and never counted toward turning it off. While the receiver has an attempt in flight, waits after a failure, or its owner has as many in flight as allowed, it is 429 `rate-limited` with `Retry-After`, and nothing is sent. No body. Recorded as `webhook.test`. Needs `webhook.manage`, and is recorded in the audit log (never a secret, never the URL’s path or query).' operationId: Webhooks_test parameters: - name: webhookId required: true in: path description: The webhook’s ID (a UUID). One that names no webhook is 404. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/WebhookDeliveryDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `webhook.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no webhook with this ID. `not-configured`: webhooks are off on this server (no secret key: `CCMS_SECRET_KEY` unset and `CCMS_SECRET_KEY_GENERATE=false`), for the routes that make a secret." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "429": description: "`rate-limited`: the receiver is busy or waits after a failed attempt; `Retry-After` (and `meta.retryAfter`) says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Send a webhook a test event tags: - webhooks x-required-permission: webhook.manage /webhooks/{webhookId}/deliveries/{deliveryId}/retry: post: description: Puts a `failed` delivery back to `pending` and sends it again with a full set of attempts, by the same rules as every delivery; its attempts so far stay counted. Only one of a webhook that is active, still sent its event and owned by whom it was made for. Answers the delivery. No body. Recorded as `webhook.retry`. Needs `webhook.manage`, and is recorded in the audit log (never a secret, never the URL’s path or query). operationId: Webhooks_retry parameters: - name: webhookId required: true in: path description: The webhook’s ID (a UUID). One that names no webhook is 404. schema: type: string - name: deliveryId required: true in: path description: The delivery’s ID (a UUID), of this webhook. schema: type: string - name: X-Ccms-User in: header required: false description: "Demo mode only (`CCMS_AUTH_MODE=demo`): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400)." schema: type: string responses: "200": description: "" content: application/vnd.api+json: schema: $ref: "#/components/schemas/WebhookDeliveryDocument" "400": description: "A query parameter the route does not support, or a malformed one. Or: `X-Ccms-User` sent while demo mode is off." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "401": description: Missing or wrong API token. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "403": description: "`forbidden`: the actor lacks the `webhook.manage` permission. Or: Demo mode: `X-Ccms-User` names no user." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "404": description: "`not-found`: no webhook with this ID. `not-configured`: webhooks are off on this server (no secret key: `CCMS_SECRET_KEY` unset and `CCMS_SECRET_KEY_GENERATE=false`), for the routes that make a secret." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "406": description: The `Accept` header rules out `application/vnd.api+json`. content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "409": description: "`not-retryable` (`meta.reason`): `status` (not `failed`, or being sent again already), `test-event` (send another), `inactive` (paused or disabled: resume it first), `owner-changed` (made for an earlier owner), `audience-changed` (made under another audience limit) or `not-subscribed` (the webhook is no longer sent its event)." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" "503": description: "`database-timeout`: the transaction waited too long; nothing of it was written. `Retry-After` says when to try again." content: application/vnd.api+json: schema: $ref: "#/components/schemas/ErrorDocument" summary: Send a failed delivery again tags: - webhooks x-required-permission: webhook.manage info: title: Management API description: |- Read access to a content repository: modules, manuals, resolved manuals, PDFs and images. JSON responses follow [JSON:API](https://jsonapi.org/format/) (`application/vnd.api+json`): resources are `{ type, id, attributes, relationships, meta }`; `attributes` hold stored data, `meta` what the server derives from it (validation issues, summaries). Lists take `page[number]` and `page[size]` and `filter[…]` where documented; other query parameters are rejected. Errors are `{ errors: [{ status, title, detail, code, source?, meta? }] }` on every route, binary ones included. Every route except `/health` and this reference needs `Authorization: Bearer `. A service account token (`ccms_sat_…`) acts as that service account, with its roles; the shared token (`CCMS_API_TOKEN`, only for local use and demo mode) acts as a read-only service, and in demo mode `X-Ccms-User` picks a seeded user to act as instead (`GET /me` shows who). Every content route reads at `?ref=` (a branch, tag or commit ID) and reports the commit it used in `X-Ccms-Commit`. Responses for a commit ID never change and are marked immutable; others revalidate with `ETag`. version: "0.1" contact: {} tags: [] servers: - url: http://localhost:3000 description: The API this reference describes (DOCS_API_BASE_URL); set the address of your own server. components: securitySchemes: bearer: scheme: bearer bearerFormat: JWT type: http description: A service account's token (`ccms_sat_…`, issued by `POST /service-accounts/{id}/tokens`), or, for local use and demo mode, the server's shared `CCMS_API_TOKEN`. schemas: SecretKeyDocument: type: object properties: data: $ref: "#/components/schemas/SecretKeyResource" required: - data additionalProperties: false SecretKeyResource: type: object properties: type: type: string enum: - SecretKey id: type: string attributes: type: object properties: origin: type: string enum: - file - environment - none description: "Where the instance secret key comes from: `file`, the key file (made by the server on its first start, or put there by the operator); `environment`, a variable the operator set; `none`, no key (generation turned off and none set): webhooks are off." file: nullable: true description: "The key file’s path on the server, for `file` (back it up: without it, stored secrets cannot be read); else null." type: string variable: nullable: true description: The variable that sets the key, for `environment` (`CCMS_WEBHOOKS_SECRET_KEY` is its old name, deprecated); else null. type: string enum: - CCMS_SECRET_KEY - CCMS_WEBHOOKS_SECRET_KEY generate: type: boolean description: Whether the server makes the key file on its first start when there is none (`CCMS_SECRET_KEY_GENERATE`). required: - origin - file - variable - generate additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is always `instance`. Never the key itself." ErrorDocument: type: object properties: errors: minItems: 1 type: array items: $ref: "#/components/schemas/ErrorObject" required: - errors additionalProperties: false ErrorObject: type: object properties: status: type: string description: The HTTP status code, as a string. title: type: string description: The HTTP status text. detail: type: string description: What went wrong, for people. code: type: string description: Stable machine-readable code, e.g. `invalid-content`. source: type: object properties: parameter: description: The query or path parameter at fault. type: string header: description: The request header at fault. type: string pointer: description: "JSON pointer to the request body member at fault; for working copies being committed, into the working copy: `/module//` or `/manual/`, then `/blocks/` when a block is at fault." type: string additionalProperties: false meta: description: Details, e.g. `path` (the repository file at fault), `retryAfter` (seconds) or `diagnostics` (PDF compiler messages). type: object additionalProperties: {} required: - status - title - detail - code additionalProperties: false JobsStatusDocument: type: object properties: data: $ref: "#/components/schemas/JobsStatusResource" required: - data additionalProperties: false JobsStatusResource: type: object properties: type: type: string enum: - JobsStatus id: type: string attributes: type: object properties: consumers: type: integer minimum: 0 maximum: 9007199254740991 description: Processes consuming jobs (`CCMS_ROLE` `worker` or `all`) heard from in the last 60 seconds. lastConsumedAt: nullable: true description: When any of them last claimed or ran a job; null when none has (for a day). type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ ready: type: integer minimum: 0 maximum: 9007199254740991 description: Jobs due and waiting to be claimed. running: type: integer minimum: 0 maximum: 9007199254740991 description: Attempts running now. oldestReadyAt: nullable: true description: Since when the longest-waiting due job is due; null when none waits. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - consumers - lastConsumedAt - ready - running - oldestReadyAt additionalProperties: false meta: type: object properties: checkedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: The database’s time of the reading. lagSeconds: type: integer minimum: 0 maximum: 9007199254740991 description: How long the longest-waiting due job has waited, in seconds (0 when none waits). level: type: string enum: - ok - warning description: "`warning` when due jobs have waited 5 minutes or more and no consumer has claimed or run one for as long: no worker takes them." stallSeconds: type: integer minimum: 0 maximum: 9007199254740991 description: The wait from which `level` can be `warning`. required: - checkedAt - lagSeconds - level - stallSeconds additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is always `jobs`." StorageUsageDocument: type: object properties: data: $ref: "#/components/schemas/StorageUsageResource" required: - data additionalProperties: false StorageUsageResource: type: object properties: type: type: string enum: - StorageUsage id: type: string attributes: type: object properties: media: description: Uploaded images and attachments in the blob store (renditions and import bundles are not counted). Counts towards the limit. allOf: - $ref: "#/components/schemas/StorageCategory" archivedPdfs: description: The release outputs archived in the blob store (the render cache is not counted). Counts towards the limit. allOf: - $ref: "#/components/schemas/StorageCategory" gitContent: type: object properties: bytes: nullable: true type: integer minimum: 0 maximum: 9007199254740991 required: - bytes additionalProperties: false description: The content repository on disk, as of the last recount; for information, never counted towards the limit. Null when not known. database: type: object properties: bytes: nullable: true type: integer minimum: 0 maximum: 9007199254740991 required: - bytes additionalProperties: false description: The database, as of the last recount; for information, never counted towards the limit. Null when not known. limitBytes: nullable: true description: "The storage limit (`CCMS_STORAGE_LIMIT_BYTES`) of media and archived PDFs together; null: none." type: integer minimum: 0 exclusiveMinimum: true maximum: 9007199254740991 recountedAt: nullable: true description: "When the totals were last counted afresh; between recounts they move with every upload and delete. Null: not yet." type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - media - archivedPdfs - gitContent - database - limitBytes - recountedAt additionalProperties: false meta: type: object properties: usedBytes: type: integer minimum: 0 maximum: 9007199254740991 description: "What counts towards the limit: media and archived PDFs." usedShare: nullable: true description: "`usedBytes` as a share of the limit (1 is full); null without a limit." type: number minimum: 0 level: type: string enum: - unlimited - ok - warning - reached description: "`unlimited` without a limit; `warning` from 80 % of it on; `reached` at the limit, where uploads are refused (409 `storage-limit-reached`)." warnAt: type: number description: The share of the limit from which `level` is `warning`. required: - usedBytes - usedShare - level - warnAt additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is always `instance`." StorageCategory: type: object properties: bytes: type: integer minimum: 0 maximum: 9007199254740991 description: The bytes it holds. files: type: integer minimum: 0 maximum: 9007199254740991 description: The files it holds, each stored once. required: - bytes - files additionalProperties: false StoredFilePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/StoredFileResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false StoredFileResource: type: object properties: type: type: string enum: - StoredFile id: type: string attributes: type: object properties: reference: type: string pattern: ^sha256:[0-9a-f]{64}$ description: "`sha256:`, as a module refers to it." size: type: integer minimum: 0 maximum: 9007199254740991 description: Its length in bytes. contentType: type: string description: The first upload’s type. fileName: nullable: true description: The first upload’s file name that has one; null for none. type: string lastUploadedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: The latest upload of it, into any change set. required: - reference - size - contentType - fileName - lastUploadedAt additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is the file’s SHA-256." PageMeta: type: object properties: currentPage: type: integer minimum: -9007199254740991 maximum: 9007199254740991 lastPage: type: integer minimum: -9007199254740991 maximum: 9007199254740991 perPage: type: integer minimum: -9007199254740991 maximum: 9007199254740991 total: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Resources across all pages. required: - currentPage - lastPage - perPage - total additionalProperties: false PageLinks: type: object properties: self: type: string first: type: string last: type: string prev: nullable: true type: string next: nullable: true type: string required: - self - first - last - prev - next additionalProperties: false AuditEventPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/AuditEventResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false AuditEventResource: type: object properties: type: type: string enum: - AuditEvent id: type: string attributes: $ref: "#/components/schemas/AuditEventAttributes" required: - type - id - attributes additionalProperties: false description: "`id` increases in the order events were inserted, which is not always commit order: not a cursor for following the log." AuditEventAttributes: type: object properties: at: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: When the change was made (its transaction began). actor: type: object properties: kind: type: string enum: - user - service id: type: string minLength: 1 maxLength: 200 required: - kind - id additionalProperties: false description: Who made it. action: type: string maxLength: 100 pattern: ^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+$ description: What happened, e.g. `role.assign`. subject: type: object properties: type: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ id: type: string minLength: 1 maxLength: 500 required: - type - id additionalProperties: false description: 'What it happened to, e.g. `{ type: "role", id: "author" }`.' comment: nullable: true description: Why, in the actor’s words. type: string data: type: object additionalProperties: {} description: The change’s details; their shape depends on `action`. required: - at - actor - action - subject - comment - data additionalProperties: false BackupSettingsDocument: type: object properties: data: $ref: "#/components/schemas/BackupSettingsResource" required: - data additionalProperties: false BackupSettingsResource: type: object properties: type: type: string enum: - BackupSettings id: type: string attributes: type: object properties: enabled: type: boolean description: Whether scheduled backups run. frequency: oneOf: - type: object properties: kind: type: string enum: - daily required: - kind additionalProperties: false - type: object properties: kind: type: string enum: - weekly weekday: type: integer minimum: 0 maximum: 6 required: - kind - weekday additionalProperties: false - type: object properties: kind: type: string enum: - hours every: type: integer minimum: 1 maximum: 23 required: - kind - every additionalProperties: false - type: object properties: kind: type: string enum: - cron expression: type: string minLength: 1 maxLength: 200 required: - kind - expression additionalProperties: false description: "`daily`; `weekly` with `weekday` (0 Sunday … 6 Saturday); `hours` with `every` (1–23, from the set time each day); or `cron` with a five-field `expression` (minute hour day month weekday), read in the time zone." time: type: string pattern: ^([01][0-9]|2[0-3]):[0-5][0-9]$ description: The time of day (HH:MM) in `timeZone`. timeZone: type: string description: The instance’s time zone for backups (an IANA name). retention: type: object properties: daily: type: integer minimum: 0 maximum: 366 weekly: type: integer minimum: 0 maximum: 520 monthly: type: integer minimum: 0 maximum: 1200 required: - daily - weekly - monthly additionalProperties: false description: How many daily, weekly and monthly backups are kept (the newest of each day, ISO week and month); the newest backup is always kept. location: oneOf: - type: object properties: kind: type: string enum: - local subfolder: type: string description: A folder inside the backup volume (`/backups` in the backup service), `/`-separated; empty for the volume itself. Never an absolute path or `..`. required: - kind - subfolder additionalProperties: false - type: object properties: kind: type: string enum: - s3 endpoint: nullable: true description: The S3-compatible service’s URL (http or https); null for AWS itself. With an endpoint, path-style addresses are used. type: string region: type: string bucket: type: string prefix: type: string description: Prepended to every object name; may be empty. accessKeyId: type: string secretAccessKeySet: type: boolean description: "Whether a secret key is set. The key itself is never answered: replace it, or remove it." required: - kind - endpoint - region - bucket - prefix - accessKeyId - secretAccessKeySet additionalProperties: false verify: type: boolean description: "Whether each run is checked: the dump restored into a throwaway database (migrations and row counts), `git fsck` on the content, the blob hashes." verifyByDecrypting: type: boolean description: "Whether the check decrypts the written backup, which needs the key’s identity kept sealed on the server. Off: the server keeps no identity and checks what it encrypts before encrypting it, the encrypted file by its size and SHA-256." required: - enabled - frequency - time - timeZone - retention - location - verify - verifyByDecrypting additionalProperties: false meta: type: object properties: fixed: type: object additionalProperties: type: string description: Per setting the backup service’s environment fixes (`enabled`, `schedule` for the frequency and time, `timeZone`, `retention.daily` …, `location`, `verify`, `verifyByDecrypting`, `key`), the variable fixing it. Those are read-only here (409 `backup-setting-fixed-by-environment`). schedule: type: string description: The cron expression in force. nextRuns: type: array items: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: The next three scheduled runs; none while backups are off. service: type: object properties: running: type: boolean description: Whether the backup process sent a heartbeat in the last minute. lastSeenAt: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - running - lastSeenAt additionalProperties: false key: nullable: true description: The key in force; null until one is made. Never its identity. type: object properties: fingerprint: type: string recipient: nullable: true description: The age recipient backups are encrypted to (public). type: string createdAt: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ identityKept: type: boolean description: Whether the server keeps the identity sealed, to verify by decrypting. fixedBy: nullable: true description: The variable setting the key, when the environment does (`CCMS_BACKUP_KEY_FILE`). type: string required: - fingerprint - recipient - createdAt - identityKept - fixedBy additionalProperties: false updatedAt: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - fixed - schedule - nextRuns - service - key - updatedAt additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: The instance’s backup settings (#529), as the page sets them and with what the backup service’s environment fixes in their place. UpdateBackupSettingsDocument: type: object properties: data: type: object properties: type: type: string enum: - BackupSettings id: type: string enum: - instance attributes: type: object properties: enabled: type: boolean frequency: oneOf: - type: object properties: kind: type: string enum: - daily required: - kind additionalProperties: false - type: object properties: kind: type: string enum: - weekly weekday: type: integer minimum: 0 maximum: 6 required: - kind - weekday additionalProperties: false - type: object properties: kind: type: string enum: - hours every: type: integer minimum: 1 maximum: 23 required: - kind - every additionalProperties: false - type: object properties: kind: type: string enum: - cron expression: type: string minLength: 1 maxLength: 200 required: - kind - expression additionalProperties: false time: type: string pattern: ^([01][0-9]|2[0-3]):[0-5][0-9]$ timeZone: type: string maxLength: 64 retention: type: object properties: daily: type: integer minimum: 0 maximum: 366 weekly: type: integer minimum: 0 maximum: 520 monthly: type: integer minimum: 0 maximum: 1200 required: - daily - weekly - monthly additionalProperties: false location: oneOf: - type: object properties: kind: type: string enum: - local subfolder: type: string maxLength: 400 required: - kind - subfolder additionalProperties: false - type: object properties: kind: type: string enum: - s3 endpoint: nullable: true type: string maxLength: 500 region: type: string minLength: 1 maxLength: 100 bucket: type: string maxLength: 100 prefix: default: "" type: string maxLength: 600 accessKeyId: type: string minLength: 1 maxLength: 200 secretAccessKey: description: "Write-only: a value sets or replaces it, null removes it, left out keeps it (only for the same endpoint, bucket and access key: 422 `secret-required` otherwise)." nullable: true type: string minLength: 1 maxLength: 500 required: - kind - endpoint - region - bucket - accessKeyId additionalProperties: false verify: type: boolean verifyByDecrypting: type: boolean additionalProperties: false required: - type - id additionalProperties: false required: - data additionalProperties: false BackupKeyPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/BackupKeyResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false BackupKeyResource: type: object properties: type: type: string enum: - BackupKey id: type: string attributes: type: object properties: fingerprint: type: string recipient: type: string description: The age recipient (public). createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ retiredAt: nullable: true description: When a rotation replaced it; null for the current key. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - fingerprint - recipient - createdAt - retiredAt additionalProperties: false meta: type: object properties: identityKept: type: boolean description: Whether the server keeps its identity sealed. required: - identityKept additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: A backup key, by fingerprint; never its identity. CreateBackupKeyDocument: type: object properties: meta: type: object properties: rotate: description: True to replace the current key (an explicit rotation). type: boolean additionalProperties: false additionalProperties: false MadeBackupKeyDocument: type: object properties: data: type: object properties: type: type: string enum: - BackupKey id: type: string enum: - current attributes: type: object properties: fingerprint: type: string recipient: type: string createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - fingerprint - recipient - createdAt additionalProperties: false required: - type - id - attributes additionalProperties: false meta: type: object properties: identity: type: string description: "The key’s identity (`AGE-SECRET-KEY-1…`), shown only in this answer. Without it no backup can be restored: download or copy it now and keep it away from the backups." rotated: type: boolean identityKept: type: boolean required: - identity - rotated - identityKept additionalProperties: false required: - data - meta additionalProperties: false BackupRunPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/BackupRunResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false BackupRunResource: type: object properties: type: type: string enum: - BackupRun id: type: string attributes: type: object properties: trigger: type: string enum: - schedule - manual - command status: type: string enum: - running - succeeded - failed scheduledFor: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ startedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ finishedAt: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ sizeBytes: nullable: true description: The encrypted file’s size. type: integer minimum: -9007199254740991 maximum: 9007199254740991 sha256: nullable: true description: The encrypted file’s SHA-256 (hex). type: string location: nullable: true description: "`local:` or `s3:/`; never a credential." type: string name: nullable: true description: Its file or object name there. type: string keyFingerprint: nullable: true description: "The fingerprint of the key it was encrypted to: restoring it needs that key." type: string verified: nullable: true description: "True: checked and good; false: the check failed; null: not checked." type: boolean verifyMode: nullable: true type: string enum: - decrypted - before-encryption error: nullable: true type: string enum: - backup-key-missing - location-unavailable - database-dump-failed - archive-failed - encrypt-failed - upload-failed - verify-failed - interrupted - failed errorDetail: nullable: true description: The exact error, for an operator. type: string required: - trigger - status - scheduledFor - startedAt - finishedAt - sizeBytes - sha256 - location - name - keyFingerprint - verified - verifyMode - error - errorDetail additionalProperties: false required: - type - id - attributes additionalProperties: false description: A backup run (#529). CreateBackupRequestDocument: type: object properties: data: type: object properties: type: type: string enum: - BackupRequest attributes: type: object properties: kind: type: string enum: - run - test-location required: - kind additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false BackupRequestDocument: type: object properties: data: $ref: "#/components/schemas/BackupRequestResource" required: - data additionalProperties: false BackupRequestResource: type: object properties: type: type: string enum: - BackupRequest id: type: string attributes: type: object properties: kind: type: string enum: - run - test-location status: type: string enum: - pending - running - done - failed description: "`pending` until the backup process takes it (within seconds)." createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ finishedAt: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ runId: nullable: true description: The run it started (`run`). type: string error: nullable: true description: "`location-test-failed`, `backup-running`, `interrupted`, or the run’s error code." type: string errorDetail: nullable: true description: The exact error. type: string required: - kind - status - createdAt - finishedAt - runId - error - errorDetail additionalProperties: false required: - type - id - attributes additionalProperties: false description: "A request to the backup process: back up now, or test the location." BackupStatusDocument: type: object properties: data: $ref: "#/components/schemas/BackupStatusResource" required: - data additionalProperties: false BackupStatusResource: type: object properties: type: type: string enum: - BackupStatus id: type: string attributes: type: object properties: {} additionalProperties: false meta: type: object properties: enabled: type: boolean keySet: type: boolean service: type: object properties: running: type: boolean lastSeenAt: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - running - lastSeenAt additionalProperties: false lastRun: nullable: true allOf: - $ref: "#/components/schemas/BackupRunResource" lastGoodRun: nullable: true description: The newest run that succeeded and whose check did not fail. allOf: - $ref: "#/components/schemas/BackupRunResource" warning: nullable: true description: "`not-set-up`: off or without a key; `service-not-running`: no heartbeat from the backup process; `failed`: the last run failed; `overdue`: no good backup for longer than `warnAfterHours`. Null: all well." type: string enum: - not-set-up - service-not-running - failed - overdue warnAfterHours: type: integer minimum: -9007199254740991 maximum: 9007199254740991 required: - enabled - keySet - service - lastRun - lastGoodRun - warning - warnAfterHours additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: Whether the instance is backed up, for the admin overview (#529). ActorDocument: type: object properties: data: $ref: "#/components/schemas/ActorResource" required: - data additionalProperties: false ActorResource: type: object properties: type: type: string enum: - Actor id: type: string attributes: type: object properties: kind: type: string enum: - user - service name: type: string description: The user's name, or the service's. roles: type: array items: $ref: "#/components/schemas/Role" required: - kind - name - roles additionalProperties: false meta: type: object properties: permissions: type: array items: type: object properties: permission: type: string enum: - content.read - content.read.draft - content.edit - content.review - content.approve - release.publish - translation.manage - webhook.manage - admin.roles - admin.branding - admin.backups scopes: type: array items: $ref: "#/components/schemas/Scope" description: "Where it is held, one per role; `[{}]`: everywhere." required: - permission - scopes additionalProperties: false description: Each permission held; permissions not held are left out. session: allOf: - $ref: "#/components/schemas/SessionMeta" required: - permissions additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is the user ID, the service account ID (`kind` `service`), or `service:api-token` for the shared token acting as a read-only service." Role: type: object properties: id: type: string name: type: string permissions: type: array items: type: string enum: - content.read - content.read.draft - content.edit - content.review - content.approve - release.publish - translation.manage - webhook.manage - admin.roles - admin.branding - admin.backups scope: $ref: "#/components/schemas/Scope" required: - id - name - permissions - scope additionalProperties: false Scope: type: object properties: languages: type: array items: type: string moduleTypes: type: array items: type: string maxAudience: description: The most restricted audience level covered. type: string facets: description: Per facet, the values covered. type: object additionalProperties: type: array items: type: string additionalProperties: false description: Where permissions apply; a dimension left out means all of it. SessionMeta: type: object properties: provider: type: string description: The identity provider it began with. expiresAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: When it ends unless used again (or at its longest lifetime). required: - provider - expiresAt additionalProperties: false description: "Present when the request acts through a signed-in session (#37): the client offers signing out." UserPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/UserResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false UserResource: type: object properties: type: type: string enum: - User id: type: string attributes: type: object properties: name: type: string email: description: Null when the user has none; left out by `GET /demo/users`, which any token holder may call. nullable: true type: string deactivatedAt: nullable: true description: When it was deactivated (it cannot act then); null while active. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - name - deactivatedAt additionalProperties: false relationships: type: object properties: roles: type: object properties: data: type: array items: type: object properties: type: type: string enum: - Role id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - roles additionalProperties: false meta: type: object properties: permissions: type: array items: type: string enum: - content.read - content.read.draft - content.edit - content.review - content.approve - release.publish - translation.manage - webhook.manage - admin.roles - admin.branding - admin.backups description: "Derived from its roles: every permission some role of the user holds, in any scope (for a client telling what a person may do, e.g. a contributor, who neither reviews nor approves). Actions still check the target." groupRoleIds: type: array items: type: string description: "Of its roles (`relationships.roles`, every role it holds), those it holds only through its identity provider’s groups (#37): they follow the group mappings, and taking them from the user directly changes nothing." signIn: allOf: - $ref: "#/components/schemas/UserSignInMeta" required: - permissions - groupRoleIds additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false UserSignInMeta: type: object properties: password: type: boolean description: Has a password. provider: type: boolean description: Has signed in with an identity provider at least once. inviteExpiresAt: nullable: true description: "An open invite’s end (in the past: it ran out); null for none." type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - password - provider - inviteExpiresAt additionalProperties: false description: "How the person signs in (#610): with a password, a provider, both, or invited and not yet signed in." Health: type: object properties: status: type: string enum: - ok - degraded description: "`degraded` when a dependency is unavailable" database: type: string enum: - ok - unavailable pool: type: string enum: - ok - saturated description: "`saturated` when queries wait for a free database connection" blobs: type: string enum: - ok - unavailable description: "`unavailable` when the blob store (images, files) does not answer" required: - status - database - pool - blobs additionalProperties: false AboutDocument: type: object properties: data: $ref: "#/components/schemas/AboutResource" required: - data additionalProperties: false AboutResource: type: object properties: type: type: string enum: - About id: type: string attributes: type: object properties: license: type: string enum: - AGPL-3.0-only description: The software’s licence, as an SPDX identifier. licenseUrl: type: string format: uri description: Where the licence’s text is published. sourceUrl: nullable: true description: Where this deployment’s source code is (`CCMS_SOURCE_URL`), as AGPL-3.0 section 13 asks a network service to offer it. Null when the operator has not set it. type: string format: uri docsUrl: nullable: true description: "Where the user guide is (`CCMS_DOCS_URL`, default `https://docs.openfolia.com/`), ending in `/`: a client links to a page by its path under it (`guide/change-sets/base-rewritten`), after `de/` for German. Null when the operator turned the links off." type: string format: uri required: - license - licenseUrl - sourceUrl - docsUrl additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is always `about`." BrandingDocument: type: object properties: data: $ref: "#/components/schemas/BrandingResource" required: - data additionalProperties: false BrandingResource: type: object properties: type: type: string enum: - Branding id: type: string attributes: type: object properties: productName: nullable: true type: string minLength: 1 maxLength: 80 pattern: ^[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}]*$ description: "The product’s name (1 to 80 characters, trimmed): the document title, the logo’s accessible name, the breadcrumb’s home." logoLight: nullable: true description: "The logo with the name, for light pages: the expanded sidebar and the sign-in page." type: string pattern: ^sha256:[0-9a-f]{64}$ logoDark: nullable: true description: "The logo for dark pages; null: the light one there too." type: string pattern: ^sha256:[0-9a-f]{64}$ mark: nullable: true description: The compact mark, for the collapsed sidebar. type: string pattern: ^sha256:[0-9a-f]{64}$ favicon: nullable: true description: The browser tab’s icon; square. type: string pattern: ^sha256:[0-9a-f]{64}$ appIcon: nullable: true description: The icon a phone puts on its home screen; square. type: string pattern: ^sha256:[0-9a-f]{64}$ primary: nullable: true description: The primary colour (buttons, links, the focus ring, the selected item’s icon), used as given in light; the dark one is derived from it. `#rrggbb`. type: string pattern: ^#[0-9a-fA-F]{6}$ accent: nullable: true description: "The optional accent: tints the light sidebar (else the primary colour does). `#rrggbb`." type: string pattern: ^#[0-9a-fA-F]{6}$ updatedAt: nullable: true description: "When it last changed; null: never." type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - productName - logoLight - logoDark - mark - favicon - appIcon - primary - accent - updatedAt additionalProperties: false meta: type: object properties: tokens: nullable: true description: "The theme tokens the colours give (`frontend/theme` names), each `#rrggbb`, for light and dark: applied over the theme’s defaults. Null without colours. Never a status or safety colour." type: object properties: light: $ref: "#/components/schemas/BrandThemeTokens" dark: $ref: "#/components/schemas/BrandThemeTokens" required: - light - dark additionalProperties: false contrast: type: array items: $ref: "#/components/schemas/BrandContrastCheck" description: Every pair the colours make, with its contrast; each meets what it requires. required: - tokens - contrast additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: The platform’s branding. `id` is always `branding`. Null fields take the neutral defaults. BrandThemeTokens: type: object properties: primary: type: string pattern: ^#[0-9a-f]{6}$ primary-foreground: type: string pattern: ^#[0-9a-f]{6}$ ring: type: string pattern: ^#[0-9a-f]{6}$ accent: type: string pattern: ^#[0-9a-f]{6}$ sidebar: type: string pattern: ^#[0-9a-f]{6}$ sidebar-border: type: string pattern: ^#[0-9a-f]{6}$ sidebar-primary: type: string pattern: ^#[0-9a-f]{6}$ sidebar-primary-foreground: type: string pattern: ^#[0-9a-f]{6}$ sidebar-ring: type: string pattern: ^#[0-9a-f]{6}$ additionalProperties: false BrandContrastCheck: type: object properties: theme: type: string enum: - light - dark pair: type: string description: "`/` by token name, e.g. `primary-foreground/primary`." colour: type: string enum: - primary - accent description: The brand colour it comes from. ratio: type: number description: The contrast ratio, rounded down to two decimals. required: type: number description: 4.5 for text, 3 for a shape or an outline. required: - theme - pair - colour - ratio - required additionalProperties: false UpdateBrandingDocument: type: object properties: data: type: object properties: type: type: string enum: - Branding id: type: string enum: - branding attributes: type: object properties: productName: nullable: true type: string minLength: 1 maxLength: 80 pattern: ^[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}]*$ description: "The product’s name (1 to 80 characters, trimmed): the document title, the logo’s accessible name, the breadcrumb’s home." logoLight: nullable: true description: "The logo with the name, for light pages: the expanded sidebar and the sign-in page." type: string pattern: ^sha256:[0-9a-f]{64}$ logoDark: nullable: true description: "The logo for dark pages; null: the light one there too." type: string pattern: ^sha256:[0-9a-f]{64}$ mark: nullable: true description: The compact mark, for the collapsed sidebar. type: string pattern: ^sha256:[0-9a-f]{64}$ favicon: nullable: true description: The browser tab’s icon; square. type: string pattern: ^sha256:[0-9a-f]{64}$ appIcon: nullable: true description: The icon a phone puts on its home screen; square. type: string pattern: ^sha256:[0-9a-f]{64}$ primary: nullable: true description: The primary colour (buttons, links, the focus ring, the selected item’s icon), used as given in light; the dark one is derived from it. `#rrggbb`. type: string pattern: ^#[0-9a-fA-F]{6}$ accent: nullable: true description: "The optional accent: tints the light sidebar (else the primary colour does). `#rrggbb`." type: string pattern: ^#[0-9a-fA-F]{6}$ additionalProperties: false description: The fields to change; left out stays, null is the default again. required: - type - attributes additionalProperties: false required: - data additionalProperties: false BrandingImageDocument: type: object properties: data: $ref: "#/components/schemas/BrandingImageResource" required: - data additionalProperties: false BrandingImageResource: type: object properties: type: type: string enum: - BrandingImage id: type: string attributes: type: object properties: reference: type: string pattern: ^sha256:[0-9a-f]{64}$ description: "How a branding field names it: `sha256:`, for `PATCH /branding`." contentType: type: string enum: - image/png - image/webp size: type: integer minimum: 1 maximum: 9007199254740991 description: In bytes. width: type: integer minimum: 1 maximum: 9007199254740991 description: In pixels. height: type: integer minimum: 1 maximum: 9007199254740991 description: In pixels. uploadedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - reference - contentType - size - width - height - uploadedAt additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is the image’s SHA-256." BrandingImagePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ListedBrandingImageResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ListedBrandingImageResource: type: object properties: type: type: string enum: - BrandingImage id: type: string attributes: type: object properties: reference: type: string pattern: ^sha256:[0-9a-f]{64}$ description: "How a branding field names it: `sha256:`, for `PATCH /branding`." contentType: type: string enum: - image/png - image/webp size: type: integer minimum: 1 maximum: 9007199254740991 description: In bytes. width: type: integer minimum: 1 maximum: 9007199254740991 description: In pixels. height: type: integer minimum: 1 maximum: 9007199254740991 description: In pixels. uploadedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - reference - contentType - size - width - height - uploadedAt additionalProperties: false meta: type: object properties: usedIn: type: array items: type: string enum: - logoLight - logoDark - mark - favicon - appIcon description: "The fields naming it now; none: unused, deleted with `DELETE /branding/images/{hash}` or by the sweep a day after its upload." required: - usedIn additionalProperties: false required: - type - id - attributes - meta additionalProperties: false AssetPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/AssetResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false AssetResource: type: object properties: type: type: string enum: - Asset id: type: string attributes: type: object properties: reference: type: string pattern: ^sha256:[a-f0-9]{64}$ description: "How a module refers to the file: `sha256:`, an image or attachment block’s `asset`." fileName: nullable: true description: "The name a download of it is saved under: the first attachment block the reader may see that attaches it (by module ID and language), else its upload’s into the change set of `filter[changeSet]`; null when neither names one." type: string minLength: 1 maxLength: 255 contentType: nullable: true description: The stored media type (sniffed from the bytes for older content); null when the file is missing (`meta.missing`). type: string size: nullable: true description: In bytes; null when missing. type: integer minimum: 0 maximum: 9007199254740991 width: nullable: true description: In pixels, as the file’s header states it (PNG, JPEG, GIF, WebP); null for an SVG, a header not found, or a missing file. type: integer minimum: 1 maximum: 9007199254740991 height: nullable: true description: In pixels; null as `width`. type: integer minimum: 1 maximum: 9007199254740991 font: nullable: true description: A font’s facts, read from the file (#555); null for any other file and a missing one. A font’s `contentType` is its format’s (`font/ttf`, `font/otf`, `font/woff`, `font/woff2`). allOf: - $ref: "#/components/schemas/AssetFont" required: - reference - fileName - contentType - size - width - height - font additionalProperties: false meta: type: object properties: usedIn: type: array items: $ref: "#/components/schemas/AssetUse" description: The modules the reader may see that show the image at this ref, by module ID and language; at most 50 (`usedInCount` counts them all). Empty for an image only uploaded into the change set. usedInCount: type: integer minimum: 0 maximum: 9007199254740991 usedInManuals: type: array items: type: object properties: manualId: type: string title: type: string required: - manualId - title additionalProperties: false description: "The manuals the reader may see that have the image as their cover image, or a variant's (#394), at this ref; at most 50. Such an image is in use: it is never listed as unused." languages: type: array items: type: string description: The languages of the modules the reader may see that use it (all of them, not only those in `usedIn`), sorted. Empty for an upload no module uses yet, and for an unused file. usedAs: type: array items: type: string enum: - image - attachment description: "How the modules the reader may see use it: shown by an image block, attached by an attachment block, both, or neither (an upload no module uses yet)." uploaded: type: boolean description: "Uploaded into the change set of `filter[changeSet]`: preview it at `GET /change-sets/{changeSetId}/assets/{hash}` until a module at the ref shows it (then `GET /assets/{hash}`)." missing: type: boolean description: Neither the blob store nor the repository holds the file a module refers to. required: - usedIn - usedInCount - usedInManuals - languages - usedAs - uploaded - missing additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is the SHA-256 of the file, 64 lowercase hex characters." AssetFont: type: object properties: format: type: string enum: - ttf - otf - woff - woff2 family: type: string description: "The family the font names itself (its typographic family, else its family): what the design screen shows and writes as a page design’s `fonts..family`. The PDF finds a design’s font by its role, whatever family it is named." subfamily: type: string description: Its style as it names it (`Bold Italic`). weight: type: integer minimum: 1 maximum: 1000 description: "1 to 1000, as the font states it: 400 regular, 700 bold." italic: type: boolean copyright: nullable: true description: The copyright notice the font states; null for none. type: string licence: nullable: true description: The licence description the font states (check it allows embedding in PDFs); null for none. type: string licenceUrl: nullable: true description: The licence’s address as the font states it, unchecked text; null for none. type: string required: - format - family - subfamily - weight - italic - copyright - licence - licenceUrl additionalProperties: false AssetUse: type: object properties: moduleId: type: string lang: type: string title: type: string description: The module’s title in that language. required: - moduleId - lang - title additionalProperties: false ChangeSetAssetDocument: type: object properties: data: $ref: "#/components/schemas/ChangeSetAssetResource" required: - data additionalProperties: false ChangeSetAssetResource: type: object properties: type: type: string enum: - ChangeSetAsset id: type: string attributes: type: object properties: reference: type: string pattern: ^sha256:[a-f0-9]{64}$ description: "How a module refers to the file: `sha256:`, an image or attachment block’s `asset`." contentType: type: string pattern: ^[a-z0-9][a-z0-9!#$&^_.+-]{0,62}\/[a-z0-9][a-z0-9!#$&^_.+-]{0,62}$ description: "The media type the server decided: from the bytes for an image (`image/png` or `image/jpeg`); from the bytes and the file name for an attachment. An attachment block’s `mediaType`." size: type: integer minimum: 0 maximum: 9007199254740991 description: In bytes. An attachment block’s `size`. fileName: nullable: true description: The file’s name as uploaded, made a valid file name (no path, no control characters, at most 255 characters); null when none was sent. An attachment block’s `fileName`. The first upload’s, when the same file is uploaded again. type: string minLength: 1 maxLength: 255 uploadedBy: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who uploaded it into the change set first. uploadedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: When it was first uploaded into the change set. required: - reference - contentType - size - fileName - uploadedBy - uploadedAt additionalProperties: false relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false required: - type - id - attributes - relationships additionalProperties: false description: "`id` is `/`. The author previews it at `GET /change-sets/{changeSetId}/assets/{hash}`; once a module the reader may see refers to it, `GET /assets/{hash}` serves it." InstallationSettingsDocument: type: object properties: data: $ref: "#/components/schemas/InstallationSettingsResource" required: - data additionalProperties: false InstallationSettingsResource: type: object properties: type: type: string enum: - InstallationSettings id: type: string attributes: type: object properties: selfApproval: type: string enum: - never - review - review-and-sign-off description: "Who may approve their own change set: `never` (the default: four eyes), `review` (its author may give the review approval; a restricted type’s sign-off still needs someone else) or `review-and-sign-off` (its author may give both). The author still needs the permission and scope as anyone would. Read when an approval is given: approvals given before a change stay." updatedAt: nullable: true description: "When they last changed; null: never." type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - selfApproval - updatedAt additionalProperties: false required: - type - id - attributes additionalProperties: false description: The installation’s own settings, changed at once (not in a change set). `id` is always `installation`. UpdateInstallationSettingsDocument: type: object properties: data: type: object properties: type: type: string enum: - InstallationSettings id: type: string enum: - installation attributes: type: object properties: selfApproval: type: string enum: - never - review - review-and-sign-off description: "Who may approve their own change set: `never` (the default: four eyes), `review` (its author may give the review approval; a restricted type’s sign-off still needs someone else) or `review-and-sign-off` (its author may give both). The author still needs the permission and scope as anyone would. Read when an approval is given: approvals given before a change stay." additionalProperties: false description: The settings to change; left out stays. required: - type - attributes additionalProperties: false required: - data additionalProperties: false RefPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/RefResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false RefResource: type: object properties: type: type: string enum: - Ref id: type: string attributes: type: object properties: kind: type: string enum: - branch - tag name: type: string commit: type: string description: The commit it points to (tags are peeled). required: - kind - name - commit additionalProperties: false meta: description: Tags only. type: object properties: withdrawal: nullable: true description: "Set when the tag is a withdrawn release’s: reads at it keep working, and say so in `X-Ccms-Withdrawn: true`. Null while the release stands, or when the tag is no release’s." type: object properties: by: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who withdrew it. at: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: When. reason: type: string description: Why, in their words. required: - by - at - reason additionalProperties: false required: - withdrawal additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is `heads/` or `tags/`." ProjectConfigDocument: type: object properties: data: $ref: "#/components/schemas/ProjectConfigResource" required: - data additionalProperties: false ProjectConfigResource: type: object properties: type: type: string enum: - ProjectConfig id: type: string attributes: $ref: "#/components/schemas/ProjectConfig" meta: description: Only when the configuration holds an iiRDS or a DITA mapping, or a direction for a language not configured. type: object properties: iirdsIssues: description: "The check of the iiRDS mapping (`iirds`, #431) against the rest of the configuration, in the configuration’s order: what it leaves unmapped and keys naming nothing. Never refused, only reported. Bounded by the configuration (at most one per value it defines or key the mapping has). Only with an iiRDS mapping." type: array items: $ref: "#/components/schemas/IirdsMappingIssue" ditaIssues: description: "The check of the DITA mapping (`dita`, #432) against the rest of the configuration, in the mapping’s order: each value naming nothing configured. Never refused, only reported. Bounded by the mapping (at most one per value). Only with a DITA mapping." type: array items: $ref: "#/components/schemas/DitaMappingIssue" directionIssues: description: Each `languages.direction` entry for a language not configured (#396), sorted by tag. Never refused, only reported. Bounded by `languages.direction`. Only when there is one. type: array items: $ref: "#/components/schemas/LanguageDirectionIssue" additionalProperties: false required: - type - id - attributes additionalProperties: false description: "A singleton: `id` is always `project`." ProjectConfig: type: object properties: languages: type: object properties: source: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: The language content is written in, as a BCP 47 tag, e.g. `en` or `pt-BR`. Every module has a file in it; a missing translation falls back to it. targets: type: array items: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: "The languages content is translated into, as BCP 47 tags, e.g. `[de, fr-CA]`; no repeats, and not the source language. Manuals are made in the source language and in each of these. An empty list: no translations." direction: description: "Per language tag, the direction its text runs in, `ltr` or `rtl`, where its script’s own is not the one wanted, e.g. `{ ku: rtl }` for Kurdish written in Arabic script. A language left out takes its script’s direction (Arabic and Hebrew script run right to left); an entry for a language not configured does nothing." type: object additionalProperties: type: string enum: - ltr - rtl required: - source - targets additionalProperties: false description: "The project’s languages: the one content is written in and the ones it is translated into." moduleTypes: minItems: 1 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The module type’s ID, which each module names in its `type`, e.g. `task`, `concept` or `safety`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The module type’s name in the editor, e.g. `Task`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." restricted: default: false description: "`true`: a change set that changes a module of this type also needs a sign-off from someone with the `content.approve` permission over those modules (not its author, unless the installation allows self-approval) before it is merged, e.g. for safety content. Left out: `false`, the review’s approval is enough." type: boolean snippet: default: false description: "`true`: modules of this type hold reusable wording (a standard sentence, a safety paragraph), one or a few blocks that authors insert by reference or copy and that the editor suggests while writing. Left out: `false`, an ordinary module type." type: boolean safety: description: "`true`: modules of this type are safety content. A derived manual (`kind: derived`, e.g. a safety leaflet) whose rule names no module types gathers the modules of these types from its source manual, and its checks warn about a module of one it leaves out. Left out: `false`." type: boolean required: - id - label - restricted - snippet additionalProperties: false description: The kinds of module the project writes, at least one, each `{ id, label }`. A module’s type decides whether it needs a sign-off, which roles may change it, and how exports classify it. audiences: minItems: 1 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The audience level’s ID, which a module’s `audience` and a manual’s `audience` name, e.g. `operator` or `technician`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The audience level’s name in the editor and on title pages, e.g. `Operator`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." required: - id - label additionalProperties: false description: The audience levels, at least one, ordered from the least to the most restricted, each `{ id, label }`. A manual for one level leaves out modules for the levels after it; a module that names no audience gets the last, most restricted one. facets: default: [] description: "Classifications of modules, each `{ id, label, values }`, e.g. a product line or a region: for finding and filtering modules, for keeping a role to some of them, and for the products a release is cut for (`release.productFacet`). Left out: none." type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The facet’s ID, which a module’s `facets` name, e.g. `product` or `topic`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The facet’s name in the editor, e.g. `Product`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." values: minItems: 1 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The value’s ID, which a module’s `facets` give for this facet, e.g. `north`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The value’s name in the editor, e.g. `North series`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." required: - id - label additionalProperties: false description: The values a module can be classified with in this facet, at least one, each `{ id, label }`. required: - id - label - values additionalProperties: false variantAttributes: default: [] description: "The attributes content varies by, each `{ id, label, kind }`, e.g. a model or a software version. `variant` blocks and `when:` conditions test them, and each manual lists the combinations it ships. Left out: content does not vary." type: array items: $ref: "#/components/schemas/VariantAttribute" textAttributes: default: [] description: "Named text values that content uses inline (`{product-name}`), each `{ id, label }`; each manual sets their values, per variant where they differ. Left out: none." type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The text attribute’s ID, which text refers to as `{id}`, e.g. `{product-name}`. `empty` is reserved. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The text attribute’s name in the editor, e.g. `Product name`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." required: - id - label additionalProperties: false safetySymbols: default: [] description: "The pictograms safety messages may show, each `{ id, label }`. A symbol without artwork prints as a placeholder in the PDF and is left out of the web page. Left out: none." type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The symbol’s ID, which a safety message’s `symbols` name; its artwork is `symbols/.svg` or `symbols/.png` in the content repository, e.g. `hot-surface`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The symbol’s name in the editor, and its alternative text in outputs, e.g. `Hot surface`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." required: - id - label additionalProperties: false calloutStyles: description: "The marker styles an image callout may use besides the default, each `{ id, label }`, e.g. a square for parts to remove. A callout without a style is a filled circle with its number. Left out: none." type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The style’s ID, which an image callout names in its `style`, e.g. `remove`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The style’s name in the editor, e.g. `Part to remove`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." required: - id - label additionalProperties: false translations: description: "Per target language, what its labels were translated from: `{ sourceCommit, blocks }`, `blocks` the source hash of each label (`moduleTypes.`, `facets..`, …) its translation was made from. Written by a translation import and by marking a translation current; left out: no record." type: object additionalProperties: type: object properties: sourceCommit: type: string pattern: ^(?:[0-9a-f]{40}|[0-9a-f]{64})$ description: The full ID of the commit whose labels were translated. blocks: type: object additionalProperties: type: string pattern: ^[0-9a-f]{64}$ description: The SHA-256 of the source-language label the translation was made from. description: Per label (`moduleTypes.`, `facets..`, …), the source hash its translation was made from. required: - sourceCommit - blocks additionalProperties: false description: One target language’s record. outputLabels: default: {} description: "The fixed texts outputs print around the content (signal words, admonition captions, the contents title, …), per manual language, each replacing the shipped default. The manual’s language decides them, never the reader’s. Left out: the shipped defaults." type: object additionalProperties: type: object properties: danger: description: "The signal word of a `danger` safety message, e.g. `DANGER`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 warning: description: "The signal word of a `warning` safety message, e.g. `WARNING`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 caution: description: "The signal word of a `caution` safety message, e.g. `CAUTION`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 notice: description: "The signal word of a `notice` safety message, e.g. `NOTICE`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 note: description: "The caption of a `note` admonition, e.g. `Note`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 tip: description: "The caption of a `tip` admonition, e.g. `Tip`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 important: description: "The caption of an `important` admonition, e.g. `Important`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 contents: description: "The title of the table of contents, e.g. `Contents`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 figure: description: "The word before a figure’s number in its caption, e.g. `Figure`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 table: description: "The word before a table’s number in its caption, e.g. `Table`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 unconverted: description: "The caption of content an import could not convert (a passthrough block), e.g. `Unconverted content`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 attachment: description: "The label in front of an attached file’s name, e.g. `Attachment`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 attachmentNote: description: "The note the PDF prints with an attached file, which a reader downloads from the online version, e.g. `Download the file from the online version of this document.`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 glossary: description: "The title of the glossary that ends a manual whose manifest sets `glossary: true`, e.g. `Glossary`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 additionalProperties: false description: "One language’s labels, by language tag (`pt-BR`; `pt` also fills what a `pt-…` set leaves out): any of the keys below." maxHeadingLevel: default: 3 description: "The deepest heading level the editor offers, 1 to 5: Heading 1 is a section at the top of a module, Heading 2 a section inside it, and so on. Modules stored with deeper sections stay valid. Left out: 3." type: integer minimum: 1 maximum: 5 codeLanguages: default: [] description: "Languages the editor offers for a code block besides the ones it ships, each `{ id, label }`. Left out: only the shipped ones." type: array items: type: object properties: id: type: string maxLength: 32 pattern: ^[A-Za-z0-9][A-Za-z0-9+#._-]*$ description: "The language word a code block stores, one word of letters, digits and `+ # . _ -`, at most 32 characters, e.g. `fortran` or `c++`. An ID the editor already ships replaces its label." label: type: string minLength: 1 description: The language’s name in the editor’s picker, e.g. `Fortran`. required: - id - label additionalProperties: false release: description: "How releases are cut. Left out: every default." type: object properties: productFacet: description: "The ID of the facet whose values are the products a release is cut for (a release is a product at a revision), e.g. `product`; it must name a configured facet. Left out: the first facet." type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ checkManufacturer: description: "`true`: every manual’s checks warn (`missing-manufacturer`) while `manufacturer` is not set, so no manual is released without its imprint. Left out: `false`." type: boolean additionalProperties: false manufacturer: description: "The manufacturer’s details for the imprint: a page design’s back page prints them, and its `manufacturer-name`, `manufacturer-address`, `manufacturer-contact` and `manufacturer-website` placeholders show them on any page. Left out: none (with `release.checkManufacturer`, every manual’s checks warn)." type: object properties: name: type: string minLength: 1 maxLength: 200 pattern: ^\S(?:[^\n\r]*\S)?$ description: The manufacturer’s name as printed, one line, at most 200 characters, e.g. `Example Works Ltd`. address: default: [] description: "The postal address, one entry per printed line, at most 10 lines, e.g. `[1 Sample Street, 12345 Sample Town]`. Left out: none." maxItems: 10 type: array items: type: string minLength: 1 maxLength: 200 pattern: ^\S(?:[^\n\r]*\S)?$ contact: description: "How to reach the manufacturer, one line, e.g. `info@example.com · +1 555 0100`. Left out: none." type: string minLength: 1 maxLength: 200 pattern: ^\S(?:[^\n\r]*\S)?$ website: description: "The manufacturer’s website, an absolute `https:` or `http:` address (or a `mailto:` one), e.g. `https://example.com`. Left out: none." type: string maxLength: 2000 format: uri required: - name - address additionalProperties: false styleGuide: description: "The house style in plain words (e.g. “Address the reader as you. One instruction per step.”), at most 20,000 characters. The model-based style review sends it with a module’s text when an author asks for one. Left out: the review has no house style to check against." type: string minLength: 1 maxLength: 20000 terminology: description: "How the terminology checks weigh what they find: forbidden variants of approved terms and the variants of deprecated terms, matched in each module’s language without case, as whole words. Left out: every default." type: object properties: forbiddenIsBlocking: default: false description: "`true`: a forbidden variant of an approved term in a module’s text is a blocking check (`forbidden-term`), which holds up review and release until it is replaced. Left out: `false`, a warning. A variant of a deprecated term is always a warning." type: boolean required: - forbiddenIsBlocking additionalProperties: false styleRules: description: "The house style as rules, per language: phrases and patterns the checks before review and release, the CLI check (`check-content`) and the editor report in each module’s text, with their message and fix, and the longest sentence. Only translatable text is read (never code, literal or passthrough blocks). Left out: no style rules." type: object additionalProperties: type: object properties: maxSentenceWords: description: "The most words a sentence may have, 5 to 200, e.g. `25`: a longer one is a `style-rule` warning. A sentence ends at `.`, `!`, `?` or `…` before white space, or at a line break. Left out: sentences of any length." type: integer minimum: 5 maximum: 200 rules: default: [] description: "The language’s rules, at most 200, each a `style-rule` check where it matches. Left out: none." maxItems: 200 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The rule’s ID, which its findings name, e.g. `in-order-to`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its language. words: description: "A phrase to find, at most 200 characters, e.g. `in order to`: matched as whole words, without case (unless `matchCase`), any white space between its words alike. Give `words` or `pattern`, not both." type: string minLength: 1 maxLength: 200 pattern: ^\S(?:[^\n\r]*\S)?$ pattern: description: "A pattern to find, at most 200 characters, e.g. `\\butili[sz]e\\b`, matched without case (unless `matchCase`) in linear time, never by backtracking: characters, `.`, classes (`[a-z]`, `[^…]`, `\\d`, `\\w` (letters, digits, marks and `_` of any script), `\\s` and their negations), groups (`(…)`, `(?:…)`), `|`, `?`, `*`, `+`, counts up to 20 (`{2}`, `{1,3}`), `^`, `$` and `\\b`, `\\B`. No back-references, lookaround or lazy repetition; a pattern matching empty text, or of more than 300 states once its counts are written out, is refused. Each match is the longest from where it starts, matches never overlap. Give `words` or `pattern`, not both." type: string minLength: 1 maxLength: 200 matchCase: description: "`true`: `words` or `pattern` match only in the case written. Left out: `false`, any case." type: boolean message: type: string minLength: 1 maxLength: 500 pattern: ^\S(?:[^\n\r]*\S)?$ description: What the writer is told, in the language the rule is for, at most 500 characters, e.g. `Write “to”.` replacement: description: "What to write instead, offered as the fix, e.g. `to`; empty: delete what was found. For `words` without `matchCase`, written in the case found (a capital first, or all capitals). Left out: no fix is offered." type: string maxLength: 200 pattern: ^[^\n\r]*$ severity: description: "`warning`, worth a look, or `blocking`, which holds up review and release until it is fixed. Left out: `warning`." type: string enum: - warning - blocking required: - id - message additionalProperties: false description: "One rule: a phrase or a pattern, and its message." required: - rules additionalProperties: false description: One language’s style rules, by language tag, e.g. `en`; it must be a configured language. pdf: default: standard: ua-1 description: "How manuals are made as PDF. Left out: every default." type: object properties: standard: default: ua-1 description: "The standard every manual’s PDF is made to: `ua-1`, PDF/UA-1, tagged and accessible (a document that cannot meet it is refused), or `none`, a plain PDF. Left out: `ua-1`." type: string enum: - ua-1 - none design: description: "The page design of every manual whose manifest names none, by its ID: the file `design/.yaml` in the content repository, e.g. `classic-a4`. Left out: the built-in design." type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ calloutLabelMinSize: description: "The smallest text size, in points, that a callout legend beside its image shrinks to before what still does not fit is cut off and reported, 4 to 12, e.g. `7.5`. Left out: 6." type: number minimum: 4 maximum: 12 required: - standard additionalProperties: false delivery: default: access: signed-in missingLanguage: picker pdfQrCode: none manuals: {} description: "The stable addresses that open a product’s latest released manual, for links and QR codes. Left out: every default." type: object properties: access: default: signed-in description: "Who may open a manual’s stable address (`/d////`, the latest release’s manual): `public`, anyone without signing in; `signed-in`, a signed-in reader allowed to read content; or `off`, nobody. The installation may cap it to less. Left out: `signed-in`." type: string enum: - public - signed-in - off publicAudience: description: "The most restricted audience level a public address shows, by its ID, e.g. `operator`; it must name a configured audience. Left out: the first, least restricted level." type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ missingLanguage: default: picker description: "What an address in a language the release does not have opens: `picker`, a page listing the languages it has, or `source`, the manual in the source language. Left out: `picker`." type: string enum: - picker - source pdfQrCode: default: none description: "Where a release’s PDF prints the QR code of its stable address: `none`, on the `title-page`, or on a `back-cover` page of its own at the end. Printed only when the addresses are `public` (after the installation’s cap) and the installation’s public URL is set. Left out: `none`." type: string enum: - none - title-page - back-cover manuals: default: {} description: "Per manual ID, its address segment and its former ones. Left out: every manual is addressed by its ID." type: object additionalProperties: type: object properties: slug: description: "The manual’s segment in its address, a lowercase slug, e.g. `operating` in `/d/north/operating/…`; no two manuals share one. Left out: the manual’s ID." type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ formerly: default: [] description: "Segments the manual had before, at most 20, e.g. `[user-guide]`: an address with one leads to the current one, and a release made before the rename holds the manual under it. None may be another manual’s address. Left out: none." maxItems: 20 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - formerly additionalProperties: false description: One manual’s address, by the manual’s ID, e.g. `operating-manual`. required: - access - missingLanguage - pdfQrCode - manuals additionalProperties: false iirds: description: "The iiRDS export: how module types, audiences, facets and variant attributes map to the iiRDS vocabulary, by the standard’s names. Left out: releases are not exported as iiRDS packages." type: object properties: baseIri: type: string description: "Where the package’s own IRIs are made (`releases//…`, `modules/`): an absolute `http` or `https` IRI ending in `/`, without query, fragment or user information, at most 200 characters, e.g. `https://docs.example.com/iirds/`." documentTypes: minItems: 1 maxItems: 20 type: array items: type: string enum: - AdministratorGuide - AssemblyInstructions - BillOfMaterials - CEDeclarationOfConformity - Certificate - ContractualDocument - ElectronicIdentificationPlate - IdentificationDocument - InstallationInstructions - MaintenanceInstructions - OperatingInstructions - PartsCatalog - Plan - QuickGuide - RepairInstructions - SafetyInstructions - SalesCatalog - Specification - TechnicalDrawingDiagram - TransportInstructions description: The document types of every manual, at least one as iiRDS requires, no repeats, e.g. `[OperatingInstructions]`; a manual listed in `manualDocumentTypes` takes its own instead. manualDocumentTypes: default: {} description: "Per manual ID, document types replacing `documentTypes` for that manual. At most 1,000 manuals. Left out: every manual has `documentTypes`." type: object additionalProperties: minItems: 1 maxItems: 20 type: array items: type: string enum: - AdministratorGuide - AssemblyInstructions - BillOfMaterials - CEDeclarationOfConformity - Certificate - ContractualDocument - ElectronicIdentificationPlate - IdentificationDocument - InstallationInstructions - MaintenanceInstructions - OperatingInstructions - PartsCatalog - Plan - QuickGuide - RepairInstructions - SafetyInstructions - SalesCatalog - Specification - TechnicalDrawingDiagram - TransportInstructions description: "One manual’s document types, by the manual’s ID, e.g. `service-manual: [MaintenanceInstructions]`." moduleTypes: default: {} description: Per module type ID, the iiRDS topic type and information subjects of its modules. One the mapping leaves out has no such metadata in the package, and the export warns. type: object additionalProperties: anyOf: - type: string enum: - GenericConcept - GenericForm - GenericLearning - GenericReference - GenericTask - GenericTroubleshooting - type: object properties: topicType: description: "The topic type its modules are, e.g. `GenericConcept`. Left out: the package names none for them." type: string enum: - GenericConcept - GenericForm - GenericLearning - GenericReference - GenericTask - GenericTroubleshooting subjects: description: "The information subjects its modules are about, at least one, no repeats, e.g. `[SafetyInstruction]`. Left out: none." minItems: 1 maxItems: 31 type: array items: type: string enum: - ApplicableStandards - Caution - ContactInformation - Danger - DeclarationOfConformity - ForeseeableMisuse - GenericCollection - GenericConformity - GenericFormality - GenericFunctionality - GenericProcess - GenericSafety - GenericTechnicalData - GenericTechnicalOverview - GenericWarningMessage - IntendedUse - LegalInformation - LicenceTerm - ManufacturerInformation - Notice - OperatingElement - ProductIdentification - ProductName - RestrictionOnUse - RiskAssessment - SafetyInstruction - ScopeOfDelivery - Symbol - TechnicalReport - WarrantyConditions - Warning additionalProperties: false description: "One module type’s mapping, by the module type’s ID: its topic type alone (`task: GenericTask`), or `{ topicType, subjects }` with either or both (`safety: { topicType: GenericConcept, subjects: [SafetyInstruction] }`)." audiences: default: {} description: "Per audience level ID, the qualification class it is: `Role` or `SkillLevel`, e.g. `{ operator: Role }`. One the mapping leaves out has no such metadata in the package, and the export warns." type: object additionalProperties: type: string enum: - Role - SkillLevel facets: default: {} description: "Per facet ID, the product metadata class its values are: `ProductVariant`, `Component`, `ProductFunction` or `ProductProperty`, e.g. `{ region: ProductVariant }`. One the mapping leaves out has no such metadata in the package, and the export warns." type: object additionalProperties: type: string enum: - ProductVariant - Component - ProductFunction - ProductProperty variantAttributes: default: {} description: "Per variant attribute ID, the product metadata class its values are, as for `facets`, e.g. `{ model: ProductVariant }`. One the mapping leaves out has no such metadata in the package, and the export warns." type: object additionalProperties: type: string enum: - ProductVariant - Component - ProductFunction - ProductProperty lifecyclePhases: description: "A facet whose values are product lifecycle phases, and the phase each value is. Left out: the package names no lifecycle phases." type: object properties: facet: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The ID of the facet whose values are lifecycle phases, e.g. `phase`; it must not also be in `facets`. values: type: object additionalProperties: type: string enum: - Acquisition - Configuration - Decommissioning - Design - Development - Diagnostics - Disposal - EmergencyOperation - Fault - GenericAfterUse - GenericDesignAndRealization - GenericPuttingToUse - GenericUse - Installation - Maintenance - Operation - Production - Repair - RequirementsAnalysis description: "Per value ID of that facet, the lifecycle phase it is, e.g. `{ use: Operation }`. A value left out has no phase, and the export warns." required: - facet - values additionalProperties: false required: - baseIri - documentTypes - manualDocumentTypes - moduleTypes - audiences - facets - variantAttributes additionalProperties: false dita: description: "The DITA 1.3 import: which topic types, output classes, profiling attributes, keys and hazard symbols become which module types, variant attributes, audience levels, text attributes and safety symbols. Keys are DITA names, values the project’s IDs. Left out: the import’s defaults (names matched by the same IDs)." type: object properties: moduleTypes: default: {} description: "Per topic type (a topic’s root element: `concept`, `task`, … or a specialisation’s), the module type its topics become, e.g. `{ task: procedure }`. Keys are DITA names (one token, no whitespace or parentheses), at most 1,000 entries. Left out, or a name not listed: a configured module type named like the topic type, else `defaultModuleType`." type: object additionalProperties: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ outputclasses: default: {} description: "Per token of a topic’s `@outputclass`, the module type its topics become; it wins over `moduleTypes`, e.g. `{ howto: procedure }`. Keys are DITA names (one token, no whitespace or parentheses), at most 1,000 entries. Left out, or a name not listed: `moduleTypes` decides." type: object additionalProperties: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ defaultModuleType: description: "The module type, by ID, of a topic whose type neither `outputclasses`, `moduleTypes` nor a configured module type of the same name gives, e.g. `concept`. Left out: the first configured module type." type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ profiling: default: {} description: 'Per profiling attribute (or a group name inside one, `product="unit(basic)"`), what its values become, e.g. `{ product: { variantAttribute: model } }`. Keys are DITA names (one token, no whitespace or parentheses), at most 1,000 entries. Left out, or a name not listed: a profiling attribute named like a variant attribute maps to it, and `audience` to the audience levels of the same IDs.' type: object additionalProperties: anyOf: - type: object properties: variantAttribute: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The ID of the variant attribute the profiling attribute’s values become, e.g. `model`. values: description: "Per DITA value, the variant attribute’s value it becomes, e.g. `{ basic-unit: basic }`. Left out, or a DITA value not listed: the value of the same ID." type: object additionalProperties: type: string minLength: 1 maxLength: 100 required: - variantAttribute additionalProperties: false - type: object properties: audience: type: object additionalProperties: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: "Per DITA value, the audience level’s ID it becomes, e.g. `{ user: operator }`. It applies only where a module or a manual entry starts." required: - audience additionalProperties: false description: "What one profiling attribute’s values become: a variant attribute’s values (`{ variantAttribute, values }`) or audience levels (`{ audience }`)." textKeys: default: {} description: 'Per key that holds text (`` with a ``), the text attribute an empty `` becomes, e.g. `{ prodname: product-name }`. Keys are DITA names (one token, no whitespace or parentheses), at most 1,000 entries. Left out, or a name not listed: a text attribute named like the key, if there is one; any other key is imported as its text.' type: object additionalProperties: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ hazardSymbols: default: {} description: "Per `` file name (its `@href`’s last segment) or key, the safety symbol it becomes, e.g. `{ hot-surface.svg: hot-surface }`. Keys are DITA names (one token, no whitespace or parentheses), at most 1,000 entries. Left out, or a name not listed: the symbol is left out, and the import reports it." type: object additionalProperties: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ ditavalDefault: default: none description: "What becomes of a DITAVAL file no map names: `none`, it is not applied (and reported), or `all`, it becomes a variant of every manual. Left out: `none`." type: string enum: - none - all required: - moduleTypes - outputclasses - profiling - textKeys - hazardSymbols - ditavalDefault additionalProperties: false required: - languages - moduleTypes - audiences - facets - variantAttributes - textAttributes - safetySymbols - outputLabels - maxHeadingLevel - codeLanguages - pdf - delivery additionalProperties: false VariantAttribute: oneOf: - type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The variant attribute’s ID, which `variant` blocks, `when:` conditions and a manual’s variants name, e.g. `model` or `software`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The variant attribute’s name in the editor and where a variant is named, e.g. `Model` (a version shows as `Software 2.1`). One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." kind: type: string enum: - enum description: "How the attribute’s values are compared: `enum`, one of a fixed list of values (`values`, e.g. a model or a market), or `version`, a dotted version compared numerically (`2.10` is after `2.9`, e.g. a software version), which lists no values." values: minItems: 1 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: "The value’s ID, which conditions compare with, e.g. `large` in `when: model = large`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list." label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The value’s name in the editor and where a variant is named, e.g. `Large`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." archived: description: "`true` retires the value: content that uses it stays valid, but the editor no longer offers it. Removing a value that content still uses is refused, so archiving is the way to retire one. Left out: the value is offered." type: boolean required: - id - label additionalProperties: false description: "For `kind: enum` only: the values the attribute can take, at least one, each `{ id, label }`." required: - id - label - kind - values additionalProperties: false - type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The variant attribute’s ID, which `variant` blocks, `when:` conditions and a manual’s variants name, e.g. `model` or `software`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The variant attribute’s name in the editor and where a variant is named, e.g. `Model` (a version shows as `Software 2.1`). One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." kind: type: string enum: - version description: "How the attribute’s values are compared: `enum`, one of a fixed list of values (`values`, e.g. a model or a market), or `version`, a dotted version compared numerically (`2.10` is after `2.9`, e.g. a software version), which lists no values." required: - id - label - kind additionalProperties: false IirdsMappingIssue: type: object properties: code: type: string enum: - unmapped-module-type - unmapped-audience - unmapped-facet - unmapped-variant-attribute - unmapped-lifecycle-phase - unknown-mapping-key description: "Stable. `unmapped-*`: a value the configuration defines that the iiRDS mapping names no class for (an iiRDS package leaves that metadata out, with a warning); `unknown-mapping-key`: a key of the mapping naming nothing the configuration defines (ignored)." path: type: string description: Where in `iirds`, e.g. `moduleTypes.task`. message: type: string required: - code - path - message additionalProperties: false DitaMappingIssue: type: object properties: code: type: string enum: - unknown-module-type - unknown-variant-attribute - unknown-variant-value - unknown-audience - unknown-text-attribute - unknown-safety-symbol description: "Stable: the value of the DITA mapping names no module type, variant attribute, variant value, audience level, text attribute or safety symbol of the configuration. A DITA import uses its default there and reports it." path: type: string description: Where in `dita`, e.g. `moduleTypes.task`. message: type: string required: - code - path - message additionalProperties: false LanguageDirectionIssue: type: object properties: code: type: string enum: - unknown-direction-language description: "Stable: `languages.direction` sets a direction for a language that is neither the source nor a target. It does nothing, and the next save of the configuration leaves it out." path: type: string description: Where in the configuration, e.g. `languages.direction.fa`. message: type: string required: - code - path - message additionalProperties: false ConfigUsagePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ConfigUsageResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ConfigUsageResource: type: object properties: type: type: string enum: - ConfigUsage id: type: string attributes: type: object properties: kind: type: string enum: - language - moduleType - audience - facet - facetValue - variantAttribute - variantValue - textAttribute - safetySymbol - calloutStyle description: The part of the configuration the value belongs to. valueId: type: string description: The value’s ID (a language tag for a language). parentId: description: The facet (`facetValue`) or variant attribute (`variantValue`) the value belongs to. type: string required: - kind - valueId additionalProperties: false meta: type: object properties: modules: type: integer minimum: 0 maximum: 9007199254740991 description: Modules naming it, counted by ID (every language of a module counts once), as the reader sees them. manuals: type: integer minimum: 0 maximum: 9007199254740991 description: Manuals naming it, as the reader sees them. required: - modules - manuals additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is `/`, or `//` for a facet or variant value." ModulePageDocument: type: object properties: data: type: array items: anyOf: - $ref: "#/components/schemas/ModuleResource" - $ref: "#/components/schemas/UnreadableModuleResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ModuleResource: type: object properties: type: type: string enum: - Module id: type: string attributes: $ref: "#/components/schemas/ModuleAttributes" meta: type: object properties: issues: type: array items: $ref: "#/components/schemas/Issue" description: Problems found checking it against the configuration. status: $ref: "#/components/schemas/ModuleStatus" usage: $ref: "#/components/schemas/ModuleUsage" usedIn: maxItems: 50 type: array items: $ref: "#/components/schemas/ModuleUse" description: "Where the module is used (FR-19): manuals first, then modules, each by title; at most 50 (`usage` counts them all). Only manuals and modules the reader may see are named, and a manual counts through module references only where the reader may see every module on the way." required: - issues - status - usage - usedIn additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is `/`, as in the URL." ModuleAttributes: type: object properties: moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ lang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ schemaVersion: type: number enum: - 1 title: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ moduleType: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: One of the configured module types, e.g. `procedure`. audience: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ facets: default: {} type: object additionalProperties: minItems: 1 type: array items: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ keywords: description: Free-form keywords in the module’s language; absent when there are none. maxItems: 32 type: array items: type: string minLength: 1 maxLength: 64 pattern: ^[^,\p{Cc}]+$ source: type: object properties: system: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ id: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ required: - system - id additionalProperties: false deprecated: description: "This file’s deprecation, as stored (#266): absent when it has none. The module’s own is its source-language file’s (`meta.status.deprecated`)." allOf: - $ref: "#/components/schemas/Deprecation" blocks: type: array items: $ref: "#/components/schemas/Block" required: - moduleId - lang - schemaVersion - title - moduleType - facets - blocks additionalProperties: false Deprecation: type: object properties: reason: type: string minLength: 1 maxLength: 500 pattern: ^\S(?:[^\n\r]*\S)?$ replacedBy: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - reason additionalProperties: false Block: oneOf: - type: object properties: type: type: string enum: - paragraph id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ content: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" required: - type - id - content additionalProperties: false - type: object properties: type: type: string enum: - section id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ title: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" blocks: type: array items: $ref: "#/components/schemas/Block" required: - type - id - title - blocks additionalProperties: false - type: object properties: type: type: string enum: - list id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ ordered: type: boolean items: minItems: 1 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ content: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" blocks: type: array items: $ref: "#/components/schemas/Block" required: - id - content - blocks additionalProperties: false required: - type - id - ordered - items additionalProperties: false - type: object properties: type: type: string enum: - procedure id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ title: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" steps: minItems: 1 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ content: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" blocks: type: array items: $ref: "#/components/schemas/Block" required: - id - content - blocks additionalProperties: false required: - type - id - steps additionalProperties: false - type: object properties: type: type: string enum: - table id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ title: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" columns: minItems: 1 type: array items: type: object properties: width: type: integer minimum: 0 exclusiveMinimum: true maximum: 9007199254740991 align: type: string enum: - left - center - right required: - width additionalProperties: false header: type: boolean rows: minItems: 1 type: array items: type: object properties: cells: minItems: 1 type: array items: type: object properties: colspan: type: integer minimum: 1 maximum: 100 rowspan: type: integer minimum: 1 maximum: 100 blocks: type: array items: $ref: "#/components/schemas/Block" required: - blocks additionalProperties: false required: - cells additionalProperties: false required: - type - id - columns - header - rows additionalProperties: false - type: object properties: type: type: string enum: - image id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ asset: type: string pattern: ^sha256:[a-f0-9]{64}$ alt: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ title: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" width: type: number minimum: 0 exclusiveMinimum: true maximum: 100 callouts: minItems: 1 maxItems: 100 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ anchor: type: object properties: x: type: number minimum: 0 maximum: 1 y: type: number minimum: 0 maximum: 1 required: - x - y additionalProperties: false label: type: object properties: x: type: number minimum: 0 maximum: 1 y: type: number minimum: 0 maximum: 1 required: - x - y additionalProperties: false legend: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" when: allOf: - $ref: "#/components/schemas/Condition" style: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ required: - id - anchor - legend additionalProperties: false calloutOrder: type: string enum: - reading - manual calloutLegend: type: string enum: - below - beside - none required: - type - id - asset - alt additionalProperties: false - type: object properties: type: type: string enum: - attachment id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ asset: type: string pattern: ^sha256:[a-f0-9]{64}$ name: type: string minLength: 1 maxLength: 200 pattern: ^\S(?:[^\n\r]*\S)?$ description: type: string minLength: 1 maxLength: 1000 pattern: ^\S(?:[^\n\r]*\S)?$ fileName: type: string minLength: 1 maxLength: 255 mediaType: type: string pattern: ^[a-z0-9][a-z0-9!#$&^_.+-]{0,62}\/[a-z0-9][a-z0-9!#$&^_.+-]{0,62}$ size: type: integer minimum: 0 maximum: 9007199254740991 required: - type - id - asset - name - fileName - mediaType - size additionalProperties: false - type: object properties: type: type: string enum: - safety id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ severity: type: string enum: - danger - warning - caution - notice hazard: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" symbols: type: array items: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ blocks: type: array items: $ref: "#/components/schemas/Block" required: - type - id - severity - hazard - symbols - blocks additionalProperties: false - type: object properties: type: type: string enum: - admonition id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ kind: type: string enum: - note - tip - important blocks: minItems: 1 type: array items: $ref: "#/components/schemas/Block" required: - type - id - kind - blocks additionalProperties: false - type: object properties: type: type: string enum: - faq id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ question: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" blocks: minItems: 1 type: array items: $ref: "#/components/schemas/Block" required: - type - id - question - blocks additionalProperties: false - type: object properties: type: type: string enum: - variant id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ when: $ref: "#/components/schemas/Condition" blocks: minItems: 1 type: array items: $ref: "#/components/schemas/Block" required: - type - id - when - blocks additionalProperties: false - type: object properties: type: type: string enum: - moduleRef id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ module: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ block: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ required: - type - id - module additionalProperties: false - type: object properties: type: type: string enum: - literal id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ text: type: string pattern: ^[^\r]*$ language: type: string pattern: ^[A-Za-z0-9][A-Za-z0-9+#._-]*$ required: - type - id - text additionalProperties: false - type: object properties: type: type: string enum: - passthrough id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ format: type: string pattern: ^[A-Za-z0-9][A-Za-z0-9+#._-]*$ raw: type: string pattern: ^[^\r]*$ required: - type - id - format - raw additionalProperties: false - type: object properties: type: type: string enum: - pageBreak id: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ required: - type - id additionalProperties: false Inline: oneOf: - type: object properties: type: type: string enum: - text text: type: string minLength: 1 pattern: ^[^\n\r]*$ marks: type: array items: $ref: "#/components/schemas/Mark" required: - type - text additionalProperties: false - type: object properties: type: type: string enum: - attribute name: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ required: - type - name additionalProperties: false - type: object properties: type: type: string enum: - xref module: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ block: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ text: minItems: 1 type: array items: type: object properties: type: type: string enum: - text text: type: string minLength: 1 pattern: ^[^\n\r]*$ marks: type: array items: $ref: "#/components/schemas/Mark" required: - type - text additionalProperties: false required: - type - module additionalProperties: false - type: object properties: type: type: string enum: - kbd keys: minItems: 1 type: array items: type: string minLength: 1 pattern: ^[^\n\r\]]+$ required: - type - keys additionalProperties: false - type: object properties: type: type: string enum: - calloutRef block: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ callout: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ required: - type - block - callout additionalProperties: false - type: object properties: type: type: string enum: - hardBreak required: - type additionalProperties: false - type: object properties: type: type: string enum: - placeholder key: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ required: - type - key additionalProperties: false Mark: oneOf: - type: object properties: type: type: string enum: - strong required: - type additionalProperties: false - type: object properties: type: type: string enum: - emphasis required: - type additionalProperties: false - type: object properties: type: type: string enum: - code required: - type additionalProperties: false - type: object properties: type: type: string enum: - sub required: - type additionalProperties: false - type: object properties: type: type: string enum: - sup required: - type additionalProperties: false - type: object properties: type: type: string enum: - ui required: - type additionalProperties: false - type: object properties: type: type: string enum: - link href: type: string format: uri required: - type - href additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false Condition: oneOf: - type: object properties: op: type: string enum: - all of: minItems: 2 type: array items: $ref: "#/components/schemas/Condition" required: - op - of additionalProperties: false - type: object properties: op: type: string enum: - any of: minItems: 2 type: array items: $ref: "#/components/schemas/Condition" required: - op - of additionalProperties: false - type: object properties: op: type: string enum: - not of: $ref: "#/components/schemas/Condition" required: - op - of additionalProperties: false - type: object properties: op: type: string enum: - in attr: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ values: minItems: 1 type: array items: type: string minLength: 1 required: - op - attr - values additionalProperties: false - type: object properties: op: type: string enum: - cmp attr: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ cmp: type: string enum: - < - <= - ">" - ">=" value: type: string pattern: ^\d+(?:\.\d+)*$ required: - op - attr - cmp - value additionalProperties: false Issue: type: object properties: severity: type: string enum: - error - warning code: type: string description: Stable machine-readable code, e.g. `unknown-audience`. message: type: string at: description: ID of the block or item concerned; absent for metadata. type: string required: - severity - code - message additionalProperties: false ModuleStatus: type: object properties: release: nullable: true description: The newest release (tag) holding the module as the reader may see it there; null when none of the 50 newest does. type: object properties: tag: type: string description: The release tag. commit: type: string description: A commit ID. same: type: boolean description: Whether the module there is exactly the one read. required: - tag - commit - same additionalProperties: false main: nullable: true description: The module on `main` (approved content), as the reader may see it there; null when it is not there. type: object properties: commit: type: string description: A commit ID. same: type: boolean description: Whether the module there is exactly the one read. required: - commit - same additionalProperties: false changeSets: description: "The open change sets (draft, in review or approved) changing the module, newest first: only those the reader may read (all of them with `content.read.draft`, else their own), and only where the reader may see the module on the change set’s head or base. Left out for a reader who holds neither `content.read.draft` nor `content.edit` (a consumer of released content)." type: array items: type: object properties: id: type: string description: The change set’s ID. state: type: string enum: - draft - in-review - approved required: - id - state additionalProperties: false deprecated: nullable: true description: "The module’s deprecation at the ref read (#266), with its reason and replacement: its source-language file’s as the reader may see it (else this file’s own); null when it is not deprecated. Read on `main`, it says what was merged." allOf: - $ref: "#/components/schemas/Deprecation" required: - release - main - deprecated additionalProperties: false description: "Where the module stands, derived from Git (never stored): released, on `main`, in change sets, deprecated." ModuleUsage: type: object properties: manuals: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The manuals including the module, directly or through module references. modules: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The modules whose module reference blocks name it. required: - manuals - modules additionalProperties: false description: How many manuals and modules use the module (by ID, in any language), from the module index; only what the reader may see counts. ModuleUse: type: object properties: kind: type: string enum: - manual - module description: A manual including the module, or a module referring to it. id: type: string description: The manual’s or the module’s ID. title: type: string description: Its title (a module’s in the source language, else in its first language). direct: type: boolean description: "A manual: true when one of its entries names the module, false when it includes it only through module references. A module: always true." deprecated: type: boolean description: "Whether the manual or module using it is deprecated (#266), from the module index: a manual by its manifest, a module by its source-language file." required: - kind - id - title - direct - deprecated additionalProperties: false UnreadableModuleResource: type: object properties: type: type: string enum: - Module id: type: string attributes: type: object properties: moduleId: type: string lang: type: string required: - moduleId - lang additionalProperties: false meta: type: object properties: error: type: string description: Why it cannot be read. required: - error additionalProperties: false required: - type - id - attributes - meta additionalProperties: false ModuleDocument: type: object properties: data: $ref: "#/components/schemas/ModuleResource" required: - data additionalProperties: false ModuleSummaryPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ModuleSummaryResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ModuleSummaryResource: type: object properties: type: type: string enum: - ModuleSummary id: type: string attributes: $ref: "#/components/schemas/ModuleSummaryAttributes" meta: type: object properties: changed: type: boolean description: "Whether it differs from the released branch (`main`) in any language, or is not there: true for a module a change set added or edited." text: type: string maxLength: 400 description: "The start of its plain text in the language of `title`, in document order: at most 200 characters, white space collapsed, a text attribute as its reference, `{name}` (its value depends on the manual). For matching a snippet while writing without reading each module." deleted: description: "Set for a deleted module (`filter[status]`, #320): its newest deletion. Its attributes are then those of its last versions, `languages` the languages deleted, and its history (`GET /modules/{lang}/{id}/history`, in one of them) holds the versions to restore." type: object properties: commit: type: string description: The commit of its newest deletion. committedAt: type: string description: When that commit was committed (ISO 8601, the committer’s offset). required: - commit - committedAt additionalProperties: false required: - changed - text additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is the module ID." ModuleSummaryAttributes: type: object properties: moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ title: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ description: In `filter[lang]` when given, else in the source language (else in the first language there is). titleLang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: The language of `title`. moduleType: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: One of the configured module types, e.g. `procedure`. audience: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ facets: default: {} type: object additionalProperties: minItems: 1 type: array items: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ keywords: type: array items: type: string description: The keywords of the module in the language of `title` (keywords are per language); empty for none. languages: type: array items: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: "The languages it exists in: the source language first, the others sorted." variants: type: array items: type: string description: "What its variant blocks are conditioned on, sorted: `attribute=value` for an enum value, `attribute>=2.3` (or `<`, `<=`, `>`) for a version." deprecated: description: "Its deprecation (#266), with why and what replaces it: its source-language file’s (else, when the reader sees none, that of the language of `title`). Absent when it is not deprecated." allOf: - $ref: "#/components/schemas/Deprecation" required: - moduleId - title - titleLang - moduleType - facets - keywords - languages - variants additionalProperties: false ModuleVersionPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ModuleVersionResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" truncated: type: boolean description: "The ref’s first-parent line goes on past the 1,000 newest commits looked at: older versions are not listed, and, when the module existed before them, versions carry no revision number." required: - page - truncated additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ModuleVersionResource: type: object properties: type: type: string enum: - ModuleVersion id: type: string attributes: type: object properties: commit: type: string description: A commit ID. committedAt: type: string description: When it was committed (ISO 8601, the committer’s offset). message: type: string description: "The commit message without its trailers: for a merge, the change set’s title and a line naming it." merge: type: boolean description: Whether it is a merge (a change set merged into the ref). actor: nullable: true description: Who made it, as the commit’s trailers claim (`Merged-by`, else `Actor` for a save point); null when they name no one. Recorded by the server for the commits it makes, but a commit pushed from outside can claim anything. type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false approvedBy: type: array items: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: "Who approved it, as its `Approved-by` trailers claim, in order: the approvers of a merged change set." required: - commit - committedAt - message - merge - actor - approvedBy additionalProperties: false relationships: type: object properties: actor: type: object properties: data: nullable: true type: object properties: type: type: string enum: - User id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false description: "`actor` when it is a user the server knows; else empty." changeSet: type: object properties: data: nullable: true type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false description: The change set it came from (`Merged-change-set`, else `Change-set`); empty when its trailers name none. approvers: type: object properties: data: type: array items: type: object properties: type: type: string enum: - User id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false description: The users among `approvedBy` the server knows. required: - actor - changeSet - approvers additionalProperties: false meta: type: object properties: revision: nullable: true description: "The version’s number, counted from the oldest (1): derived, never stored. Null when the history was cut (`meta.truncated` on the document) while the module already existed before the oldest commit looked at, as the count would not start at the first." type: integer minimum: -9007199254740991 maximum: 9007199254740991 change: type: string enum: - added - changed - removed description: "How the module as the reader sees it differs from the version before: `added` (also back after a removal), `changed`, `removed` (deleted, or moved out of the reader’s scope)." releases: type: array items: type: object properties: tag: type: string commit: type: string description: A commit ID. required: - tag - commit additionalProperties: false description: The release tags (of the 50 newest) whose commit holds exactly this file, as the reader may see it there; newest first. unreadable: type: boolean description: The file after this commit cannot be read (shown only to a reader of all of its language). required: - revision - change - releases - unreadable additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is `//`. Derived from Git: nothing of it is stored by the server." ModuleComparisonDocument: type: object properties: data: $ref: "#/components/schemas/ModuleComparisonResource" required: - data additionalProperties: false ModuleComparisonResource: type: object properties: type: type: string enum: - ModuleComparison id: type: string attributes: type: object properties: base: nullable: true description: "The module at `base`, as the reader sees it on both sides; null when it is not there (or cannot be read: `meta.unreadable`)." allOf: - $ref: "#/components/schemas/ModuleAttributes" head: nullable: true description: The module at `head`, likewise. allOf: - $ref: "#/components/schemas/ModuleAttributes" required: - base - head additionalProperties: false meta: type: object properties: base: type: string description: The commit `base` named. head: type: string description: The commit `head` named. change: type: string enum: - added - changed - removed - unchanged description: "`added` (not there at `base`), `removed` (not there at `head`), `changed`, or `unchanged` (the same module on both sides)." fields: type: array items: type: string description: The module’s metadata fields that differ (`title`, `type`, `audience`, …), as in a change set’s changes. Empty unless changed. blocks: type: array items: type: object properties: blockId: type: string change: type: string enum: - added - changed - removed required: - blockId - change additionalProperties: false description: "The blocks, list items and procedure steps that differ, by ID, exactly as in a change set’s changes: in the head’s order, then the removed ones. Empty unless changed." unreadable: type: boolean description: A side has a file that cannot be read (shown only to a reader of all of its language). required: - base - head - change - fields - blocks - unreadable additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is `//..`. Derived from Git, never stored." ChangeSetPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ChangeSetResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" counts: $ref: "#/components/schemas/ChangeSetStateCounts" required: - page - counts additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ChangeSetResource: type: object properties: type: type: string enum: - ChangeSet id: type: string attributes: $ref: "#/components/schemas/ChangeSetAttributes" meta: description: "Derived from Git, not stored: given by `GET /change-sets` and `GET /change-sets/{changeSetId}`." allOf: - $ref: "#/components/schemas/ChangeSetMeta" required: - type - id - attributes additionalProperties: false ChangeSetAttributes: type: object properties: title: type: string description: nullable: true type: string state: type: string enum: - draft - in-review - approved - merged - abandoned description: "Where it is in its life: `draft` → `in-review` (submitted) → `approved` → `merged`; returned to `draft` by a reviewer; `abandoned` from any open state." author: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who started it. baseRef: type: string description: The branch it started from, and will be merged back into. baseCommit: type: string description: The commit `baseRef` pointed to when it started. branch: type: string description: "Its own branch, named by the server (`change-sets/`): read its content with `?ref=`." reviewHead: nullable: true description: "The commit of its branch submitted for review: what approvals are of and a merge merges. Null for a draft." type: string mergeCommit: nullable: true description: Where its base branch was once it was merged; null until then. type: string createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ updatedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - title - description - state - author - baseRef - baseCommit - branch - reviewHead - mergeCommit - createdAt - updatedAt additionalProperties: false ChangeSetMeta: type: object properties: branchMissing: type: boolean description: "Its branch is gone from the content repository (deleted outside the API, or the repository restored or replaced): reads at it answer 404 `change-set-branch-missing`. It is never recreated; leave the change set, or abandon it." behind: description: "How many commits its base branch has that its branch does not (counted up to 1000): above 0, `POST /change-sets/{changeSetId}/refresh` brings them in. Given by `GET /change-sets/{changeSetId}` for an open change set whose branch and base are there (and the base one the caller may read); null when its base was rewritten (`base.state`), where no update can bring them in." nullable: true type: integer minimum: 0 maximum: 9007199254740991 base: description: Given by `GET /change-sets/{changeSetId}` with `behind`, for an open change set whose branch and base are there. type: object properties: state: type: string enum: - current - rewritten description: "`current`: its base branch still holds the commit it started from. `rewritten`: it does not (the base’s history was rewritten, by a force-push or a restore), so it can be neither updated nor merged; `POST /change-sets/{changeSetId}/rebase` moves its changes onto the base’s current head, as a new change set." required: - state additionalProperties: false supersededBy: description: "The change set its changes were moved into, once its base was rewritten (`POST /change-sets/{changeSetId}/rebase`): the newest one. Given by `GET /change-sets/{changeSetId}`." type: string supersedes: description: The change set whose changes it holds, moved onto the base’s current head. Given by `GET /change-sets/{changeSetId}`. type: string required: - branchMissing additionalProperties: false ChangeSetStateCounts: type: object properties: draft: type: integer minimum: 0 maximum: 9007199254740991 in-review: type: integer minimum: 0 maximum: 9007199254740991 approved: type: integer minimum: 0 maximum: 9007199254740991 merged: type: integer minimum: 0 maximum: 9007199254740991 abandoned: type: integer minimum: 0 maximum: 9007199254740991 required: - draft - in-review - approved - merged - abandoned additionalProperties: false description: "Per state, how many change sets match the other filters (`filter[author]`), as the reader sees them, whatever `filter[state]` says: a list’s state filters show these counts without a request per state." ChangeSetDocument: type: object properties: data: $ref: "#/components/schemas/ChangeSetResource" required: - data additionalProperties: false ChangeSetChangePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ChangeSetChangeResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" base: type: string description: The change set’s base commit. head: type: string description: "The commit compared with it: the review head once submitted, else the branch’s head." required: - page - base - head additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ChangeSetChangeResource: type: object properties: type: type: string enum: - ChangeSetChange id: type: string attributes: type: object properties: subject: $ref: "#/components/schemas/LockSubject" required: - subject additionalProperties: false relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false meta: type: object properties: change: type: string enum: - added - changed - removed description: "`added`, `changed` or `removed`, as the reader sees each side: one they may not see on a side is not there, exactly like a missing one." fields: type: array items: type: string description: "What differs besides the blocks: the module’s metadata (`title`, `type`, `audience`, `facets`, `source`, …), the manifest’s members (`title`, `entries`, `variants`, …), the configuration’s members (an item of a list with IDs as `/`, e.g. `variantAttributes/model`; the member alone when only the order changed; `languages`, `outputLabels`, `maxHeadingLevel` by name) or the term’s (`status`, `domain`, a language as `languages/`). Empty when added, removed or unreadable." blocks: type: array items: type: object properties: blockId: type: string change: type: string enum: - added - changed - removed required: - blockId - change additionalProperties: false description: "A module’s blocks, list items and procedure steps that differ, by ID: `changed` when its own content (not that of the blocks with IDs inside it) or its parent differs. Unchanged blocks keep their IDs and are not listed. In the head’s order, then the removed ones. Empty for a manual and when added, removed or unreadable." unreadable: type: boolean description: A side has a file that cannot be read (for a module or manual, shown only to a reader of all of its language, or of every audience). required: - change - fields - blocks - unreadable additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is `module//`, `manual/`, `config` (`openfolia.yaml`) or `term/`. Derived from Git: nothing of it is stored." LockSubject: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: 'A module in one language (`{ type: "module", lang, moduleId }`), a manual, by its manifest (`{ type: "manual", manualId }`), the configuration (`{ type: "config" }`, `openfolia.yaml`) or a term (`{ type: "term", termId }`, `terms/.yaml`). It need not exist yet.' CreateChangeSetDocument: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet attributes: type: object properties: title: type: string minLength: 1 maxLength: 200 description: One line, 1 to 200 characters. description: description: Up to 10,000 characters. nullable: true type: string minLength: 1 maxLength: 10000 baseRef: description: "The branch to start from. Default: the server's `CCMS_DEFAULT_REF`, or the branch `HEAD` names when that is `HEAD`. Not with `maintenanceLine`." type: string minLength: 1 maxLength: 256 maintenanceLine: description: "A maintenance line’s ID, instead of `baseRef`: start from the head of the line’s branch (an older product revision) and merge back into it. A closed line takes no new change sets." type: string minLength: 1 maxLength: 64 required: - title additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false EditChangeSetDocument: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string description: The change set’s ID, as in the path. attributes: type: object properties: title: description: One line, 1 to 200 characters. type: string minLength: 1 maxLength: 200 description: description: Up to 10,000 characters; `null` clears it. nullable: true type: string minLength: 1 maxLength: 10000 additionalProperties: false required: - type - id - attributes additionalProperties: false required: - data additionalProperties: false AbandonChangeSetDocument: type: object properties: meta: type: object properties: comment: description: Why, recorded in the audit log. type: string minLength: 1 maxLength: 10000 additionalProperties: false additionalProperties: false LockPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/LockResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false LockResource: type: object properties: type: type: string enum: - Lock id: type: string attributes: $ref: "#/components/schemas/LockAttributes" relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false required: - type - id - attributes - relationships additionalProperties: false LockAttributes: type: object properties: subject: $ref: "#/components/schemas/LockSubject" holder: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who took it. since: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: When it was taken. required: - subject - holder - since additionalProperties: false LockDocument: type: object properties: data: $ref: "#/components/schemas/LockResource" required: - data additionalProperties: false AcquireLockDocument: type: object properties: data: type: object properties: type: type: string enum: - Lock attributes: type: object properties: subject: $ref: "#/components/schemas/LockSubject" required: - subject additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false BreakLockDocument: type: object properties: meta: type: object properties: comment: type: string minLength: 1 maxLength: 10000 description: Why the lock is broken, recorded in the audit log. Required. required: - comment additionalProperties: false required: - meta additionalProperties: false BreakLocksDocument: type: object properties: meta: type: object properties: comment: type: string minLength: 1 maxLength: 10000 description: Why the locks are broken, recorded on each lock’s audit event. Required. changeSet: description: Break every lock of this change set (its ID). type: string format: uuid pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$ holder: description: Break every lock this user or service holds. type: object properties: kind: type: string enum: - user - service id: type: string minLength: 1 maxLength: 200 required: - kind - id additionalProperties: false required: - comment additionalProperties: false required: - meta additionalProperties: false BreakLocksResultDocument: type: object properties: meta: type: object properties: count: type: integer minimum: 0 maximum: 9007199254740991 description: How many locks were broken. required: - count additionalProperties: false required: - meta additionalProperties: false SaveModuleWorkingCopyDocument: type: object properties: data: type: object properties: type: type: string enum: - WorkingCopy attributes: type: object properties: content: description: The module’s tree; its `id` and `meta.lang` must be the path’s. allOf: - $ref: "#/components/schemas/Module" required: - content additionalProperties: false required: - type - attributes additionalProperties: false meta: type: object properties: version: type: integer minimum: 0 maximum: 2147483647 description: "The version this save is based on: the `version` last read or saved (0 when none is saved yet). Another one is 409 `version-conflict`." baseCommit: type: string pattern: ^[0-9a-f]{40}(?:[0-9a-f]{24})?$ description: "The commit the content is based on: the `baseCommit` last read or saved; for a module or manual not on the branch yet (read is 404), the change set’s `baseCommit`. When the file has changed on the branch since, the save is 409 `stale-working-copy` (`meta.head`: the head to read it at); a save point refuses the same. A newer commit at which the file is unchanged is stored as the base instead." required: - version - baseCommit additionalProperties: false required: - data - meta additionalProperties: false ModuleMeta: type: object properties: title: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ type: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ lang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ audience: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ facets: default: {} type: object additionalProperties: minItems: 1 type: array items: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ keywords: maxItems: 32 type: array items: type: string minLength: 1 maxLength: 64 pattern: ^[^,\p{Cc}]+$ source: type: object properties: system: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ id: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ required: - system - id additionalProperties: false deprecated: allOf: - $ref: "#/components/schemas/Deprecation" required: - title - type - lang - facets additionalProperties: false Module: type: object properties: schemaVersion: type: number enum: - 1 id: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ meta: $ref: "#/components/schemas/ModuleMeta" blocks: type: array items: $ref: "#/components/schemas/Block" required: - schemaVersion - id - meta - blocks additionalProperties: false ModuleWorkingCopyDocument: type: object properties: data: $ref: "#/components/schemas/ModuleWorkingCopyResource" required: - data additionalProperties: false ModuleWorkingCopyResource: type: object properties: type: type: string enum: - WorkingCopy id: type: string attributes: type: object properties: subject: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: The module, manual, configuration, term, page design or template file it is a copy of. content: description: The module’s tree (the content model’s `Module`). allOf: - $ref: "#/components/schemas/Module" version: type: integer minimum: 0 maximum: 9007199254740991 description: How many times it was saved; 0 when nothing is saved and `content` is the committed file. Send it back with the next save. baseCommit: type: string description: The commit the content is based on (for the committed file, the commit it was read at); send it with the next save. updatedBy: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who saved it last. updatedAt: description: When it was saved last. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - subject - content - version - baseCommit additionalProperties: false relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false meta: type: object properties: saved: type: boolean description: "Whether a working copy is saved; false: `content` is the file committed on the change set’s branch." issues: type: array items: $ref: "#/components/schemas/Issue" description: Problems found checking it against the configuration; a draft may have them. required: - saved - issues additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is `/module//`, `/manual/`, `/config`, `/term/`, `/design/` or `/template//`." SaveManualWorkingCopyDocument: type: object properties: data: type: object properties: type: type: string enum: - WorkingCopy attributes: type: object properties: content: description: The manual’s manifest; its `id` must be the path’s. allOf: - $ref: "#/components/schemas/DraftManifest" required: - content additionalProperties: false required: - type - attributes additionalProperties: false meta: type: object properties: version: type: integer minimum: 0 maximum: 2147483647 description: "The version this save is based on: the `version` last read or saved (0 when none is saved yet). Another one is 409 `version-conflict`." baseCommit: type: string pattern: ^[0-9a-f]{40}(?:[0-9a-f]{24})?$ description: "The commit the content is based on: the `baseCommit` last read or saved; for a module or manual not on the branch yet (read is 404), the change set’s `baseCommit`. When the file has changed on the branch since, the save is 409 `stale-working-copy` (`meta.head`: the head to read it at); a save point refuses the same. A newer commit at which the file is unchanged is stored as the base instead." required: - version - baseCommit additionalProperties: false required: - data - meta additionalProperties: false ManifestEntry: anyOf: - type: object properties: module: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ when: allOf: - $ref: "#/components/schemas/Condition" required: - module additionalProperties: false - type: object properties: title: anyOf: - type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ when: allOf: - $ref: "#/components/schemas/Condition" entries: minItems: 1 type: array items: $ref: "#/components/schemas/ManifestEntry" required: - title - entries additionalProperties: false DraftManifest: type: object properties: schemaVersion: type: number enum: - 1 id: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ kind: type: string enum: - derived title: anyOf: - type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ audience: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ deprecated: allOf: - $ref: "#/components/schemas/Deprecation" glossary: type: boolean design: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ coverImage: type: object properties: default: type: object properties: asset: type: string pattern: ^sha256:[a-f0-9]{64}$ alt: anyOf: - type: string minLength: 1 maxLength: 500 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 maxLength: 500 pattern: ^\S(?:[^\n\r]*\S)?$ required: - asset - alt additionalProperties: false variants: default: [] maxItems: 100 type: array items: type: object properties: asset: type: string pattern: ^sha256:[a-f0-9]{64}$ alt: anyOf: - type: string minLength: 1 maxLength: 500 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 maxLength: 500 pattern: ^\S(?:[^\n\r]*\S)?$ variant: type: object additionalProperties: type: string minLength: 1 required: - asset - alt - variant additionalProperties: false required: - variants additionalProperties: false translations: type: object additionalProperties: type: object properties: sourceCommit: type: string pattern: ^(?:[0-9a-f]{40}|[0-9a-f]{64})$ blocks: type: object additionalProperties: type: string pattern: ^[0-9a-f]{64}$ required: - sourceCommit - blocks additionalProperties: false variants: minItems: 1 type: array items: type: object additionalProperties: type: string minLength: 1 attributes: default: {} type: object additionalProperties: anyOf: - type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ - minItems: 1 type: array items: type: object properties: value: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ when: allOf: - $ref: "#/components/schemas/Condition" required: - value additionalProperties: false rule: type: object properties: source: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ moduleTypes: minItems: 1 maxItems: 100 type: array items: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ exclude: default: [] maxItems: 500 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ front: default: [] maxItems: 500 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ back: default: [] maxItems: 500 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ notices: type: object properties: groupBy: default: module type: string enum: - module - level levels: minItems: 1 maxItems: 4 type: array items: type: string enum: - danger - warning - caution - notice required: - groupBy additionalProperties: false required: - source - exclude - front - back additionalProperties: false entries: type: array items: $ref: "#/components/schemas/ManifestEntry" required: - schemaVersion - id - title - variants - attributes - entries additionalProperties: false ManualWorkingCopyDocument: type: object properties: data: $ref: "#/components/schemas/ManualWorkingCopyResource" required: - data additionalProperties: false ManualWorkingCopyResource: type: object properties: type: type: string enum: - WorkingCopy id: type: string attributes: type: object properties: subject: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: The module, manual, configuration, term, page design or template file it is a copy of. content: description: The manual’s manifest; a draft may have no entries yet. Read from the branch, it names only the modules the reader may see. allOf: - $ref: "#/components/schemas/DraftManifest" version: type: integer minimum: 0 maximum: 9007199254740991 description: How many times it was saved; 0 when nothing is saved and `content` is the committed file. Send it back with the next save. baseCommit: type: string description: The commit the content is based on (for the committed file, the commit it was read at); send it with the next save. updatedBy: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who saved it last. updatedAt: description: When it was saved last. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - subject - content - version - baseCommit additionalProperties: false relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false meta: type: object properties: saved: type: boolean description: "Whether a working copy is saved; false: `content` is the file committed on the change set’s branch." issues: type: array items: $ref: "#/components/schemas/Issue" description: Problems found checking it against the configuration; a draft may have them. required: - saved - issues additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is `/module//`, `/manual/`, `/config`, `/term/`, `/design/` or `/template//`." SaveConfigWorkingCopyDocument: type: object properties: data: type: object properties: type: type: string enum: - WorkingCopy attributes: type: object properties: content: description: The whole configuration, as `GET` reads it; an unknown member at any level is refused (400). allOf: - $ref: "#/components/schemas/StrictProjectConfig" required: - content additionalProperties: false required: - type - attributes additionalProperties: false meta: type: object properties: version: type: integer minimum: 0 maximum: 2147483647 description: "The version this save is based on: the `version` last read or saved (0 when none is saved yet). Another one is 409 `version-conflict`." baseCommit: type: string pattern: ^[0-9a-f]{40}(?:[0-9a-f]{24})?$ description: "The commit the content is based on: the `baseCommit` last read or saved; for a module or manual not on the branch yet (read is 404), the change set’s `baseCommit`. When the file has changed on the branch since, the save is 409 `stale-working-copy` (`meta.head`: the head to read it at); a save point refuses the same. A newer commit at which the file is unchanged is stored as the base instead." required: - version - baseCommit additionalProperties: false required: - data - meta additionalProperties: false StrictProjectConfig: type: object properties: languages: type: object properties: source: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: The language content is written in, as a BCP 47 tag, e.g. `en` or `pt-BR`. Every module has a file in it; a missing translation falls back to it. targets: type: array items: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: "The languages content is translated into, as BCP 47 tags, e.g. `[de, fr-CA]`; no repeats, and not the source language. Manuals are made in the source language and in each of these. An empty list: no translations." direction: description: "Per language tag, the direction its text runs in, `ltr` or `rtl`, where its script’s own is not the one wanted, e.g. `{ ku: rtl }` for Kurdish written in Arabic script. A language left out takes its script’s direction (Arabic and Hebrew script run right to left); an entry for a language not configured does nothing." type: object additionalProperties: type: string enum: - ltr - rtl required: - source - targets additionalProperties: false description: "The project’s languages: the one content is written in and the ones it is translated into." moduleTypes: minItems: 1 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The module type’s ID, which each module names in its `type`, e.g. `task`, `concept` or `safety`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The module type’s name in the editor, e.g. `Task`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." restricted: default: false description: "`true`: a change set that changes a module of this type also needs a sign-off from someone with the `content.approve` permission over those modules (not its author, unless the installation allows self-approval) before it is merged, e.g. for safety content. Left out: `false`, the review’s approval is enough." type: boolean snippet: default: false description: "`true`: modules of this type hold reusable wording (a standard sentence, a safety paragraph), one or a few blocks that authors insert by reference or copy and that the editor suggests while writing. Left out: `false`, an ordinary module type." type: boolean safety: description: "`true`: modules of this type are safety content. A derived manual (`kind: derived`, e.g. a safety leaflet) whose rule names no module types gathers the modules of these types from its source manual, and its checks warn about a module of one it leaves out. Left out: `false`." type: boolean required: - id - label additionalProperties: false description: The kinds of module the project writes, at least one, each `{ id, label }`. A module’s type decides whether it needs a sign-off, which roles may change it, and how exports classify it. audiences: minItems: 1 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The audience level’s ID, which a module’s `audience` and a manual’s `audience` name, e.g. `operator` or `technician`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The audience level’s name in the editor and on title pages, e.g. `Operator`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." required: - id - label additionalProperties: false description: The audience levels, at least one, ordered from the least to the most restricted, each `{ id, label }`. A manual for one level leaves out modules for the levels after it; a module that names no audience gets the last, most restricted one. facets: default: [] description: "Classifications of modules, each `{ id, label, values }`, e.g. a product line or a region: for finding and filtering modules, for keeping a role to some of them, and for the products a release is cut for (`release.productFacet`). Left out: none." type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The facet’s ID, which a module’s `facets` name, e.g. `product` or `topic`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The facet’s name in the editor, e.g. `Product`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." values: minItems: 1 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The value’s ID, which a module’s `facets` give for this facet, e.g. `north`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The value’s name in the editor, e.g. `North series`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." required: - id - label additionalProperties: false description: The values a module can be classified with in this facet, at least one, each `{ id, label }`. required: - id - label - values additionalProperties: false variantAttributes: default: [] description: "The attributes content varies by, each `{ id, label, kind }`, e.g. a model or a software version. `variant` blocks and `when:` conditions test them, and each manual lists the combinations it ships. Left out: content does not vary." type: array items: oneOf: - type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The variant attribute’s ID, which `variant` blocks, `when:` conditions and a manual’s variants name, e.g. `model` or `software`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The variant attribute’s name in the editor and where a variant is named, e.g. `Model` (a version shows as `Software 2.1`). One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." kind: type: string enum: - enum description: "How the attribute’s values are compared: `enum`, one of a fixed list of values (`values`, e.g. a model or a market), or `version`, a dotted version compared numerically (`2.10` is after `2.9`, e.g. a software version), which lists no values." values: minItems: 1 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: "The value’s ID, which conditions compare with, e.g. `large` in `when: model = large`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list." label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The value’s name in the editor and where a variant is named, e.g. `Large`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." archived: description: "`true` retires the value: content that uses it stays valid, but the editor no longer offers it. Removing a value that content still uses is refused, so archiving is the way to retire one. Left out: the value is offered." type: boolean required: - id - label additionalProperties: false description: "For `kind: enum` only: the values the attribute can take, at least one, each `{ id, label }`." required: - id - label - kind - values additionalProperties: false - type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The variant attribute’s ID, which `variant` blocks, `when:` conditions and a manual’s variants name, e.g. `model` or `software`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The variant attribute’s name in the editor and where a variant is named, e.g. `Model` (a version shows as `Software 2.1`). One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." kind: type: string enum: - version description: "How the attribute’s values are compared: `enum`, one of a fixed list of values (`values`, e.g. a model or a market), or `version`, a dotted version compared numerically (`2.10` is after `2.9`, e.g. a software version), which lists no values." required: - id - label - kind additionalProperties: false textAttributes: default: [] description: "Named text values that content uses inline (`{product-name}`), each `{ id, label }`; each manual sets their values, per variant where they differ. Left out: none." type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The text attribute’s ID, which text refers to as `{id}`, e.g. `{product-name}`. `empty` is reserved. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The text attribute’s name in the editor, e.g. `Product name`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." required: - id - label additionalProperties: false safetySymbols: default: [] description: "The pictograms safety messages may show, each `{ id, label }`. A symbol without artwork prints as a placeholder in the PDF and is left out of the web page. Left out: none." type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The symbol’s ID, which a safety message’s `symbols` name; its artwork is `symbols/.svg` or `symbols/.png` in the content repository, e.g. `hot-surface`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The symbol’s name in the editor, and its alternative text in outputs, e.g. `Hot surface`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." required: - id - label additionalProperties: false calloutStyles: description: "The marker styles an image callout may use besides the default, each `{ id, label }`, e.g. a square for parts to remove. A callout without a style is a filled circle with its number. Left out: none." type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The style’s ID, which an image callout names in its `style`, e.g. `remove`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its list. label: anyOf: - type: string minLength: 1 - type: object additionalProperties: type: string minLength: 1 description: "The style’s name in the editor, e.g. `Part to remove`. One text for every language, or one per language by language tag (`{ en: Task, de: Handlung }`), the source language’s among them; a language without its own shows the source language’s." required: - id - label additionalProperties: false translations: description: "Per target language, what its labels were translated from: `{ sourceCommit, blocks }`, `blocks` the source hash of each label (`moduleTypes.`, `facets..`, …) its translation was made from. Written by a translation import and by marking a translation current; left out: no record." type: object additionalProperties: type: object properties: sourceCommit: type: string pattern: ^(?:[0-9a-f]{40}|[0-9a-f]{64})$ description: The full ID of the commit whose labels were translated. blocks: type: object additionalProperties: type: string pattern: ^[0-9a-f]{64}$ description: The SHA-256 of the source-language label the translation was made from. description: Per label (`moduleTypes.`, `facets..`, …), the source hash its translation was made from. required: - sourceCommit - blocks additionalProperties: false description: One target language’s record. outputLabels: default: {} description: "The fixed texts outputs print around the content (signal words, admonition captions, the contents title, …), per manual language, each replacing the shipped default. The manual’s language decides them, never the reader’s. Left out: the shipped defaults." type: object additionalProperties: type: object properties: danger: description: "The signal word of a `danger` safety message, e.g. `DANGER`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 warning: description: "The signal word of a `warning` safety message, e.g. `WARNING`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 caution: description: "The signal word of a `caution` safety message, e.g. `CAUTION`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 notice: description: "The signal word of a `notice` safety message, e.g. `NOTICE`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 note: description: "The caption of a `note` admonition, e.g. `Note`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 tip: description: "The caption of a `tip` admonition, e.g. `Tip`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 important: description: "The caption of an `important` admonition, e.g. `Important`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 contents: description: "The title of the table of contents, e.g. `Contents`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 figure: description: "The word before a figure’s number in its caption, e.g. `Figure`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 table: description: "The word before a table’s number in its caption, e.g. `Table`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 unconverted: description: "The caption of content an import could not convert (a passthrough block), e.g. `Unconverted content`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 attachment: description: "The label in front of an attached file’s name, e.g. `Attachment`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 attachmentNote: description: "The note the PDF prints with an attached file, which a reader downloads from the online version, e.g. `Download the file from the online version of this document.`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 glossary: description: "The title of the glossary that ends a manual whose manifest sets `glossary: true`, e.g. `Glossary`. Without it: the label of the base language (`pt` for `pt-BR`), then the shipped default (English, German, French, Arabic and Hebrew ship one), else English, reported as `missing-label`." type: string minLength: 1 additionalProperties: false description: "One language’s labels, by language tag (`pt-BR`; `pt` also fills what a `pt-…` set leaves out): any of the keys below." maxHeadingLevel: default: 3 description: "The deepest heading level the editor offers, 1 to 5: Heading 1 is a section at the top of a module, Heading 2 a section inside it, and so on. Modules stored with deeper sections stay valid. Left out: 3." type: integer minimum: 1 maximum: 5 codeLanguages: default: [] description: "Languages the editor offers for a code block besides the ones it ships, each `{ id, label }`. Left out: only the shipped ones." type: array items: type: object properties: id: type: string maxLength: 32 pattern: ^[A-Za-z0-9][A-Za-z0-9+#._-]*$ description: "The language word a code block stores, one word of letters, digits and `+ # . _ -`, at most 32 characters, e.g. `fortran` or `c++`. An ID the editor already ships replaces its label." label: type: string minLength: 1 description: The language’s name in the editor’s picker, e.g. `Fortran`. required: - id - label additionalProperties: false release: description: "How releases are cut. Left out: every default." type: object properties: productFacet: description: "The ID of the facet whose values are the products a release is cut for (a release is a product at a revision), e.g. `product`; it must name a configured facet. Left out: the first facet." type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ checkManufacturer: description: "`true`: every manual’s checks warn (`missing-manufacturer`) while `manufacturer` is not set, so no manual is released without its imprint. Left out: `false`." type: boolean additionalProperties: false manufacturer: description: "The manufacturer’s details for the imprint: a page design’s back page prints them, and its `manufacturer-name`, `manufacturer-address`, `manufacturer-contact` and `manufacturer-website` placeholders show them on any page. Left out: none (with `release.checkManufacturer`, every manual’s checks warn)." type: object properties: name: type: string minLength: 1 maxLength: 200 pattern: ^\S(?:[^\n\r]*\S)?$ description: The manufacturer’s name as printed, one line, at most 200 characters, e.g. `Example Works Ltd`. address: default: [] description: "The postal address, one entry per printed line, at most 10 lines, e.g. `[1 Sample Street, 12345 Sample Town]`. Left out: none." maxItems: 10 type: array items: type: string minLength: 1 maxLength: 200 pattern: ^\S(?:[^\n\r]*\S)?$ contact: description: "How to reach the manufacturer, one line, e.g. `info@example.com · +1 555 0100`. Left out: none." type: string minLength: 1 maxLength: 200 pattern: ^\S(?:[^\n\r]*\S)?$ website: description: "The manufacturer’s website, an absolute `https:` or `http:` address (or a `mailto:` one), e.g. `https://example.com`. Left out: none." type: string maxLength: 2000 format: uri required: - name additionalProperties: false styleGuide: description: "The house style in plain words (e.g. “Address the reader as you. One instruction per step.”), at most 20,000 characters. The model-based style review sends it with a module’s text when an author asks for one. Left out: the review has no house style to check against." type: string minLength: 1 maxLength: 20000 terminology: description: "How the terminology checks weigh what they find: forbidden variants of approved terms and the variants of deprecated terms, matched in each module’s language without case, as whole words. Left out: every default." type: object properties: forbiddenIsBlocking: default: false description: "`true`: a forbidden variant of an approved term in a module’s text is a blocking check (`forbidden-term`), which holds up review and release until it is replaced. Left out: `false`, a warning. A variant of a deprecated term is always a warning." type: boolean additionalProperties: false styleRules: description: "The house style as rules, per language: phrases and patterns the checks before review and release, the CLI check (`check-content`) and the editor report in each module’s text, with their message and fix, and the longest sentence. Only translatable text is read (never code, literal or passthrough blocks). Left out: no style rules." type: object additionalProperties: type: object properties: maxSentenceWords: description: "The most words a sentence may have, 5 to 200, e.g. `25`: a longer one is a `style-rule` warning. A sentence ends at `.`, `!`, `?` or `…` before white space, or at a line break. Left out: sentences of any length." type: integer minimum: 5 maximum: 200 rules: default: [] description: "The language’s rules, at most 200, each a `style-rule` check where it matches. Left out: none." maxItems: 200 type: array items: type: object properties: id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The rule’s ID, which its findings name, e.g. `in-order-to`. Lowercase letters, digits and `-`, starting with a letter, at most 64 characters; unique in its language. words: description: "A phrase to find, at most 200 characters, e.g. `in order to`: matched as whole words, without case (unless `matchCase`), any white space between its words alike. Give `words` or `pattern`, not both." type: string minLength: 1 maxLength: 200 pattern: ^\S(?:[^\n\r]*\S)?$ pattern: description: "A pattern to find, at most 200 characters, e.g. `\\butili[sz]e\\b`, matched without case (unless `matchCase`) in linear time, never by backtracking: characters, `.`, classes (`[a-z]`, `[^…]`, `\\d`, `\\w` (letters, digits, marks and `_` of any script), `\\s` and their negations), groups (`(…)`, `(?:…)`), `|`, `?`, `*`, `+`, counts up to 20 (`{2}`, `{1,3}`), `^`, `$` and `\\b`, `\\B`. No back-references, lookaround or lazy repetition; a pattern matching empty text, or of more than 300 states once its counts are written out, is refused. Each match is the longest from where it starts, matches never overlap. Give `words` or `pattern`, not both." type: string minLength: 1 maxLength: 200 matchCase: description: "`true`: `words` or `pattern` match only in the case written. Left out: `false`, any case." type: boolean message: type: string minLength: 1 maxLength: 500 pattern: ^\S(?:[^\n\r]*\S)?$ description: What the writer is told, in the language the rule is for, at most 500 characters, e.g. `Write “to”.` replacement: description: "What to write instead, offered as the fix, e.g. `to`; empty: delete what was found. For `words` without `matchCase`, written in the case found (a capital first, or all capitals). Left out: no fix is offered." type: string maxLength: 200 pattern: ^[^\n\r]*$ severity: description: "`warning`, worth a look, or `blocking`, which holds up review and release until it is fixed. Left out: `warning`." type: string enum: - warning - blocking required: - id - message additionalProperties: false description: "One rule: a phrase or a pattern, and its message." additionalProperties: false description: One language’s style rules, by language tag, e.g. `en`; it must be a configured language. pdf: default: standard: ua-1 description: "How manuals are made as PDF. Left out: every default." type: object properties: standard: default: ua-1 description: "The standard every manual’s PDF is made to: `ua-1`, PDF/UA-1, tagged and accessible (a document that cannot meet it is refused), or `none`, a plain PDF. Left out: `ua-1`." type: string enum: - ua-1 - none design: description: "The page design of every manual whose manifest names none, by its ID: the file `design/.yaml` in the content repository, e.g. `classic-a4`. Left out: the built-in design." type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ calloutLabelMinSize: description: "The smallest text size, in points, that a callout legend beside its image shrinks to before what still does not fit is cut off and reported, 4 to 12, e.g. `7.5`. Left out: 6." type: number minimum: 4 maximum: 12 additionalProperties: false delivery: default: access: signed-in missingLanguage: picker pdfQrCode: none manuals: {} description: "The stable addresses that open a product’s latest released manual, for links and QR codes. Left out: every default." type: object properties: access: default: signed-in description: "Who may open a manual’s stable address (`/d////`, the latest release’s manual): `public`, anyone without signing in; `signed-in`, a signed-in reader allowed to read content; or `off`, nobody. The installation may cap it to less. Left out: `signed-in`." type: string enum: - public - signed-in - off publicAudience: description: "The most restricted audience level a public address shows, by its ID, e.g. `operator`; it must name a configured audience. Left out: the first, least restricted level." type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ missingLanguage: default: picker description: "What an address in a language the release does not have opens: `picker`, a page listing the languages it has, or `source`, the manual in the source language. Left out: `picker`." type: string enum: - picker - source pdfQrCode: default: none description: "Where a release’s PDF prints the QR code of its stable address: `none`, on the `title-page`, or on a `back-cover` page of its own at the end. Printed only when the addresses are `public` (after the installation’s cap) and the installation’s public URL is set. Left out: `none`." type: string enum: - none - title-page - back-cover manuals: default: {} description: "Per manual ID, its address segment and its former ones. Left out: every manual is addressed by its ID." type: object additionalProperties: type: object properties: slug: description: "The manual’s segment in its address, a lowercase slug, e.g. `operating` in `/d/north/operating/…`; no two manuals share one. Left out: the manual’s ID." type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ formerly: default: [] description: "Segments the manual had before, at most 20, e.g. `[user-guide]`: an address with one leads to the current one, and a release made before the rename holds the manual under it. None may be another manual’s address. Left out: none." maxItems: 20 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ additionalProperties: false description: One manual’s address, by the manual’s ID, e.g. `operating-manual`. additionalProperties: false iirds: description: "The iiRDS export: how module types, audiences, facets and variant attributes map to the iiRDS vocabulary, by the standard’s names. Left out: releases are not exported as iiRDS packages." type: object properties: baseIri: type: string description: "Where the package’s own IRIs are made (`releases//…`, `modules/`): an absolute `http` or `https` IRI ending in `/`, without query, fragment or user information, at most 200 characters, e.g. `https://docs.example.com/iirds/`." documentTypes: minItems: 1 maxItems: 20 type: array items: type: string enum: - AdministratorGuide - AssemblyInstructions - BillOfMaterials - CEDeclarationOfConformity - Certificate - ContractualDocument - ElectronicIdentificationPlate - IdentificationDocument - InstallationInstructions - MaintenanceInstructions - OperatingInstructions - PartsCatalog - Plan - QuickGuide - RepairInstructions - SafetyInstructions - SalesCatalog - Specification - TechnicalDrawingDiagram - TransportInstructions description: The document types of every manual, at least one as iiRDS requires, no repeats, e.g. `[OperatingInstructions]`; a manual listed in `manualDocumentTypes` takes its own instead. manualDocumentTypes: default: {} description: "Per manual ID, document types replacing `documentTypes` for that manual. At most 1,000 manuals. Left out: every manual has `documentTypes`." type: object additionalProperties: minItems: 1 maxItems: 20 type: array items: type: string enum: - AdministratorGuide - AssemblyInstructions - BillOfMaterials - CEDeclarationOfConformity - Certificate - ContractualDocument - ElectronicIdentificationPlate - IdentificationDocument - InstallationInstructions - MaintenanceInstructions - OperatingInstructions - PartsCatalog - Plan - QuickGuide - RepairInstructions - SafetyInstructions - SalesCatalog - Specification - TechnicalDrawingDiagram - TransportInstructions description: "One manual’s document types, by the manual’s ID, e.g. `service-manual: [MaintenanceInstructions]`." moduleTypes: default: {} description: Per module type ID, the iiRDS topic type and information subjects of its modules. One the mapping leaves out has no such metadata in the package, and the export warns. type: object additionalProperties: anyOf: - type: string enum: - GenericConcept - GenericForm - GenericLearning - GenericReference - GenericTask - GenericTroubleshooting - type: object properties: topicType: description: "The topic type its modules are, e.g. `GenericConcept`. Left out: the package names none for them." type: string enum: - GenericConcept - GenericForm - GenericLearning - GenericReference - GenericTask - GenericTroubleshooting subjects: description: "The information subjects its modules are about, at least one, no repeats, e.g. `[SafetyInstruction]`. Left out: none." minItems: 1 maxItems: 31 type: array items: type: string enum: - ApplicableStandards - Caution - ContactInformation - Danger - DeclarationOfConformity - ForeseeableMisuse - GenericCollection - GenericConformity - GenericFormality - GenericFunctionality - GenericProcess - GenericSafety - GenericTechnicalData - GenericTechnicalOverview - GenericWarningMessage - IntendedUse - LegalInformation - LicenceTerm - ManufacturerInformation - Notice - OperatingElement - ProductIdentification - ProductName - RestrictionOnUse - RiskAssessment - SafetyInstruction - ScopeOfDelivery - Symbol - TechnicalReport - WarrantyConditions - Warning additionalProperties: false description: "One module type’s mapping, by the module type’s ID: its topic type alone (`task: GenericTask`), or `{ topicType, subjects }` with either or both (`safety: { topicType: GenericConcept, subjects: [SafetyInstruction] }`)." audiences: default: {} description: "Per audience level ID, the qualification class it is: `Role` or `SkillLevel`, e.g. `{ operator: Role }`. One the mapping leaves out has no such metadata in the package, and the export warns." type: object additionalProperties: type: string enum: - Role - SkillLevel facets: default: {} description: "Per facet ID, the product metadata class its values are: `ProductVariant`, `Component`, `ProductFunction` or `ProductProperty`, e.g. `{ region: ProductVariant }`. One the mapping leaves out has no such metadata in the package, and the export warns." type: object additionalProperties: type: string enum: - ProductVariant - Component - ProductFunction - ProductProperty variantAttributes: default: {} description: "Per variant attribute ID, the product metadata class its values are, as for `facets`, e.g. `{ model: ProductVariant }`. One the mapping leaves out has no such metadata in the package, and the export warns." type: object additionalProperties: type: string enum: - ProductVariant - Component - ProductFunction - ProductProperty lifecyclePhases: description: "A facet whose values are product lifecycle phases, and the phase each value is. Left out: the package names no lifecycle phases." type: object properties: facet: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The ID of the facet whose values are lifecycle phases, e.g. `phase`; it must not also be in `facets`. values: type: object additionalProperties: type: string enum: - Acquisition - Configuration - Decommissioning - Design - Development - Diagnostics - Disposal - EmergencyOperation - Fault - GenericAfterUse - GenericDesignAndRealization - GenericPuttingToUse - GenericUse - Installation - Maintenance - Operation - Production - Repair - RequirementsAnalysis description: "Per value ID of that facet, the lifecycle phase it is, e.g. `{ use: Operation }`. A value left out has no phase, and the export warns." required: - facet - values additionalProperties: false required: - baseIri - documentTypes additionalProperties: false dita: description: "The DITA 1.3 import: which topic types, output classes, profiling attributes, keys and hazard symbols become which module types, variant attributes, audience levels, text attributes and safety symbols. Keys are DITA names, values the project’s IDs. Left out: the import’s defaults (names matched by the same IDs)." type: object properties: moduleTypes: default: {} description: "Per topic type (a topic’s root element: `concept`, `task`, … or a specialisation’s), the module type its topics become, e.g. `{ task: procedure }`. Keys are DITA names (one token, no whitespace or parentheses), at most 1,000 entries. Left out, or a name not listed: a configured module type named like the topic type, else `defaultModuleType`." type: object additionalProperties: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ outputclasses: default: {} description: "Per token of a topic’s `@outputclass`, the module type its topics become; it wins over `moduleTypes`, e.g. `{ howto: procedure }`. Keys are DITA names (one token, no whitespace or parentheses), at most 1,000 entries. Left out, or a name not listed: `moduleTypes` decides." type: object additionalProperties: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ defaultModuleType: description: "The module type, by ID, of a topic whose type neither `outputclasses`, `moduleTypes` nor a configured module type of the same name gives, e.g. `concept`. Left out: the first configured module type." type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ profiling: default: {} description: 'Per profiling attribute (or a group name inside one, `product="unit(basic)"`), what its values become, e.g. `{ product: { variantAttribute: model } }`. Keys are DITA names (one token, no whitespace or parentheses), at most 1,000 entries. Left out, or a name not listed: a profiling attribute named like a variant attribute maps to it, and `audience` to the audience levels of the same IDs.' type: object additionalProperties: anyOf: - type: object properties: variantAttribute: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: The ID of the variant attribute the profiling attribute’s values become, e.g. `model`. values: description: "Per DITA value, the variant attribute’s value it becomes, e.g. `{ basic-unit: basic }`. Left out, or a DITA value not listed: the value of the same ID." type: object additionalProperties: type: string minLength: 1 maxLength: 100 required: - variantAttribute additionalProperties: false - type: object properties: audience: type: object additionalProperties: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: "Per DITA value, the audience level’s ID it becomes, e.g. `{ user: operator }`. It applies only where a module or a manual entry starts." required: - audience additionalProperties: false description: "What one profiling attribute’s values become: a variant attribute’s values (`{ variantAttribute, values }`) or audience levels (`{ audience }`)." textKeys: default: {} description: 'Per key that holds text (`` with a ``), the text attribute an empty `` becomes, e.g. `{ prodname: product-name }`. Keys are DITA names (one token, no whitespace or parentheses), at most 1,000 entries. Left out, or a name not listed: a text attribute named like the key, if there is one; any other key is imported as its text.' type: object additionalProperties: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ hazardSymbols: default: {} description: "Per `` file name (its `@href`’s last segment) or key, the safety symbol it becomes, e.g. `{ hot-surface.svg: hot-surface }`. Keys are DITA names (one token, no whitespace or parentheses), at most 1,000 entries. Left out, or a name not listed: the symbol is left out, and the import reports it." type: object additionalProperties: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ ditavalDefault: default: none description: "What becomes of a DITAVAL file no map names: `none`, it is not applied (and reported), or `all`, it becomes a variant of every manual. Left out: `none`." type: string enum: - none - all additionalProperties: false required: - languages - moduleTypes - audiences additionalProperties: false ConfigWorkingCopyDocument: type: object properties: data: $ref: "#/components/schemas/ConfigWorkingCopyResource" required: - data additionalProperties: false ConfigWorkingCopyResource: type: object properties: type: type: string enum: - WorkingCopy id: type: string attributes: type: object properties: subject: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: The module, manual, configuration, term, page design or template file it is a copy of. content: description: The configuration (`openfolia.yaml`) as the content model reads it. allOf: - $ref: "#/components/schemas/ProjectConfig" version: type: integer minimum: 0 maximum: 9007199254740991 description: How many times it was saved; 0 when nothing is saved and `content` is the committed file. Send it back with the next save. baseCommit: type: string description: The commit the content is based on (for the committed file, the commit it was read at); send it with the next save. updatedBy: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who saved it last. updatedAt: description: When it was saved last. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - subject - content - version - baseCommit additionalProperties: false relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false meta: type: object properties: saved: type: boolean description: "Whether a working copy is saved; false: `content` is the file committed on the change set’s branch." issues: type: array items: $ref: "#/components/schemas/Issue" description: Problems found checking it against the configuration; a draft may have them. required: - saved - issues additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is `/module//`, `/manual/`, `/config`, `/term/`, `/design/` or `/template//`." SaveTermWorkingCopyDocument: type: object properties: data: type: object properties: type: type: string enum: - WorkingCopy attributes: type: object properties: content: description: The term; its `id` must be the path’s. allOf: - $ref: "#/components/schemas/Term" required: - content additionalProperties: false required: - type - attributes additionalProperties: false meta: type: object properties: version: type: integer minimum: 0 maximum: 2147483647 description: "The version this save is based on: the `version` last read or saved (0 when none is saved yet). Another one is 409 `version-conflict`." baseCommit: type: string pattern: ^[0-9a-f]{40}(?:[0-9a-f]{24})?$ description: "The commit the content is based on: the `baseCommit` last read or saved; for a module or manual not on the branch yet (read is 404), the change set’s `baseCommit`. When the file has changed on the branch since, the save is 409 `stale-working-copy` (`meta.head`: the head to read it at); a save point refuses the same. A newer commit at which the file is unchanged is stored as the base instead." required: - version - baseCommit additionalProperties: false required: - data - meta additionalProperties: false TermLanguage: type: object properties: preferred: type: string minLength: 1 maxLength: 200 pattern: ^[^\p{Cc}]*$ allowed: default: [] maxItems: 50 type: array items: $ref: "#/components/schemas/TermVariant" forbidden: default: [] maxItems: 50 type: array items: $ref: "#/components/schemas/TermVariant" definition: allOf: - $ref: "#/components/schemas/TermDefinition" usage: type: string minLength: 1 maxLength: 10000 pattern: ^(?:[^\p{Cc}]|[\n\t])*$ required: - preferred - allowed - forbidden additionalProperties: false TermVariant: type: object properties: term: type: string minLength: 1 maxLength: 200 pattern: ^[^\p{Cc}]*$ note: type: string minLength: 1 maxLength: 1000 pattern: ^(?:[^\p{Cc}]|[\n\t])*$ required: - term additionalProperties: false TermDefinition: minItems: 1 maxItems: 1000 type: array items: oneOf: - type: object properties: type: type: string enum: - text text: type: string minLength: 1 pattern: ^[^\n\r]*$ marks: type: array items: $ref: "#/components/schemas/Mark" required: - type - text additionalProperties: false - type: object properties: type: type: string enum: - hardBreak required: - type additionalProperties: false Term: type: object properties: schemaVersion: type: number enum: - 1 id: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ status: default: proposed type: string enum: - proposed - approved - deprecated domain: type: string minLength: 1 maxLength: 100 pattern: ^[^\p{Cc}]*$ replacedBy: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ languages: type: object additionalProperties: $ref: "#/components/schemas/TermLanguage" required: - schemaVersion - id - status - languages additionalProperties: false TermWorkingCopyDocument: type: object properties: data: $ref: "#/components/schemas/TermWorkingCopyResource" required: - data additionalProperties: false TermWorkingCopyResource: type: object properties: type: type: string enum: - WorkingCopy id: type: string attributes: type: object properties: subject: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: The module, manual, configuration, term, page design or template file it is a copy of. content: description: The term (`terms/.yaml`). allOf: - $ref: "#/components/schemas/Term" version: type: integer minimum: 0 maximum: 9007199254740991 description: How many times it was saved; 0 when nothing is saved and `content` is the committed file. Send it back with the next save. baseCommit: type: string description: The commit the content is based on (for the committed file, the commit it was read at); send it with the next save. updatedBy: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who saved it last. updatedAt: description: When it was saved last. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - subject - content - version - baseCommit additionalProperties: false relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false meta: type: object properties: saved: type: boolean description: "Whether a working copy is saved; false: `content` is the file committed on the change set’s branch." issues: type: array items: $ref: "#/components/schemas/Issue" description: Problems found checking it against the configuration; a draft may have them. required: - saved - issues additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is `/module//`, `/manual/`, `/config`, `/term/`, `/design/` or `/template//`." SavePageDesignWorkingCopyDocument: type: object properties: data: type: object properties: type: type: string enum: - WorkingCopy attributes: type: object properties: content: description: The page design; its `id` must be the path’s. A setting left out takes its default; an unknown member is refused (400). allOf: - $ref: "#/components/schemas/PageDesign" required: - content additionalProperties: false required: - type - attributes additionalProperties: false meta: type: object properties: version: type: integer minimum: 0 maximum: 2147483647 description: "The version this save is based on: the `version` last read or saved (0 when none is saved yet). Another one is 409 `version-conflict`." baseCommit: type: string pattern: ^[0-9a-f]{40}(?:[0-9a-f]{24})?$ description: "The commit the content is based on: the `baseCommit` last read or saved; for a module or manual not on the branch yet (read is 404), the change set’s `baseCommit`. When the file has changed on the branch since, the save is 409 `stale-working-copy` (`meta.head`: the head to read it at); a save point refuses the same. A newer commit at which the file is unchanged is stored as the base instead." required: - version - baseCommit additionalProperties: false required: - data - meta additionalProperties: false PageDesign: type: object properties: schemaVersion: type: number enum: - 1 id: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ name: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ preset: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ template: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ page: default: size: a4 margins: top: 26 right: 22 bottom: 24 left: 22 doubleSided: false type: object properties: size: default: a4 type: string enum: - a4 - us-letter - a5 margins: default: top: 26 right: 22 bottom: 24 left: 22 type: object properties: top: type: number minimum: 0 maximum: 100 right: type: number minimum: 0 maximum: 100 bottom: type: number minimum: 0 maximum: 100 left: type: number minimum: 0 maximum: 100 required: - top - right - bottom - left additionalProperties: false doubleSided: default: false type: boolean required: - size - margins - doubleSided additionalProperties: false colours: type: object properties: primary: type: string pattern: ^#[0-9a-f]{6}$ accent: type: string pattern: ^#[0-9a-f]{6}$ text: type: string pattern: ^#[0-9a-f]{6}$ required: - primary - accent - text additionalProperties: false fonts: default: embeddingAllowed: false type: object properties: body: type: object properties: family: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ regular: type: string pattern: ^sha256:[a-f0-9]{64}$ bold: type: string pattern: ^sha256:[a-f0-9]{64}$ italic: type: string pattern: ^sha256:[a-f0-9]{64}$ boldItalic: type: string pattern: ^sha256:[a-f0-9]{64}$ required: - family - regular additionalProperties: false heading: type: object properties: family: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ regular: type: string pattern: ^sha256:[a-f0-9]{64}$ bold: type: string pattern: ^sha256:[a-f0-9]{64}$ italic: type: string pattern: ^sha256:[a-f0-9]{64}$ boldItalic: type: string pattern: ^sha256:[a-f0-9]{64}$ required: - family - regular additionalProperties: false embeddingAllowed: default: false type: boolean required: - embeddingAllowed additionalProperties: false logo: type: object properties: light: type: string pattern: ^sha256:[a-f0-9]{64}$ dark: type: string pattern: ^sha256:[a-f0-9]{64}$ required: - light additionalProperties: false titlePage: default: fields: - title - variant - language - release - date type: object properties: fields: type: array items: type: string enum: - title - subtitle - product - variant - product-version - language - release - date - document-number - revision-number - audience required: - fields additionalProperties: false regions: default: {} type: object additionalProperties: anyOf: - minItems: 1 maxItems: 50 type: array items: $ref: "#/components/schemas/Block" - type: object additionalProperties: minItems: 1 maxItems: 50 type: array items: $ref: "#/components/schemas/Block" translations: type: object additionalProperties: type: object properties: sourceCommit: type: string pattern: ^(?:[0-9a-f]{40}|[0-9a-f]{64})$ blocks: type: object additionalProperties: type: string pattern: ^[0-9a-f]{64}$ required: - sourceCommit - blocks additionalProperties: false coverImage: type: object properties: default: type: object properties: asset: type: string pattern: ^sha256:[a-f0-9]{64}$ alt: anyOf: - type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ required: - asset additionalProperties: false variants: default: [] maxItems: 100 type: array items: type: object properties: asset: type: string pattern: ^sha256:[a-f0-9]{64}$ alt: anyOf: - type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ when: $ref: "#/components/schemas/Condition" required: - asset - when additionalProperties: false required: - variants additionalProperties: false backPage: type: object properties: position: default: last type: string enum: - last - inside-cover copyright: anyOf: - type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ documentNumber: default: true type: boolean date: default: true type: boolean required: - position - documentNumber - date additionalProperties: false header: default: default: left: - type: placeholder key: title right: - type: placeholder key: variant type: object properties: default: type: object properties: left: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" centre: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" right: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" additionalProperties: false first: type: object properties: left: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" centre: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" right: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" additionalProperties: false even: type: object properties: left: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" centre: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" right: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" additionalProperties: false required: - default additionalProperties: false footer: default: default: left: - type: placeholder key: language right: - type: placeholder key: page type: object properties: default: type: object properties: left: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" centre: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" right: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" additionalProperties: false first: type: object properties: left: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" centre: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" right: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" additionalProperties: false even: type: object properties: left: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" centre: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" right: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" additionalProperties: false required: - default additionalProperties: false headings: default: numbering: - decimal sizes: - 3xl - 2xl - xl - base colour: text pageBreakBeforeLevel1: true type: object properties: numbering: default: - decimal minItems: 1 maxItems: 6 type: array items: type: string enum: - decimal - none sizes: default: - 3xl - 2xl - xl - base minItems: 1 maxItems: 6 type: array items: type: string enum: - base - lg - xl - 2xl - 3xl colour: default: text type: string enum: - text - primary - accent pageBreakBeforeLevel1: default: true type: boolean required: - numbering - sizes - colour - pageBreakBeforeLevel1 additionalProperties: false body: default: fontSize: 10 lineHeight: 1.45 paragraphSpacing: 7 columns: 1 type: object properties: fontSize: default: 10 type: number minimum: 6 maximum: 24 lineHeight: default: 1.45 type: number minimum: 1 maximum: 3 paragraphSpacing: default: 7 type: number minimum: 0 maximum: 36 columns: default: 1 anyOf: - type: number enum: - 1 - type: number enum: - 2 required: - fontSize - lineHeight - paragraphSpacing - columns additionalProperties: false tables: default: headerTint: true borders: horizontal zebra: false type: object properties: headerTint: default: true type: boolean borders: default: horizontal type: string enum: - none - horizontal - grid zebra: default: false type: boolean required: - headerTint - borders - zebra additionalProperties: false steps: default: marker: filled-circle type: object properties: marker: default: filled-circle type: string enum: - filled-circle - number required: - marker additionalProperties: false notes: default: style: tinted type: object properties: style: default: tinted type: string enum: - tinted - framed required: - style additionalProperties: false safety: default: standard: ansi-z535 type: object properties: standard: default: ansi-z535 type: string enum: - ansi-z535 - iso-3864 required: - standard additionalProperties: false required: - schemaVersion - id - name - preset - page - colours - fonts - titlePage - regions - header - footer - headings - body - tables - steps - notes - safety additionalProperties: false PageDesignWorkingCopyDocument: type: object properties: data: $ref: "#/components/schemas/PageDesignWorkingCopyResource" required: - data additionalProperties: false PageDesignWorkingCopyResource: type: object properties: type: type: string enum: - WorkingCopy id: type: string attributes: type: object properties: subject: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: The module, manual, configuration, term, page design or template file it is a copy of. content: description: "The page design (`design/.yaml`, #390), every setting with its default filled in." allOf: - $ref: "#/components/schemas/PageDesign" version: type: integer minimum: 0 maximum: 9007199254740991 description: How many times it was saved; 0 when nothing is saved and `content` is the committed file. Send it back with the next save. baseCommit: type: string description: The commit the content is based on (for the committed file, the commit it was read at); send it with the next save. updatedBy: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who saved it last. updatedAt: description: When it was saved last. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - subject - content - version - baseCommit additionalProperties: false relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false meta: type: object properties: saved: type: boolean description: "Whether a working copy is saved; false: `content` is the file committed on the change set’s branch." issues: type: array items: $ref: "#/components/schemas/Issue" description: Problems found checking it against the configuration; a draft may have them. required: - saved - issues additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is `/module//`, `/manual/`, `/config`, `/term/`, `/design/` or `/template//`." SaveTemplateFileWorkingCopyDocument: type: object properties: data: type: object properties: type: type: string enum: - WorkingCopy attributes: type: object properties: content: description: The template file’s whole text (`schemaVersion` 1), at most 256 KiB as UTF-8, without NUL characters. allOf: - $ref: "#/components/schemas/TemplateFileContent" required: - content additionalProperties: false required: - type - attributes additionalProperties: false meta: type: object properties: version: type: integer minimum: 0 maximum: 2147483647 description: "The version this save is based on: the `version` last read or saved (0 when none is saved yet). Another one is 409 `version-conflict`." baseCommit: type: string pattern: ^[0-9a-f]{40}(?:[0-9a-f]{24})?$ description: "The commit the content is based on: the `baseCommit` last read or saved; for a module or manual not on the branch yet (read is 404), the change set’s `baseCommit`. When the file has changed on the branch since, the save is 409 `stale-working-copy` (`meta.head`: the head to read it at); a save point refuses the same. A newer commit at which the file is unchanged is stored as the base instead." required: - version - baseCommit additionalProperties: false required: - data - meta additionalProperties: false TemplateFileContent: type: object properties: schemaVersion: type: number enum: - 1 text: type: string maxLength: 262144 required: - schemaVersion - text additionalProperties: false TemplateFileWorkingCopyDocument: type: object properties: data: $ref: "#/components/schemas/TemplateFileWorkingCopyResource" required: - data additionalProperties: false TemplateFileWorkingCopyResource: type: object properties: type: type: string enum: - WorkingCopy id: type: string attributes: type: object properties: subject: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: The module, manual, configuration, term, page design or template file it is a copy of. content: description: The template file’s text (#396), as the file holds it. allOf: - $ref: "#/components/schemas/TemplateFileContent" version: type: integer minimum: 0 maximum: 9007199254740991 description: How many times it was saved; 0 when nothing is saved and `content` is the committed file. Send it back with the next save. baseCommit: type: string description: The commit the content is based on (for the committed file, the commit it was read at); send it with the next save. updatedBy: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who saved it last. updatedAt: description: When it was saved last. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - subject - content - version - baseCommit additionalProperties: false relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false meta: type: object properties: saved: type: boolean description: "Whether a working copy is saved; false: `content` is the file committed on the change set’s branch." issues: type: array items: $ref: "#/components/schemas/Issue" description: Problems found checking it against the configuration; a draft may have them. required: - saved - issues additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is `/module//`, `/manual/`, `/config`, `/term/`, `/design/` or `/template//`." CreateCommitDocument: type: object properties: data: type: object properties: type: type: string enum: - Commit attributes: type: object properties: subjects: maxItems: 1000 type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string maxLength: 35 moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: "The working copies to commit. Default: every working copy of the change set." deletes: maxItems: 1000 type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string maxLength: 35 moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: Modules, manuals, terms and page designs to delete in the same commit (their working copies, if any, are dropped); the configuration is never deleted (422 `not-deletable`), nor a page design still named by the configuration or a manual (409 `design-in-use`). message: description: "The commit message (up to 10,000 characters; no `---` lines, and not ending in `Key: value` lines). Default: what changed." type: string minLength: 1 maxLength: 10000 additionalProperties: false required: - type - attributes additionalProperties: false additionalProperties: false NoCommitDocument: type: object properties: meta: type: object properties: commit: type: string nullable: true enum: - null description: No commit was made. head: type: string description: The branch head, unchanged. unchanged: type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: "Working copies dropped because they hold exactly what is committed, and listed subjects that have none: nothing to commit for these." required: - commit - head - unchanged additionalProperties: false required: - meta additionalProperties: false CommitDocument: type: object properties: data: $ref: "#/components/schemas/CommitResource" required: - data additionalProperties: false CommitResource: type: object properties: type: type: string enum: - Commit id: type: string attributes: type: object properties: branch: type: string description: The change set’s branch. parent: type: string description: The branch head it was made on. message: type: string written: type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: Modules and manuals written (created or replaced). deleted: type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: Modules and manuals deleted. required: - branch - parent - message - written - deleted additionalProperties: false relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false meta: type: object properties: unchanged: type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: "Working copies dropped because they hold exactly what is committed, and listed subjects that have none: nothing to commit for these." required: - unchanged additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is the commit’s ID." CreateRevertDocument: type: object properties: data: type: object properties: type: type: string enum: - Revert attributes: type: object properties: subjects: minItems: 1 maxItems: 1000 type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string maxLength: 35 moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: "The modules and manuals to take out of the change set: each goes back to what it is at the change set’s base commit." required: - subjects additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false RevertDocument: type: object properties: meta: type: object properties: commit: nullable: true description: The commit made; null when only working copies were dropped. type: string head: type: string description: The change set’s branch head now. restored: type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: Modules and manuals put back as they are at the base commit. deleted: type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: Modules and manuals the change set created, deleted. discarded: type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: Modules and manuals whose working copy was dropped. required: - commit - head - restored - deleted - discarded additionalProperties: false required: - meta additionalProperties: false ReviewDocument: type: object properties: data: $ref: "#/components/schemas/ChangeSetResource" meta: type: object properties: review: $ref: "#/components/schemas/ReviewMeta" required: - review additionalProperties: false required: - data - meta additionalProperties: false ReviewMeta: type: object properties: required: type: array items: type: string description: "`review`, or `sign-off/` for a restricted module type (`restricted: true` in the configuration)." description: Every approval the change set needs, in order. granted: type: array items: type: string description: "`review`, or `sign-off/` for a restricted module type (`restricted: true` in the configuration)." description: The ones this request met. pending: type: array items: type: string description: "`review`, or `sign-off/` for a restricted module type (`restricted: true` in the configuration)." description: The ones still unmet; empty once it is approved. approvals: type: array items: type: object properties: requirement: type: string description: "`review`, or `sign-off/` for a restricted module type (`restricted: true` in the configuration)." approver: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false head: type: string description: The commit approved (its review head). self: type: boolean description: Given by the change set’s own author, as the installation’s self-approval rule allowed when it was given. at: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - requirement - approver - head - self - at additionalProperties: false description: The approvals of its review head, oldest first. lapsed: type: array items: type: object properties: requirement: type: string description: "`review`, or `sign-off/` for a restricted module type (`restricted: true` in the configuration)." approver: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false head: type: string description: The commit approved (its review head). self: type: boolean description: Given by the change set’s own author, as the installation’s self-approval rule allowed when it was given. at: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - requirement - approver - head - self - at additionalProperties: false description: "Those of them that no longer hold: their approver lost the role or scope they took (or is gone). They count for nothing; `pending` already says what is unmet." selfApproved: type: boolean description: "Approved by its author: an approval of `approvals` that still holds (not `lapsed`) was given by the change set’s own author (`self`)." selfApproval: type: string enum: - never - review - review-and-sign-off description: "The installation’s self-approval rule now (`GET /settings`): `never` (four eyes), `review` (its author may give the review approval, not a sign-off) or `review-and-sign-off`. Approvals given under an earlier rule stay." yours: type: boolean description: "Whether you count as its author: you started it, or wrote a commit it holds (one carried into it by a carry-forward or a move onto a rewritten base included). Four eyes and `selfApproval` apply to you then. Who else counts is not told." required: - required - granted - pending - approvals - lapsed - selfApproved - selfApproval - yours additionalProperties: false TransitionDocument: type: object properties: meta: type: object properties: comment: description: Why (changes requested, what was checked), recorded in the audit log. Up to 10,000 characters. type: string minLength: 1 maxLength: 10000 additionalProperties: false additionalProperties: false MergeDocument: type: object properties: data: $ref: "#/components/schemas/ChangeSetResource" meta: type: object properties: merge: type: object properties: commit: type: string description: "Where the base branch now is: the merge commit." fastForward: type: boolean required: - commit - fastForward additionalProperties: false required: - merge additionalProperties: false required: - data - meta additionalProperties: false RefreshChangeSetDocument: type: object properties: meta: type: object properties: comment: description: Why, recorded in the audit log. Up to 10,000 characters. type: string minLength: 1 maxLength: 10000 keep: description: "Subjects resolved by their author: where its file conflicts with the base, the change set’s version is kept. Each must have been saved (a working-copy save) since an update reported it conflicting, against a base whose file is still the one reported; else 409 `refresh-unresolved`. Their working copies are committed first, as a save point. Each needs the change set’s lock where it conflicts. At most 100 with `keepMine`." maxItems: 100 type: array items: $ref: "#/components/schemas/LockSubject" keepMine: description: "Subjects the author keeps as the change set has them by explicit choice (“Keep my version”), saved since or not: the base’s change is dropped where it conflicts. Otherwise as `keep` (never both for one subject); audited apart (`keptByChoice`)." maxItems: 100 type: array items: $ref: "#/components/schemas/LockSubject" additionalProperties: false additionalProperties: false RefreshDocument: type: object properties: data: $ref: "#/components/schemas/ChangeSetResource" meta: type: object properties: refresh: type: object properties: updated: type: boolean description: "False when its branch held the base’s head already: nothing was written to Git." head: type: string description: Where its branch is now. fastForward: type: boolean description: Its branch moved to the base’s head (it had no commits of its own). savePoint: nullable: true description: The save point that committed the kept subjects’ working copies first; null when there was none. type: string required: - updated - head - fastForward - savePoint additionalProperties: false required: - refresh additionalProperties: false required: - data - meta additionalProperties: false RefreshConflictPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/RefreshConflictResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false RefreshConflictResource: type: object properties: type: type: string enum: - RefreshConflict id: type: string attributes: type: object properties: subject: $ref: "#/components/schemas/LockSubject" path: type: string description: The subject’s file in the repository. base: type: string description: The base branch’s head the conflict was reported against. reportedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ savedAt: nullable: true description: "The first working-copy save since the report: “Update again” may keep it (`meta.keep`) once set. Null while it was not saved." type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - subject - path - base - reportedAt - savedAt additionalProperties: false relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false required: - type - id - attributes - relationships additionalProperties: false description: "`id` is `module//`, `manual/`, `config` or `term/`." CarryForwardDocument: type: object properties: data: $ref: "#/components/schemas/ChangeSetResource" meta: type: object properties: carryForward: type: object properties: from: type: string description: The change set carried forward (merged into a maintenance line). commit: nullable: true description: The commit on the new branch holding what applied; null when nothing did. type: string applied: type: array items: $ref: "#/components/schemas/LockSubject" description: What that commit changes (written or deleted). conflicts: type: array items: $ref: "#/components/schemas/CarryConflict" description: "What did not apply, by path, at most 100: left unchanged on the new branch for the author to fix in the editor (the change set holds its lock where it could take it)." total: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Conflicts in all. required: - from - commit - applied - conflicts - total additionalProperties: false required: - carryForward additionalProperties: false required: - data - meta additionalProperties: false CarryConflict: type: object properties: path: type: string subject: allOf: - $ref: "#/components/schemas/LockSubject" kinds: type: array items: type: string description: "Why it was left as it is there: git’s conflict kinds (`contents`, `modify/delete`, …), `locked` (another change set holds it), `too-many-locks` (the change set holds as many as it may), `forbidden` (alone: outside the actor’s scope, there or as merged), `invalid` (the merged file is no such file, or a module naming more than 200 files), `unknown-asset` (a module names a file you may not use: one no module you may see there or on the base uses, and not uploaded into a change set of yours), `translation-record` (a page design’s or manual’s translation record you may not write: only a translation manager of its language changes it), `unsupported` (no module, manual, configuration or term), `binary`." blockIds: description: "For a module: the blocks the carried change set changed in it, to apply by hand." type: array items: type: string required: - path - kinds additionalProperties: false RebaseDocument: type: object properties: data: description: The new draft change set on the base’s current head (yours), with the same title and description. allOf: - $ref: "#/components/schemas/ChangeSetResource" meta: type: object properties: rebase: type: object properties: from: type: string description: "The change set moved: abandoned now, superseded by the new one." commit: nullable: true description: The commit on the new branch holding what applied; null when nothing did. type: string applied: type: array items: $ref: "#/components/schemas/LockSubject" description: What that commit changes (written or deleted). conflicts: type: array items: $ref: "#/components/schemas/CarryConflict" description: "What did not apply, by path, at most 100: left unchanged on the new branch for the author to fix in the editor (the change set holds its lock where it could take it)." total: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Conflicts in all. required: - from - commit - applied - conflicts - total additionalProperties: false required: - rebase additionalProperties: false required: - data - meta additionalProperties: false ManualPageDocument: type: object properties: data: type: array items: anyOf: - $ref: "#/components/schemas/ManualResource" - $ref: "#/components/schemas/UnreadableManualResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ManualResource: type: object properties: type: type: string enum: - Manual id: type: string attributes: $ref: "#/components/schemas/ManualAttributes" meta: type: object properties: variants: type: array items: $ref: "#/components/schemas/VariantSummary" description: The published variants, with the slugs other routes take. issues: type: array items: $ref: "#/components/schemas/Issue" design: $ref: "#/components/schemas/DesignInUse" deleted: description: "Set for a manual deleted on the ref’s first-parent line (`filter[status]`, #321): its newest deletion. The rest is then its last manifest the reader may see." type: object properties: commit: type: string description: The commit that deleted it. committedAt: type: string description: When (ISO 8601). required: - commit - committedAt additionalProperties: false required: - variants - issues - design additionalProperties: false required: - type - id - attributes - meta additionalProperties: false ManualAttributes: type: object properties: schemaVersion: type: number enum: - 1 kind: description: "`derived` (#451): its entries are gathered from another manual by `rule`, never written by hand. Absent: an assembled manual." type: string enum: - derived title: anyOf: - type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ audience: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ deprecated: description: "Withdrawn or superseded (#266): why, and the manual to use instead. Absent when it is not deprecated." allOf: - $ref: "#/components/schemas/Deprecation" variants: minItems: 1 type: array items: type: object additionalProperties: type: string minLength: 1 textAttributes: default: {} type: object additionalProperties: anyOf: - type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ - minItems: 1 type: array items: type: object properties: value: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ when: allOf: - $ref: "#/components/schemas/Condition" required: - value additionalProperties: false coverImage: description: "The cover image its page design shows (#394): `default`, the manual’s, and `variants`, a variant’s own by its exact values, which wins. Absent: the design’s." type: object properties: default: type: object properties: asset: type: string pattern: ^sha256:[a-f0-9]{64}$ alt: anyOf: - type: string minLength: 1 maxLength: 500 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 maxLength: 500 pattern: ^\S(?:[^\n\r]*\S)?$ required: - asset - alt additionalProperties: false variants: default: [] maxItems: 100 type: array items: type: object properties: asset: type: string pattern: ^sha256:[a-f0-9]{64}$ alt: anyOf: - type: string minLength: 1 maxLength: 500 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 maxLength: 500 pattern: ^\S(?:[^\n\r]*\S)?$ variant: type: object additionalProperties: type: string minLength: 1 required: - asset - alt - variant additionalProperties: false required: - variants additionalProperties: false rule: description: "A derived manual’s rule (#451): `source`, the manual it gathers from; `moduleTypes`, the types it gathers (absent: the configured safety types); `exclude`, modules left out; `front` and `back`, its own modules before and after. Absent for an assembled manual." type: object properties: source: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ moduleTypes: minItems: 1 maxItems: 100 type: array items: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ exclude: default: [] maxItems: 500 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ front: default: [] maxItems: 500 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ back: default: [] maxItems: 500 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ notices: type: object properties: groupBy: default: module type: string enum: - module - level levels: minItems: 1 maxItems: 4 type: array items: type: string enum: - danger - warning - caution - notice required: - groupBy additionalProperties: false required: - source - exclude - front - back additionalProperties: false entries: type: array items: $ref: "#/components/schemas/ManifestEntry" description: Only the modules the reader may see (groups left empty go too), so it can be empty. A derived manual’s are the ones its rule gathers, front matter first, back matter last. required: - schemaVersion - title - variants - textAttributes - entries additionalProperties: false VariantSummary: type: object properties: slug: type: string description: Use in `/manuals/{id}/variants/{variant}/…`, e.g. `model=large`. label: type: string description: For people, e.g. "Large · Software 2.3". values: type: object additionalProperties: type: string description: 'Variant attribute ID → value, e.g. `{ "model": "large" }`.' required: - slug - label - values additionalProperties: false DesignInUse: type: object properties: id: type: string description: The design's ID (`design/.yaml`); `builtin` for the built-in design. name: nullable: true description: The design’s name; null for the built-in design and for a design that is not there. type: string source: type: string enum: - manual - project - builtin description: "`manual`: the manifest’s own `design`; `project`: the project’s default (`pdf.design` in the configuration); `builtin`: neither names one." missing: type: boolean description: "The design named is not in the content (or its file is no design): the PDF uses the built-in design, and the manual’s checks report `unknown-page-design`." required: - id - name - source - missing additionalProperties: false UnreadableManualResource: type: object properties: type: type: string enum: - Manual id: type: string meta: type: object properties: error: type: string description: Why it cannot be read. required: - error additionalProperties: false required: - type - id - meta additionalProperties: false ManualDocument: type: object properties: data: $ref: "#/components/schemas/ManualResource" required: - data additionalProperties: false ResolvedManualDocument: type: object properties: data: $ref: "#/components/schemas/ResolvedManualResource" required: - data additionalProperties: false ResolvedManualResource: type: object properties: type: type: string enum: - ResolvedManual id: type: string attributes: type: object properties: title: type: string lang: type: string variant: type: object additionalProperties: type: string description: 'Variant attribute ID → value, e.g. `{ "model": "large" }`.' entries: type: array items: $ref: "#/components/schemas/ResolvedEntry" origins: type: object additionalProperties: type: object properties: module: type: string block: type: string required: - module - block additionalProperties: false description: Output block ID → the module and block it came from. anchors: type: object additionalProperties: type: string description: "`module` or `module#block` → the output block ID to link to." callouts: description: "Output image block ID → callout ID → its number in this variant (#498): what a `calloutRef` reads as. Absent without callouts." type: object additionalProperties: type: object additionalProperties: type: integer minimum: 1 maximum: 9007199254740991 xrefTitles: description: "Module ID → title, in the manual’s language or its fallback, of each module a cross-reference links to that is no entry of the manual (#796): what a cross-reference without its own text reads as. Only modules the reader may see and the manual’s audience allows." type: object additionalProperties: type: string required: - title - lang - variant - entries - origins - anchors additionalProperties: false relationships: type: object properties: manual: type: object properties: data: type: object properties: type: type: string enum: - Manual id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - manual additionalProperties: false meta: type: object properties: issues: type: array items: $ref: "#/components/schemas/ResolveIssue" required: - issues additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is `//`, as in the URL." ResolvedEntry: oneOf: - type: object properties: kind: type: string enum: - module module: type: string title: type: string lang: type: string description: Differs from the manual when a translation is missing. blocks: type: array items: $ref: "#/components/schemas/Block" required: - kind - module - title - lang - blocks additionalProperties: false - type: object properties: kind: type: string enum: - group title: type: string entries: type: array items: $ref: "#/components/schemas/ResolvedEntry" required: - kind - title - entries additionalProperties: false ResolveIssue: type: object properties: severity: type: string enum: - error - warning code: type: string description: Stable machine-readable code, e.g. `missing-module`. message: type: string module: description: The module concerned. type: string required: - severity - code - message additionalProperties: false ManualVersionPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ManualVersionResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" truncated: type: boolean description: "The ref’s first-parent line goes on past the 1,000 newest commits looked at: older versions are not listed, and, when the manual existed before them, versions carry no revision number." required: - page - truncated additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ManualVersionResource: type: object properties: type: type: string enum: - ManualVersion id: type: string attributes: type: object properties: commit: type: string description: A commit ID. committedAt: type: string description: When it was committed (ISO 8601, the committer’s offset). message: type: string description: "The commit message without its trailers: for a merge, the change set’s title and a line naming it." merge: type: boolean description: Whether it is a merge (a change set merged into the ref). actor: nullable: true description: Who made it, as the commit’s trailers claim (`Merged-by`, else `Actor` for a save point); null when they name no one. Recorded by the server for the commits it makes, but a commit pushed from outside can claim anything. type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false approvedBy: type: array items: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: "Who approved it, as its `Approved-by` trailers claim, in order: the approvers of a merged change set." required: - commit - committedAt - message - merge - actor - approvedBy additionalProperties: false relationships: type: object properties: actor: type: object properties: data: nullable: true type: object properties: type: type: string enum: - User id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false description: "`actor` when it is a user the server knows; else empty." changeSet: type: object properties: data: nullable: true type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false description: The change set it came from (`Merged-change-set`, else `Change-set`); empty when its trailers name none. approvers: type: object properties: data: type: array items: type: object properties: type: type: string enum: - User id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false description: The users among `approvedBy` the server knows. required: - actor - changeSet - approvers additionalProperties: false meta: type: object properties: revision: nullable: true description: "The version’s number, counted from the oldest (1): derived, never stored. Null when the history was cut (`meta.truncated` on the document) while the module already existed before the oldest commit looked at, as the count would not start at the first." type: integer minimum: -9007199254740991 maximum: 9007199254740991 change: type: string enum: - added - changed - removed description: "How the module as the reader sees it differs from the version before: `added` (also back after a removal), `changed`, `removed` (deleted, or moved out of the reader’s scope)." releases: type: array items: type: object properties: tag: type: string commit: type: string description: A commit ID. required: - tag - commit additionalProperties: false description: The release tags (of the 50 newest) whose commit holds exactly this file, as the reader may see it there; newest first. unreadable: type: boolean description: The file after this commit cannot be read (shown only to a reader of all of its language). readAt: type: string description: "The commit to read this version at (`GET /manuals/{id}/compare`, `GET /manuals/{id}?ref=`): its own (`attributes.commit`) for a reader of drafts (`content.read.draft`); for a reader of released content only, who is listed only the versions released content holds, the released commit holding it (`main`’s head, else the newest release tag in `releases`)." required: - revision - change - releases - unreadable - readAt additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is `/`. As a `ModuleVersion`, of the manual’s manifest (`manuals/.yaml`); derived from Git, nothing of it is stored." ManualComparisonDocument: type: object properties: data: $ref: "#/components/schemas/ManualComparisonResource" required: - data additionalProperties: false ManualComparisonResource: type: object properties: type: type: string enum: - ManualComparison id: type: string attributes: type: object properties: base: nullable: true description: "The manual at `base`, as the reader sees it on both sides (naming only the modules it may name to them on both); null when it is not there (or cannot be read: `meta.unreadable`)." allOf: - $ref: "#/components/schemas/ManualAttributes" head: nullable: true description: The manual at `head`, likewise. allOf: - $ref: "#/components/schemas/ManualAttributes" required: - base - head additionalProperties: false meta: type: object properties: base: type: string description: The commit `base` named. head: type: string description: The commit `head` named. change: type: string enum: - added - changed - removed - unchanged description: "`added` (not there at `base`), `removed` (not there at `head`), `changed`, or `unchanged` (the same manifest on both sides)." fields: type: array items: type: string description: The manifest’s members that differ (`title`, `audience`, `variants`, `attributes`, `entries`, …), as in a change set’s changes. Empty unless changed. unreadable: type: boolean description: A side has a manifest that cannot be read (shown only to a reader of every audience). required: - base - head - change - fields - unreadable additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is `/..`. Derived from Git, never stored." LayoutWarningPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/LayoutWarningResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false LayoutWarningResource: type: object properties: type: type: string enum: - LayoutWarning id: type: string attributes: type: object properties: code: type: string enum: - page-design-overflow - running-head-truncated description: "`page-design-overflow`: a title or back page region does not fit its place and is cut off; `running-head-truncated`: a running header or footer is shortened with an ellipsis." at: type: string description: Where in the page design, as a dotted path (`regions.footer`, `header.default.left`). page: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The first page it happens on. pages: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: On how many pages it happens. text: description: A shortened running head’s whole text. type: string required: - code - at - page - pages additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is `:`." HiddenContentPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/HiddenContentResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" commit: type: string description: The commit read. required: - page - commit additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false HiddenContentResource: type: object properties: type: type: string enum: - HiddenContent id: type: string attributes: type: object properties: kind: type: string enum: - block - module - group description: "`block`: a variant block of a module; `module`: a module entry of the manual; `group`: a group of the manual, with everything in it." module: nullable: true description: The module the block is in, or the module entry; null for a group. type: string blockId: nullable: true description: The variant block’s own ID in its module; null unless `kind` is `block`. type: string condition: $ref: "#/components/schemas/Condition" required: - kind - module - blockId - condition additionalProperties: false meta: type: object properties: label: type: string description: "How a person recognises it, as plain text (never markup): a block’s first text, at most 120 characters, or a module’s or group’s title. Empty when a block holds no text." expression: type: string description: The condition as people read and write it (`model in (large) && software >= 2.3`). required: - label - expression additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "Content the conditions leave out for the variant: derived on every request, never stored." SearchPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/SearchResultResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false SearchResultResource: type: object properties: type: type: string enum: - SearchResult id: type: string attributes: type: object properties: resourceType: type: string enum: - Module - Manual - Term description: "What was found: a `Module` (one language), a `Manual` or a `Term` (one language)." resourceId: type: string description: "Its ID as in the URL: `/` for a module, the manual ID, the term ID." lang: description: The language of a module, or the one a term was found in; a manual has none. type: string title: type: string description: The title; for a term, its preferred variant in `lang`. blockId: description: The block, list item or step the text matched in, or the FAQ entry whose question matched. Absent unless a module’s text or question matched. type: string required: - resourceType - resourceId - title additionalProperties: false relationships: type: object properties: resource: type: object properties: data: type: object properties: type: type: string enum: - Module - Manual - Term id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - resource additionalProperties: false meta: type: object properties: matchedOn: type: string enum: - title - keyword - question - text - meaning - filter description: "What matched `filter[q]`: the title, a keyword, an FAQ entry’s question (its block in `blockId`), or the text (for a term: its preferred variant, one of its allowed or forbidden variants, or its definition); `meaning` when only its meaning matched (semantic search, with an embedder configured: `matches` is empty, `blockId` names the closest block); `filter` when no query was given and the filters alone found it." excerpt: type: string description: "Plain text, never markup: the title (a title match, or no query), the matching keywords separated by `, ` (a keyword match), the matching question, or a stretch of the matching (or, for `meaning`, the closest) block. Show it as text." matches: type: array items: $ref: "#/components/schemas/SearchMatch" description: "Where the query’s words are in `excerpt`, in order, not overlapping: offsets in UTF-16 units (JavaScript string indexes)." deprecated: type: boolean description: "A deprecated module (by its source-language file) or manual (#266), for a badge. A term is never: its status is its own (`GET /terms`)." required: - matchedOn - excerpt - matches - deprecated additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is `:` (`term:/` for a term); one result per module and language, manual, or term and language." SearchMatch: type: object properties: start: type: integer minimum: 0 maximum: 9007199254740991 description: First UTF-16 unit of the match. end: type: integer minimum: 0 maximum: 9007199254740991 description: One past the last UTF-16 unit of the match. required: - start - end additionalProperties: false ChunkPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ChunkResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" leftOut: description: The modules the filters ask for (all but `filter[changedSince]`) that have no chunk because they are too large to cut (#688), in module ID, then language order; absent when there is none. Every other module is chunked as usual, and these are not counted in `meta.page.total`; with `filter[variant]`, a module too large for that variant alone is left out of the page holding it, named there, and still counted. Only modules you may read are named. The module’s checks report it as `expansion-too-large`. type: array items: $ref: "#/components/schemas/LeftOutModule" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ChunkResource: type: object properties: type: type: string enum: - Chunk id: type: string attributes: type: object properties: moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ lang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ title: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ moduleType: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: One of the configured module types, e.g. `procedure`. audience: description: "The module’s audience level; absent: the most restricted level. Text from a more restricted module is never in the chunk." type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ facets: default: {} type: object additionalProperties: minItems: 1 type: array items: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ keywords: type: array items: type: string description: Free-form keywords in the module’s language; empty when there are none. manuals: type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ description: The manuals that include the module (their manifests name it, within their audience), as the reader may see them; sorted. conditions: type: array items: type: string description: The conditions of the variant blocks in the text, as `when` text (`model in (large)`), in document order, each once; on an FAQ entry’s chunk, those of the variant blocks it stands in first. Listed also when `filter[variant]` resolved them. text: type: string description: "The module as Markdown (CommonMark with GFM tables): the title as `#` heading, sections as headings, procedure steps numbered, tables as Markdown tables, safety messages and notes as quotes headed by their signal word, images as their alt text, attachments by name, referenced modules inlined. Without `filter[variant]` each variant block is a quote headed by `**when**` and its condition. Text attributes stay `{name}`. Markup characters in the content are backslash-escaped; no HTML but `
` between the lines of a table cell." sourceHash: type: string pattern: ^[0-9a-f]{64}$ description: "SHA-256 of the module’s own source: of its translation units’ source hashes, or of its canonical AsciiDoc when it has none." contentHash: type: string pattern: ^[0-9a-f]{64}$ description: "SHA-256 of `text` (UTF-8). Equal text, equal hash: re-embed only when it changes." entry: description: "Only on an FAQ entry’s chunk: its `text` is that entry (the question as `#` heading, then its answer) and `sourceHash`, `conditions` and `meta.sources` are the entry’s; the other attributes stay the module’s. The module’s own chunk keeps its entries in its text too." type: object properties: blockId: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ description: The FAQ entry’s block ID in the module. question: type: string description: The question as plain text; a text attribute as `{name}`. required: - blockId - question additionalProperties: false required: - moduleId - lang - title - moduleType - facets - keywords - manuals - conditions - text - sourceHash - contentHash additionalProperties: false relationships: type: object properties: module: type: object properties: data: type: object properties: type: type: string enum: - Module id: type: string required: - type - id additionalProperties: false links: type: object properties: related: type: string description: The module in the API, at the commit read. required: - related additionalProperties: false required: - data - links additionalProperties: false required: - module additionalProperties: false meta: type: object properties: ref: type: string description: The ref the chunk was read at (`?ref=`). commit: type: string description: The commit the chunk was read at. sources: type: array items: type: object properties: moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ lang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ required: - moduleId - lang additionalProperties: false description: "The module files the text was made from: the module first, then each module it includes, in the language read." release: nullable: true description: "The module’s newest release (tag), as `meta.status.release` of `GET /modules/{lang}/{id}`: the product revision a pipeline filters by. Null when none of the 50 newest holds it." type: object properties: tag: type: string description: The release tag. commit: type: string description: A commit ID. same: type: boolean description: Whether the module there is exactly the one read. required: - tag - commit - same additionalProperties: false required: - ref - commit - sources - release additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is `/`: one chunk per module and language; and `//` for each FAQ entry in it, which has a chunk of its own (`attributes.entry`)." LeftOutModule: type: object properties: moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ lang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ reason: type: string enum: - size - depth description: "`size`: once its module references are included it holds more than 500,000 content nodes, 12,000,000 characters or 1,000,000 table cells (rows × columns) (a module referred to over several paths counts once per path); `depth`: its blocks and references nest more than 100 deep." required: - moduleId - lang - reason additionalProperties: false ChangePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ChangeResource" meta: type: object properties: page: type: object properties: size: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The most events asked for. cursor: type: string description: "Where the next page starts (opaque): pass it as `page[cursor]`. Keep it with what you stored: it is how you resume after a restart." required: - size - cursor additionalProperties: false upToDate: type: boolean description: "Nothing more to tell right now: poll again later with `meta.page.cursor` (or when a webhook arrives)." required: - page - upToDate additionalProperties: false links: type: object properties: self: type: string next: type: string description: "This route with the next cursor: always there, a feed never ends." required: - self - next additionalProperties: false required: - data - meta - links additionalProperties: false ChangeResource: type: object properties: type: type: string enum: - Change id: type: string attributes: type: object properties: event: type: string enum: - manual.released - module.released - release.withdrawn - module.deprecated - manual.deprecated - chunk.upserted - chunk.removed description: What happened. The webhook events (`manual.released`, `module.released`, `release.withdrawn`, `module.deprecated`, `manual.deprecated`) have the shapes and idempotency keys webhook deliveries have; `chunk.upserted` and `chunk.removed` tell a retrieval index what to store and what to drop, per chunk of `GET /chunks`. occurredAt: type: string description: When the release, withdrawal or deprecation was recorded (ISO 8601); for a snapshot or a change of your scope, when it was told. data: type: object additionalProperties: {} description: "IDs and what changed, never content. `chunk.upserted`: `chunkId` (`GET /chunks`’s `id`), `moduleId`, `lang`, `blockId` (an FAQ entry’s, else null), `contentHash` (the chunk’s, as `GET /chunks` gives it: re-embed only when it differs from yours) and `release` (`releaseId`, `product`, `revision`, `tag`, `commit`: read the chunk at `?ref=`). `chunk.removed`: `chunkId`, `moduleId`, `lang`, `blockId`, `reason` (`deprecated`: with no replacement; `withdrawn`: its release was withdrawn; `gone`: deleted, or no longer yours to read, never told which) and `release` (the release now standing, or null). The webhook events: as their deliveries’ `data`." required: - event - occurredAt - data additionalProperties: false required: - type - id - attributes additionalProperties: false ReleaseListPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ReleaseDetailResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ReleaseDetailResource: type: object properties: type: type: string enum: - Release id: type: string attributes: $ref: "#/components/schemas/ReleaseAttributes" meta: type: object properties: outputs: nullable: true description: Where the release’s outputs stand, counted as you may read them (as `GET /releases/{releaseId}/outputs` lists them, so no count tells of one outside your scope). Null when its tag cannot be read. allOf: - $ref: "#/components/schemas/ReleaseOutputsProgress" required: - outputs additionalProperties: false required: - type - id - attributes - meta additionalProperties: false ReleaseAttributes: type: object properties: product: type: string description: "The product: a value of `productFacet` (`release.productFacet` in `openfolia.yaml`, else the first facet)." productFacet: type: string description: The facet the product is a value of, as configured then. revision: type: string description: The product revision, e.g. `2.1`. tag: type: string description: "The release’s annotated tag (named by `CCMS_RELEASE_TAG`, default `release/{product}/{revision}`): pass it as `?ref=` to read the content as released." tagObject: type: string description: The annotated tag object’s ID. commit: type: string description: "The commit released: `main`’s head when it was cut, or a maintenance line’s." notes: nullable: true description: The publisher’s summary (plain text with line breaks); also the tag message’s body. Null when none was given. type: string notesByLanguage: type: object additionalProperties: type: string description: Summaries per language, by language tag (plain text with line breaks); each also in the tag message, after a line `[notes:]`. Empty when none were given. major: type: boolean description: "Marked a major change by its publisher: its readers are told (a notification), and the tag message’s title ends in ` (major)`." publishedBy: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who cut it. publishedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: "When it was cut: the tag’s date, to the second." withdrawal: nullable: true description: "Set once the release is withdrawn: its tag stays readable, but it no longer counts as a module’s latest release. Null while it stands." type: object properties: by: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who withdrew it. at: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: When. reason: type: string description: Why, in their words. required: - by - at - reason additionalProperties: false required: - product - productFacet - revision - tag - tagObject - commit - notes - notesByLanguage - major - publishedBy - publishedAt - withdrawal additionalProperties: false ReleaseOutputsProgress: type: object properties: state: type: string enum: - planning - rendering - done - failed description: "`planning`: the outputs are still being planned (there may be none yet); `rendering`: some are queued or rendering; `failed`: none is under way and some failed (or planning failed for good, with none planned: plan them again; or planning was refused: `refused`); `done`: all are done (`total` 0: the release has no outputs you may read, no manuals at its tag, or none you read whole)." total: type: integer minimum: 0 maximum: 9007199254740991 description: The outputs you may read (`GET /releases/{releaseId}/outputs`). queued: type: integer minimum: 0 maximum: 9007199254740991 description: Of those, queued. rendering: type: integer minimum: 0 maximum: 9007199254740991 description: Of those, rendering. done: type: integer minimum: 0 maximum: 9007199254740991 description: Of those, done. failed: type: integer minimum: 0 maximum: 9007199254740991 description: Of those, failed. refused: nullable: true description: Why the release’s outputs were not planned (#477); null when they were, or are being planned again. type: object properties: reason: type: string enum: - too-many-outputs description: "`too-many-outputs`: the release would have more outputs (every manual at its tag × its variants × the configured languages) than a release may have (`CCMS_RELEASE_MAX_OUTPUTS`), so none were planned. Planning it again (`POST /releases/{releaseId}/outputs/plan`) works once the limit is raised." wanted: nullable: true type: integer minimum: 0 maximum: 9007199254740991 description: The outputs the release would have. Only for one who may plan it again (`release.publish` for its product); null for other readers, as it counts manuals they may not read. max: type: integer minimum: 0 maximum: 9007199254740991 description: "The limit now (`CCMS_RELEASE_MAX_OUTPUTS`), as planning it again is judged. A refusal the limit was raised past is no longer told: the state is then `failed` with `refused` null, until the release is planned again." required: - reason - wanted - max additionalProperties: false queue: nullable: true description: "What the release waits for (#497), for one who may plan the release again (`release.publish` for its product), as it counts manuals other readers may not read: while its planning waits, the earlier releases planned first (`releases`); while it renders and some of its outputs are queued, the later releases’ outputs rendered first (`ahead`). Null otherwise (another reader, nothing ahead of it, or a list of releases, which leaves it out)." type: object properties: ahead: type: integer minimum: 0 maximum: 9007199254740991 description: "How many outputs of the same product’s releases cut after this one are still to render (queued or rendering): they go first, newest release first. 0 while it is planned and has no queued outputs of its own." releases: type: integer minimum: 0 maximum: 9007199254740991 description: "While its planning waits (`state` `planning`): how many of the same product’s releases cut before this one are still to be planned (at most the 200 nearest are looked at). Releases are planned strictly in the order they were cut, so these go before it. 0 while it renders." required: - ahead - releases additionalProperties: false required: - state - total - queued - rendering - done - failed - refused - queue additionalProperties: false ReleaseDetailDocument: type: object properties: data: $ref: "#/components/schemas/ReleaseDetailResource" required: - data additionalProperties: false CreateReleaseDocument: type: object properties: data: type: object properties: type: type: string enum: - Release attributes: type: object properties: product: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: A value of the product facet (`release.productFacet` in `openfolia.yaml`, else the first facet) at `main`. revision: type: string description: "The product revision: 1 to 100 characters of `A-Za-z0-9._-`, starting with a letter, digit or `_`, without `..`, not ending in `.` or `.lock`." notes: description: "A summary for readers: plain text with line breaks, 1 to 10,000 characters once trimmed, no line starting with `---` and none of the form `[notes:]`, not ending in `Key: value` lines." nullable: true type: string notesByLanguage: description: Summaries per language, by a language tag configured in `openfolia.yaml` at `main` (else 422 `invalid-language`), each as `notes`. All notes together make at most 60,000 characters. type: object additionalProperties: type: string major: description: "A major change (default false): readers of the manuals it changed are told." type: boolean maintenanceLine: description: "A maintenance line’s ID (#60): cut the release from the head of its branch instead of `main`. The product must be the line’s." type: string minLength: 1 maxLength: 64 required: - product - revision additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false ReleaseDocument: type: object properties: data: $ref: "#/components/schemas/ReleaseResource" required: - data additionalProperties: false ReleaseResource: type: object properties: type: type: string enum: - Release id: type: string attributes: $ref: "#/components/schemas/ReleaseAttributes" required: - type - id - attributes additionalProperties: false ReleaseChangePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ReleaseChangeResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" previous: nullable: true description: "The release the changes are counted from: the product’s newest release before this one that is not withdrawn. Null for the product’s first." type: object properties: id: type: string revision: type: string tag: type: string commit: type: string required: - id - revision - tag - commit additionalProperties: false required: - page - previous additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ReleaseChangeResource: type: object properties: type: type: string enum: - ReleaseChange id: type: string attributes: type: object properties: manual: type: string description: The manual’s ID. lang: type: string description: The language, a language tag. required: - manual - lang additionalProperties: false meta: type: object properties: change: type: string enum: - added - changed - removed description: "`added` (new since the previous release, or every manual of a product’s first release), `removed`, or `changed` (its manifest, or a module it names in this language)." fields: type: array items: type: string description: The manifest’s members that differ (`title`, `entries`, `variants`, …); empty unless `changed`. modules: type: array items: type: object properties: moduleId: type: string change: type: string enum: - added - changed - removed fields: type: array items: type: string description: Its metadata that differs (`title`, `type`, `audience`, …); empty when added or removed. blocks: type: array items: type: object properties: blockId: type: string change: type: string enum: - added - changed - removed required: - blockId - change additionalProperties: false description: Its blocks, list items and procedure steps that differ, by ID (as a change set’s changes list them). required: - moduleId - change - fields - blocks additionalProperties: false description: The modules the manual names (in either release) whose file in this language changed, by ID; empty unless `changed`. required: - change - fields - modules additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is `/`. Derived from Git, as the reader sees both releases: nothing of it is stored." WithdrawReleaseDocument: type: object properties: meta: type: object properties: reason: description: "Why the release is withdrawn, shown to every reader with it and recorded in the audit log: plain text with line breaks, 1 to 2,000 characters once trimmed. Required." type: string required: - reason additionalProperties: false required: - meta additionalProperties: false ChangelogPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ChangelogEntryResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" truncated: type: boolean description: Filtered by manual or language, only the newest releases matching the other filters are looked through; true when there were more. required: - page - truncated additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ChangelogEntryResource: type: object properties: type: type: string enum: - Release id: type: string attributes: $ref: "#/components/schemas/ReleaseAttributes" meta: type: object properties: changedManuals: nullable: true description: How many manuals it changed, as you see them (`GET /releases/{releaseId}/changes`); null when too many files changed to compare. type: integer minimum: -9007199254740991 maximum: 9007199254740991 required: - changedManuals additionalProperties: false required: - type - id - attributes - meta additionalProperties: false ReleaseOutputsReplanDocument: type: object properties: meta: type: object properties: queued: type: boolean required: - queued additionalProperties: false required: - meta additionalProperties: false ReleaseOutputPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ReleaseOutputResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ReleaseOutputResource: type: object properties: type: type: string enum: - ReleaseOutput id: type: string attributes: type: object properties: manual: nullable: true description: The manual’s ID; null for an offline package (all of them). type: string variant: nullable: true description: The variant’s slug, e.g. `model=large` (the manifest’s); null for an offline package (every variant). type: string lang: type: string description: The language, a language tag. kind: type: string enum: - pdf - offline-package description: "What it is: `pdf`, a manual in one variant and language; `offline-package` (#59), a ZIP of every manual the language and audience level reads, as HTML pages and PDFs, that opens from the file system without a network." audience: nullable: true description: The audience level an offline package is for (it holds what that level reads); null for a PDF, and for a package when no levels are configured. type: string state: type: string enum: - queued - rendering - done - failed description: "`queued` (its render job waits), `rendering` (an attempt started; one retried after a passing failure stays here), `done` (the file is there) or `failed` (for good; `POST …/retry` queues it again)." sha256: nullable: true description: The file’s SHA-256 (the blob store’s key); null until done. Outputs that reuse a file share it. type: string size: nullable: true description: The file’s size in bytes; null until done. type: integer minimum: -9007199254740991 maximum: 9007199254740991 error: nullable: true description: Why it failed (or, while it is retried, why the latest attempt did); null otherwise. type: object properties: code: type: string description: "Stable: `pdf-accessibility`, `render-timeout`, `render-failed`, `invalid-content`, `renderer-busy`, `render-error`, …" detail: type: string required: - code - detail additionalProperties: false createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ updatedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ finishedAt: nullable: true description: When it was done or failed; null while queued or rendering. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - manual - variant - lang - kind - audience - state - sha256 - size - error - createdAt - updatedAt - finishedAt additionalProperties: false meta: type: object properties: reusedFrom: nullable: true description: "The release did not change the manual in this language: the output (of an earlier release) whose file this one is. Null when rendered for this release." type: object properties: releaseId: type: string outputId: type: string required: - releaseId - outputId additionalProperties: false attempts: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Render attempts started, over every retry. retries: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: How often it was queued again after failing. withdrawn: type: boolean description: "The release is withdrawn: the file stays readable at its tag, but it is no longer the product’s current one." design: description: The page design the manual is printed with at the release’s tag; absent for an offline package. allOf: - $ref: "#/components/schemas/DesignInUse" required: - reusedFrom - attempts - retries - withdrawn additionalProperties: false links: type: object properties: file: nullable: true description: The file (`GET …/outputs/{outputId}/file`); null until done. type: string required: - file additionalProperties: false required: - type - id - attributes - meta - links additionalProperties: false description: "One file of a release: a manual in one variant and language, rendered at the release’s tag as the manual’s audience reads it, so it is the same for everyone who may read the manual; or an offline package (#59) of one language and audience level, built from the release’s tag as that level reads it." ReleaseOutputDocument: type: object properties: data: type: object properties: type: type: string enum: - ReleaseOutput id: type: string attributes: type: object properties: manual: nullable: true description: The manual’s ID; null for an offline package (all of them). type: string variant: nullable: true description: The variant’s slug, e.g. `model=large` (the manifest’s); null for an offline package (every variant). type: string lang: type: string description: The language, a language tag. kind: type: string enum: - pdf - offline-package description: "What it is: `pdf`, a manual in one variant and language; `offline-package` (#59), a ZIP of every manual the language and audience level reads, as HTML pages and PDFs, that opens from the file system without a network." audience: nullable: true description: The audience level an offline package is for (it holds what that level reads); null for a PDF, and for a package when no levels are configured. type: string state: type: string enum: - queued - rendering - done - failed description: "`queued` (its render job waits), `rendering` (an attempt started; one retried after a passing failure stays here), `done` (the file is there) or `failed` (for good; `POST …/retry` queues it again)." sha256: nullable: true description: The file’s SHA-256 (the blob store’s key); null until done. Outputs that reuse a file share it. type: string size: nullable: true description: The file’s size in bytes; null until done. type: integer minimum: -9007199254740991 maximum: 9007199254740991 error: nullable: true description: Why it failed (or, while it is retried, why the latest attempt did); null otherwise. type: object properties: code: type: string description: "Stable: `pdf-accessibility`, `render-timeout`, `render-failed`, `invalid-content`, `renderer-busy`, `render-error`, …" detail: type: string required: - code - detail additionalProperties: false createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ updatedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ finishedAt: nullable: true description: When it was done or failed; null while queued or rendering. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - state additionalProperties: false meta: type: object properties: reusedFrom: nullable: true description: "The release did not change the manual in this language: the output (of an earlier release) whose file this one is. Null when rendered for this release." type: object properties: releaseId: type: string outputId: type: string required: - releaseId - outputId additionalProperties: false attempts: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Render attempts started, over every retry. retries: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: How often it was queued again after failing. withdrawn: type: boolean description: "The release is withdrawn: the file stays readable at its tag, but it is no longer the product’s current one." design: description: The page design the manual is printed with at the release’s tag; absent for an offline package. allOf: - $ref: "#/components/schemas/DesignInUse" required: - attempts - retries additionalProperties: false links: type: object properties: file: nullable: true description: The file (`GET …/outputs/{outputId}/file`); null until done. type: string required: - file additionalProperties: false required: - type - id - attributes - meta - links additionalProperties: false description: "The output queued again. A publisher who may not read it (no role of theirs covers all of its manual, as `GET …/outputs` judges it) gets only `state`, `meta.attempts` and `meta.retries`: every other attribute and `meta` member is absent, so retrying shows nothing that reading would not." required: - data additionalProperties: false MaintenanceLinePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/MaintenanceLineResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false MaintenanceLineResource: type: object properties: type: type: string enum: - MaintenanceLine id: type: string attributes: $ref: "#/components/schemas/MaintenanceLineAttributes" relationships: type: object properties: baseRelease: type: object properties: data: type: object properties: type: type: string enum: - Release id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - baseRelease additionalProperties: false meta: type: object properties: head: nullable: true description: Where its branch points now (derived from Git); null when the branch is gone. type: string required: - head additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false MaintenanceLineAttributes: type: object properties: product: type: string description: The product it maintains (the base release’s). revision: type: string description: The product revision it maintains (the base release’s). branch: type: string description: "Its branch (named by `CCMS_MAINTENANCE_BRANCH`, default `maintenance/{product}/{revision}`): change sets started on the line merge into it, and releases from the line are cut from its head." baseCommit: type: string description: "Where the branch started: the base release’s commit." state: type: string enum: - open - closed description: "`open`, or `closed`: no new change sets start on it." createdBy: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who started it. createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ closedBy: nullable: true description: Who closed it; null while open. type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false closedAt: nullable: true description: When it was closed; null while open. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - product - revision - branch - baseCommit - state - createdBy - createdAt - closedBy - closedAt additionalProperties: false MaintenanceLineDocument: type: object properties: data: $ref: "#/components/schemas/MaintenanceLineResource" required: - data additionalProperties: false ReleasePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ReleaseResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false StartMaintenanceLineDocument: type: object properties: data: type: object properties: type: type: string enum: - MaintenanceLine relationships: type: object properties: baseRelease: type: object properties: data: type: object properties: type: type: string enum: - Release id: type: string minLength: 1 maxLength: 64 description: The release’s ID (a UUID). required: - type - id additionalProperties: false required: - data additionalProperties: false required: - baseRelease additionalProperties: false required: - type - relationships additionalProperties: false required: - data additionalProperties: false CloseMaintenanceLineDocument: type: object properties: meta: type: object properties: comment: description: Why, recorded in the audit log. type: string minLength: 1 maxLength: 10000 additionalProperties: false additionalProperties: false RolePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/RoleResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false RoleResource: type: object properties: type: type: string enum: - Role id: type: string attributes: type: object properties: name: type: string description: nullable: true type: string permissions: type: array items: type: string enum: - content.read - content.read.draft - content.edit - content.review - content.approve - release.publish - translation.manage - webhook.manage - admin.roles - admin.branding - admin.backups scope: $ref: "#/components/schemas/Scope" required: - name - description - permissions - scope additionalProperties: false meta: type: object properties: holders: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: How many users and service accounts hold it, deactivated ones included. required: - holders additionalProperties: false required: - type - id - attributes - meta additionalProperties: false RoleDocument: type: object properties: data: $ref: "#/components/schemas/RoleResource" required: - data additionalProperties: false CreateRoleDocument: type: object properties: data: type: object properties: type: type: string enum: - Role id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: "The new role’s ID, chosen by the client: a lowercase key, e.g. `safety-approver`." attributes: type: object properties: name: type: string minLength: 1 maxLength: 200 description: 1 to 200 characters. description: description: What the role is for, 1 to 500 characters; null for none. nullable: true type: string minLength: 1 maxLength: 500 permissions: description: At least one, each once. minItems: 1 type: array items: type: string enum: - content.read - content.read.draft - content.edit - content.review - content.approve - release.publish - translation.manage - webhook.manage - admin.roles - admin.branding - admin.backups scope: description: "Where the permissions apply; left out (or `{}`): everywhere. `admin.roles`, `admin.branding` and `webhook.manage` apply everywhere whatever it says." type: object properties: languages: minItems: 1 type: array items: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleTypes: minItems: 1 type: array items: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ maxAudience: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ facets: description: Per facet, the values covered; at least one facet. type: object additionalProperties: type: array items: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ additionalProperties: false required: - name - permissions additionalProperties: false required: - type - id - attributes additionalProperties: false required: - data additionalProperties: false UpdateRoleDocument: type: object properties: data: type: object properties: type: type: string enum: - Role id: type: string description: The role’s ID, as in the path. attributes: type: object properties: name: type: string minLength: 1 maxLength: 200 description: 1 to 200 characters. description: description: What the role is for, 1 to 500 characters; null for none. nullable: true type: string minLength: 1 maxLength: 500 permissions: description: At least one, each once. minItems: 1 type: array items: type: string enum: - content.read - content.read.draft - content.edit - content.review - content.approve - release.publish - translation.manage - webhook.manage - admin.roles - admin.branding - admin.backups scope: description: "Where the permissions apply; left out (or `{}`): everywhere. `admin.roles`, `admin.branding` and `webhook.manage` apply everywhere whatever it says." type: object properties: languages: minItems: 1 type: array items: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleTypes: minItems: 1 type: array items: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ maxAudience: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ facets: description: Per facet, the values covered; at least one facet. type: object additionalProperties: type: array items: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ additionalProperties: false additionalProperties: false required: - type - id - attributes additionalProperties: false required: - data additionalProperties: false UserDocument: type: object properties: data: $ref: "#/components/schemas/UserResource" required: - data additionalProperties: false CreateUserDocument: type: object properties: data: type: object properties: type: type: string enum: - User id: type: string maxLength: 64 pattern: ^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$ description: 'The new user’s ID, chosen by the client: lowercase letters, digits, ".", "_" and "-".' attributes: type: object properties: name: type: string minLength: 1 maxLength: 200 description: 1 to 200 characters. email: type: string maxLength: 254 format: email pattern: ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ description: Unique ignoring case; at most 254 characters. required: - name - email additionalProperties: false relationships: type: object properties: roles: type: object properties: data: maxItems: 200 type: array items: type: object properties: type: type: string enum: - Role id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ required: - type - id additionalProperties: false required: - data additionalProperties: false description: The roles the user holds (replacing those it held). required: - roles additionalProperties: false required: - type - id - attributes additionalProperties: false required: - data additionalProperties: false UpdateUserDocument: type: object properties: data: type: object properties: type: type: string enum: - User id: type: string description: The user’s ID, as in the path. attributes: type: object properties: name: type: string minLength: 1 maxLength: 200 email: description: Null removes it. nullable: true type: string maxLength: 254 format: email pattern: ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ additionalProperties: false relationships: type: object properties: roles: type: object properties: data: maxItems: 200 type: array items: type: object properties: type: type: string enum: - Role id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ required: - type - id additionalProperties: false required: - data additionalProperties: false description: The roles the user holds (replacing those it held). required: - roles additionalProperties: false required: - type - id additionalProperties: false required: - data additionalProperties: false RoleRelationshipDocument: type: object properties: data: minItems: 1 maxItems: 200 type: array items: type: object properties: type: type: string enum: - Role id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ required: - type - id additionalProperties: false required: - data additionalProperties: false UserRolesDocument: type: object properties: data: type: array items: type: object properties: type: type: string enum: - Role id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false DeactivatedUserDocument: type: object properties: data: $ref: "#/components/schemas/UserResource" meta: type: object properties: locksReleased: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Locks it held, released with it. required: - locksReleased additionalProperties: false required: - data - meta additionalProperties: false ServiceAccountPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ServiceAccountResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ServiceAccountResource: type: object properties: type: type: string enum: - ServiceAccount id: type: string attributes: type: object properties: name: type: string description: nullable: true type: string deactivatedAt: nullable: true description: When it was deactivated (none of its tokens may act then); null while active. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - name - description - deactivatedAt - createdAt additionalProperties: false relationships: type: object properties: roles: type: object properties: data: type: array items: type: object properties: type: type: string enum: - Role id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - roles additionalProperties: false required: - type - id - attributes - relationships additionalProperties: false description: A machine client (a portal build, a pipeline, an agent) acting with its own roles through its own tokens. As an actor its kind is `service`. ServiceAccountDocument: type: object properties: data: $ref: "#/components/schemas/ServiceAccountResource" required: - data additionalProperties: false CreateServiceAccountDocument: type: object properties: data: type: object properties: type: type: string enum: - ServiceAccount id: type: string maxLength: 64 pattern: ^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$ description: 'The new service account’s ID, chosen by the client: lowercase letters, digits, ".", "_" and "-".' attributes: type: object properties: name: type: string minLength: 1 maxLength: 200 description: 1 to 200 characters. description: description: What it is for, 1 to 500 characters; null for none. nullable: true type: string minLength: 1 maxLength: 500 required: - name additionalProperties: false relationships: type: object properties: roles: type: object properties: data: maxItems: 200 type: array items: type: object properties: type: type: string enum: - Role id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ required: - type - id additionalProperties: false required: - data additionalProperties: false description: The roles it holds (replacing those it held). required: - roles additionalProperties: false required: - type - id - attributes additionalProperties: false required: - data additionalProperties: false UpdateServiceAccountDocument: type: object properties: data: type: object properties: type: type: string enum: - ServiceAccount id: type: string description: The service account’s ID, as in the path. attributes: type: object properties: name: type: string minLength: 1 maxLength: 200 description: description: Null removes it. nullable: true type: string minLength: 1 maxLength: 500 additionalProperties: false relationships: type: object properties: roles: type: object properties: data: maxItems: 200 type: array items: type: object properties: type: type: string enum: - Role id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ required: - type - id additionalProperties: false required: - data additionalProperties: false description: The roles it holds (replacing those it held). required: - roles additionalProperties: false required: - type - id additionalProperties: false required: - data additionalProperties: false DeactivatedServiceAccountDocument: type: object properties: data: $ref: "#/components/schemas/ServiceAccountResource" meta: type: object properties: locksReleased: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Locks it held, released with it. required: - locksReleased additionalProperties: false required: - data - meta additionalProperties: false ServiceTokenPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ServiceTokenResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ServiceTokenResource: type: object properties: type: type: string enum: - ServiceToken id: type: string attributes: type: object properties: name: type: string description: What the token is for. createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ expiresAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ lastUsedAt: nullable: true description: "When it last authenticated, to the minute; null: never." type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ revokedAt: nullable: true description: When it was revoked; null while not. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - name - createdAt - expiresAt - lastUsedAt - revokedAt additionalProperties: false relationships: type: object properties: serviceAccount: type: object properties: data: type: object properties: type: type: string enum: - ServiceAccount id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - serviceAccount additionalProperties: false required: - type - id - attributes - relationships additionalProperties: false description: "A token of a service account, as listed: never the token itself, which is shown only once, when issued. `id` is the token’s public part (`ccms_sat__…`)." IssueServiceTokenDocument: type: object properties: data: type: object properties: type: type: string enum: - ServiceToken attributes: type: object properties: name: type: string minLength: 1 maxLength: 100 description: What it is for, 1 to 100 characters, e.g. "portal build, production". expiresAt: description: "When it stops working: in the future, within 366 days. Default: 90 days from now." type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - name additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false IssuedServiceTokenDocument: type: object properties: data: $ref: "#/components/schemas/ServiceTokenResource" meta: type: object properties: token: type: string description: "The bearer token (`ccms_sat__`). Shown only in this answer: store it now; it cannot be read again." required: - token additionalProperties: false required: - data - meta additionalProperties: false ServiceTokenDocument: type: object properties: data: $ref: "#/components/schemas/ServiceTokenResource" required: - data additionalProperties: false IdentityProviderPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/IdentityProviderResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false IdentityProviderResource: type: object properties: type: type: string enum: - IdentityProvider id: type: string attributes: type: object properties: name: nullable: true description: "What the sign-in button names (`CCMS_OIDC_NAME`); null: the client’s own wording." type: string required: - name additionalProperties: false links: type: object properties: signIn: type: string description: Where to send the browser to sign in, relative to the API; add `?returnTo=`. required: - signIn additionalProperties: false required: - type - id - attributes - links additionalProperties: false description: "`id` is the provider’s key, e.g. `oidc`." SignedOutDocument: type: object properties: meta: type: object properties: signOutUrl: nullable: true description: The identity provider's sign-out address, to send the browser to so the person is signed out there too; null when there is none. type: string required: - signOutUrl additionalProperties: false required: - meta additionalProperties: false GroupMappingPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/GroupMappingResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false GroupMappingResource: type: object properties: type: type: string enum: - GroupMapping id: type: string attributes: type: object properties: group: type: string description: The group’s name, as the identity provider sends it. createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - group - createdAt additionalProperties: false relationships: type: object properties: role: type: object properties: data: type: object properties: type: type: string enum: - Role id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - role additionalProperties: false required: - type - id - attributes - relationships additionalProperties: false GroupMappingDocument: type: object properties: data: $ref: "#/components/schemas/GroupMappingResource" required: - data additionalProperties: false CreateGroupMappingDocument: type: object properties: data: type: object properties: type: type: string enum: - GroupMapping attributes: type: object properties: group: type: string minLength: 1 maxLength: 256 description: The group’s name exactly as the identity provider sends it (case counts), 1 to 256 characters. required: - group additionalProperties: false relationships: type: object properties: role: type: object properties: data: type: object properties: type: type: string enum: - Role id: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ required: - type - id additionalProperties: false required: - data additionalProperties: false required: - role additionalProperties: false required: - type - attributes - relationships additionalProperties: false required: - data additionalProperties: false SignInOptionsDocument: type: object properties: data: $ref: "#/components/schemas/SignInOptionsResource" required: - data additionalProperties: false SignInOptionsResource: type: object properties: type: type: string enum: - SignInOptions id: type: string attributes: type: object properties: password: type: boolean description: Whether people sign in with an email address and a password (`CCMS_PASSWORD_SIGN_IN`; never in demo mode). passwordReset: type: boolean description: "“Forgot password” is offered: password sign-in is on, and email (`CCMS_MAIL_URL`, `CCMS_PUBLIC_URL`) can carry the link." emailCode: type: boolean description: "“Email me a code” is offered (#634): `CCMS_EMAIL_CODE_SIGN_IN` on, and email (`CCMS_MAIL_URL`) going out." providers: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: How many identity providers are offered (`GET /auth/providers`). required: - password - passwordReset - emailCode - providers additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is always `sign-in`." PasswordSignInDocument: type: object properties: data: type: object properties: type: type: string enum: - PasswordSignIn attributes: type: object properties: email: type: string minLength: 1 maxLength: 320 password: type: string minLength: 1 maxLength: 1024 required: - email - password additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false SignedInDocument: type: object properties: meta: type: object properties: userId: type: string description: Who is signed in now. required: - userId additionalProperties: false required: - meta additionalProperties: false ForgotPasswordDocument: type: object properties: data: type: object properties: type: type: string enum: - PasswordReset attributes: type: object properties: email: type: string minLength: 1 maxLength: 320 required: - email additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false ForgotPasswordAcceptedDocument: type: object properties: meta: type: object properties: message: type: string description: "Always: if the address is known, an email is on its way." required: - message additionalProperties: false required: - meta additionalProperties: false SignInLinkQueryDocument: type: object properties: data: type: object properties: type: type: string enum: - SignInLink attributes: type: object properties: token: type: string minLength: 1 maxLength: 200 required: - token additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false SignInLinkDocument: type: object properties: meta: type: object properties: kind: type: string enum: - invite - reset description: "`invite`: a first password; `reset`: a new one." name: type: string description: Whose link it is. email: nullable: true type: string expiresAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - kind - name - email - expiresAt additionalProperties: false required: - meta additionalProperties: false SetPasswordDocument: type: object properties: data: type: object properties: type: type: string enum: - PasswordSet attributes: type: object properties: token: type: string minLength: 1 maxLength: 200 password: type: string minLength: 1 maxLength: 1024 required: - token - password additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false ChangePasswordDocument: type: object properties: data: type: object properties: type: type: string enum: - PasswordChange attributes: type: object properties: currentPassword: type: string minLength: 1 maxLength: 1024 newPassword: type: string minLength: 1 maxLength: 1024 required: - currentPassword - newPassword additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false PasswordChangedDocument: type: object properties: meta: type: object properties: sessionsEnded: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Your other sessions that ended (this one goes on). required: - sessionsEnded additionalProperties: false required: - meta additionalProperties: false SignInLinkMadeDocument: type: object properties: meta: type: object properties: token: type: string description: "The link’s secret (`ccms_pwl_` and 64 hex digits), shown only now: give it to the person as the link below." url: nullable: true description: "The link: `/set-password#`, from `CCMS_PUBLIC_URL` (else `CCMS_EDITOR_URL`); null when neither is set (build it from the editor’s own address)." type: string expiresAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ emailed: type: boolean description: Whether it was emailed to the person’s address too. required: - token - url - expiresAt - emailed additionalProperties: false required: - meta additionalProperties: false EmailCodeRequestDocument: type: object properties: data: type: object properties: type: type: string enum: - EmailCodeRequest attributes: type: object properties: email: type: string minLength: 1 maxLength: 320 language: description: "The sign-in page’s language (`de`, `en-GB`): the email’s, when there is one in it; else the installation’s (`CCMS_MAIL_LANGUAGE`)." type: string maxLength: 35 pattern: ^[A-Za-z]{2,3}(?:[-_][A-Za-z0-9]{1,8})*$ required: - email additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false EmailCodeRequestedDocument: type: object properties: meta: type: object properties: message: type: string description: "Always: if the address is known, a code is on its way." required: - message additionalProperties: false required: - meta additionalProperties: false EmailCodeSignInDocument: type: object properties: data: type: object properties: type: type: string enum: - EmailCodeSignIn attributes: type: object properties: email: type: string minLength: 1 maxLength: 320 code: type: string minLength: 1 maxLength: 20 description: The six digits from the email; spaces and dashes between them are ignored. required: - email - code additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false EmailCodeLinkDocument: type: object properties: data: type: object properties: type: type: string enum: - EmailCodeLink attributes: type: object properties: token: type: string minLength: 1 maxLength: 200 required: - token additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false MailSettingsDocument: type: object properties: data: $ref: "#/components/schemas/MailSettingsResource" required: - data additionalProperties: false MailSettingsResource: type: object properties: type: type: string enum: - MailSettings id: type: string attributes: type: object properties: state: type: string enum: - on - off - no-secret-key description: "`on`: emails are sent. `off`: no mail server is set (`CCMS_MAIL_URL`); what would be emailed is offered as a link to copy. `no-secret-key`: a server is set, but the instance has no secret key (`CCMS_SECRET_KEY`, or the key file), which seals what a queued email holds; emails are off until there is one." host: nullable: true description: The mail server’s host; null while none is set. type: string port: nullable: true description: Its port; null while none is set. type: integer minimum: -9007199254740991 maximum: 9007199254740991 tls: nullable: true description: "How the connection is protected: `implicit` (`smtps://`, TLS from the start), `starttls` (`smtp://`, STARTTLS required: nothing is sent without it), `opportunistic` (`smtp://` with `CCMS_MAIL_REQUIRE_TLS=false`: STARTTLS when offered). The certificate is always verified. Null while no server is set." type: string enum: - implicit - starttls - opportunistic authenticated: type: boolean description: Whether the server is signed in to (`CCMS_MAIL_USER`). Never the user or the password. from: nullable: true description: The sender’s address (`CCMS_MAIL_FROM`); null while no server is set. type: string senderName: type: string description: "The sender’s name: the branding’s product name." language: type: string enum: - en - de description: The language of an email to someone whose language is not known (`CCMS_MAIL_LANGUAGE`). required: - state - host - port - tls - authenticated - from - senderName - language additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is always `instance`. Read-only: the settings are in the environment." SendTestMailDocument: type: object properties: data: type: object properties: type: type: string enum: - MailTest attributes: type: object properties: language: description: The language to write it in (the editor’s); left out, the installation’s. type: string enum: - en - de additionalProperties: false required: - type additionalProperties: false required: - data additionalProperties: false MailMessageDocument: type: object properties: data: $ref: "#/components/schemas/MailMessageResource" required: - data additionalProperties: false MailMessageResource: type: object properties: type: type: string enum: - MailMessage id: type: string attributes: type: object properties: template: type: string enum: - test description: What kind of email it is. to: type: string description: "The address it goes to: the administrator’s own." language: type: string enum: - en - de description: The language it is written in. status: type: string enum: - queued description: "Queued: it is sent in the background, retried for about half an hour; a failure for good is in the audit log (`mail.failed`)." required: - template - to - language - status additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is the message’s ID (a UUID), as the audit log names it." CommentPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/CommentResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" head: type: string description: "The change set’s head `meta.orphaned` was worked out against: the review head once submitted, else the branch’s head." required: - page - head additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false CommentResource: type: object properties: type: type: string enum: - Comment id: type: string attributes: $ref: "#/components/schemas/CommentAttributes" relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false thread: type: object properties: data: type: object properties: type: type: string enum: - Comment id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false description: "The thread’s first comment: this comment itself for a thread, the comment it replies to for a reply." required: - changeSet - thread additionalProperties: false meta: type: object properties: orphaned: type: boolean description: "Derived: the block (or its whole module) is not at the change set’s head any more, as the reader sees it. False when the module’s file there cannot be read." deleted: type: boolean description: "Its author deleted it: a thread’s first comment that stays, without its text (`body` null), so its replies stay readable. Any other deleted comment is gone." editedAt: nullable: true description: When its author last changed the text; null while never edited. The earlier text is not kept. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - orphaned - deleted - editedAt additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false CommentAttributes: type: object properties: subject: $ref: "#/components/schemas/CommentSubject" blockId: type: string description: "The block, list item or procedure step the comment is on, by its ID: it stays on it when the block is edited or moved; once a save point removes it the comment stays, `meta.orphaned`." body: nullable: true description: The text (plain text), trimmed; null once its author deleted it (`meta.deleted`). type: string author: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who wrote it. commit: type: string description: The change set’s head it was written on (the review head once submitted, else the branch’s head). createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ resolvedAt: nullable: true description: When its thread was resolved; null while open, and always for a reply (a thread’s resolution is its first comment’s). type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ resolvedBy: nullable: true description: Who resolved its thread; null while open, and always for a reply. type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false required: - subject - blockId - body - author - commit - createdAt - resolvedAt - resolvedBy additionalProperties: false CommentSubject: type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false description: 'The module, in one language, the comment is on: `{ type: "module", lang, moduleId }`, as locks name it.' CommentDocument: type: object properties: data: $ref: "#/components/schemas/CommentResource" required: - data additionalProperties: false CreateCommentDocument: type: object properties: data: type: object properties: type: type: string enum: - Comment attributes: type: object properties: body: type: string minLength: 1 maxLength: 10000 description: Plain text, 1 to 10,000 characters; tabs and line breaks allowed, no other control characters. subject: description: The module of a new thread. Not for a reply, which is on its thread’s. allOf: - $ref: "#/components/schemas/CommentSubject" blockId: description: "The block of a new thread, by its ID: in the module at the change set’s head or at its base. Not for a reply." type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ required: - body additionalProperties: false relationships: type: object properties: thread: type: object properties: data: type: object properties: type: type: string enum: - Comment id: type: string format: uuid pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$ required: - type - id additionalProperties: false required: - data additionalProperties: false description: "A reply: the thread’s first comment. Without it, the comment starts a thread." required: - thread additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false EditCommentDocument: type: object properties: data: type: object properties: type: type: string enum: - Comment id: type: string description: The comment’s ID, as in the path. attributes: type: object properties: body: type: string minLength: 1 maxLength: 10000 description: "The new text: plain text, 1 to 10,000 characters; tabs and line breaks allowed, no other control characters." required: - body additionalProperties: false required: - type - id - attributes additionalProperties: false required: - data additionalProperties: false CreateModuleRenameDocument: type: object properties: data: type: object properties: type: type: string enum: - ModuleRename attributes: type: object properties: from: type: string maxLength: 1000 description: The module’s ID now. to: type: string maxLength: 1000 description: "Its new ID: a lowercase slug (`a-z`, `0-9`, single hyphens) of at most 100 characters, no module’s yet." required: - from - to additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false ModuleRenameDocument: type: object properties: data: $ref: "#/components/schemas/ModuleRenameResource" required: - data additionalProperties: false ModuleRenameResource: type: object properties: type: type: string enum: - ModuleRename id: type: string attributes: type: object properties: from: type: string to: type: string branch: type: string description: The change set’s branch. parent: type: string description: The branch head the commit was made on. message: type: string languages: type: array items: type: string description: The languages the module was moved in. rewritten: type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: The other modules (per language) and the manuals rewritten to name the new ID. required: - from - to - branch - parent - message - languages - rewritten additionalProperties: false relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false meta: type: object properties: comments: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: How many of the change set’s comments moved to the new ID. required: - comments additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "`id` is the rename’s commit." ModuleReferencesDocument: type: object properties: data: $ref: "#/components/schemas/ModuleReferencesResource" required: - data additionalProperties: false ModuleReferencesResource: type: object properties: type: type: string enum: - ModuleReferences id: type: string attributes: type: object properties: languages: type: array items: type: string description: The languages the module has a file in. references: type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: "The other modules (per language) and the manuals whose module references, cross-references or entries name it, and the other modules deprecated in favour of it (their `replacedBy`): a rename rewrites them (one commit changes at most 1,000 files, so a rename of a module named in more is refused)." translations: type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: "The modules, each in a target language, whose translation records the rename brings up to date (a cross-reference rewritten changes the source hash of its block): it needs their locks too." required: - languages - references - translations additionalProperties: false meta: type: object properties: head: type: string description: The branch head this was worked out at. workingCopies: type: array items: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false - type: object properties: type: type: string enum: - term termId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - termId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false - type: object properties: type: type: string enum: - template templateId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ path: type: string maxLength: 150 required: - type - templateId - path additionalProperties: false description: "The module’s languages, the references and the translations above that have a working copy in the change set: a rename refuses them until they are committed or discarded." required: - head - workingCopies additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is the module’s ID." TranslationStatusPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/TranslationStatusResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false TranslationStatusResource: type: object properties: type: type: string enum: - TranslationStatus id: type: string attributes: $ref: "#/components/schemas/TranslationStatusAttributes" meta: type: object properties: title: type: string description: The source module’s title; a page design’s name; a manual’s title (in the source language); `Project labels` for the configuration’s labels. totalBlocks: type: integer minimum: 0 maximum: 9007199254740991 description: The translatable units (blocks) of the source module. outdatedBlocks: type: integer minimum: 0 maximum: 9007199254740991 description: "The units that need translating: `outdated` or `missing`, and not at a provider." atProviderBlocks: type: integer minimum: 0 maximum: 9007199254740991 sourceCommit: nullable: true description: The source commit the translation was made from (its translation record’s); null without a record. type: string required: - title - totalBlocks - outdatedBlocks - atProviderBlocks - sourceCommit additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is `/`: the source module in one target language; `/designs/` for a page design’s region text; `/manuals/` for a manual’s own text; `/config/project` for the project labels." TranslationStatusAttributes: type: object properties: kind: type: string enum: - module - design - manual - config description: "`module`: a source module; `design`: a page design’s region text (#568); `manual`: a manual’s own text, its title, its groups’ titles (#731) and its cover images’ alternative text (#656); `config`: the project labels in `openfolia.yaml` (#731: module types, audiences, facets and their values, variant attributes and their values, text attributes, safety symbols, callout styles), no `moduleId`, `designId` or `manualId`." moduleId: description: The source module (`module`). type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ designId: description: The page design (`design`). type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ manualId: description: The manual (`manual`). type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ lang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: The target language. state: $ref: "#/components/schemas/TranslationState" required: - kind - lang - state additionalProperties: false TranslationState: type: string enum: - up-to-date - outdated - missing - at-provider description: "`up-to-date`: translated from the source text it has now; `outdated`: the source changed since, or a block was never translated, or the translation has no record; `missing`: no file in that language; `at-provider`: sent to a translation provider and not back yet. A module is `missing` or `outdated` while any block not at a provider is, else `at-provider` while any block is, else `up-to-date`." TranslationStatusDocument: type: object properties: data: $ref: "#/components/schemas/TranslationStatusDetailResource" required: - data additionalProperties: false TranslationStatusDetailResource: type: object properties: type: type: string enum: - TranslationStatus id: type: string attributes: $ref: "#/components/schemas/TranslationStatusAttributes" meta: type: object properties: title: type: string description: The source module’s title; a page design’s name; a manual’s title (in the source language); `Project labels` for the configuration’s labels. totalBlocks: type: integer minimum: 0 maximum: 9007199254740991 description: The translatable units (blocks) of the source module. outdatedBlocks: type: integer minimum: 0 maximum: 9007199254740991 description: "The units that need translating: `outdated` or `missing`, and not at a provider." atProviderBlocks: type: integer minimum: 0 maximum: 9007199254740991 sourceCommit: nullable: true description: The source commit the translation was made from (its translation record’s); null without a record. type: string blocks: type: array items: $ref: "#/components/schemas/TranslationBlockStatus" description: Every unit of the source module, in document order. required: - title - totalBlocks - outdatedBlocks - atProviderBlocks - sourceCommit - blocks additionalProperties: false required: - type - id - attributes - meta additionalProperties: false TranslationBlockStatus: type: object properties: blockId: anyOf: - type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ - type: string maxLength: 200 pattern: ^[a-z][a-z0-9-]*\.[a-z_][a-z0-9_-]*$ - type: string maxLength: 64 pattern: ^(?:title|group\.[0-9a-f]{12}|coverImage\.(?:default|variant-[0-9a-f]{12}))$ - type: string maxLength: 200 pattern: ^(?:moduleTypes|audiences|facets|variantAttributes|textAttributes|safetySymbols|calloutStyles)\.[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)?$ description: "A block (or list item, or callout) ID of a module; for a page design’s region text (#568), `.`; for a manual’s own text, `title`, `group.<12 hex digits>` (a group’s title, #731), `coverImage.default` or `coverImage.variant-<12 hex digits>` (#656); for the project labels (#731), the label’s list and ID: `moduleTypes.`, `audiences.`, `facets.`, `facets..`, `variantAttributes.`, `variantAttributes..`, `textAttributes.`, `safetySymbols.`, `calloutStyles.`." state: $ref: "#/components/schemas/TranslationState" required: - blockId - state additionalProperties: false CreateTranslationExportDocument: type: object properties: data: type: object properties: type: type: string enum: - TranslationJob attributes: type: object properties: languages: minItems: 1 maxItems: 100 type: array items: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: "The target languages: each a configured target language you manage translations into (`translation.manage` in a role whose scope covers it)." subject: $ref: "#/components/schemas/TranslationExportSubject" ref: description: The branch, tag or commit to export; default `main`. type: string minLength: 1 maxLength: 256 dueDate: description: The day the translation is due (`YYYY-MM-DD`). nullable: true type: string format: date pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$ required: - languages - subject additionalProperties: false required: - type - attributes additionalProperties: false meta: type: object properties: dryRun: description: Work out what would be sent and answer it, recording nothing. type: boolean additionalProperties: false required: - data additionalProperties: false TranslationExportSubject: oneOf: - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - modules moduleIds: minItems: 1 maxItems: 500 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - moduleIds additionalProperties: false - type: object properties: type: type: string enum: - folder folder: type: string maxLength: 200 pattern: ^[^/]+(?:\/[^/]+)?$ required: - type - folder additionalProperties: false - type: object properties: type: type: string enum: - designs designIds: minItems: 1 maxItems: 100 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designIds additionalProperties: false - type: object properties: type: type: string enum: - manuals manualIds: minItems: 1 maxItems: 100 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualIds additionalProperties: false - type: object properties: type: type: string enum: - config required: - type additionalProperties: false description: "What to export, in the source language: `manual` (the modules a manual includes, also through module references, each once), `modules` (a list of module IDs) `folder` (a folder of the content browser: ``, or `/` of the first configured facet) `designs` (page designs’ region text, #568; a `manual` takes the manual’s design too) `manuals` (manuals’ own text: their titles, their groups’ titles, #731, and their cover images’ alternative text, #656; a `manual` takes it too) or `config` (the project labels in `openfolia.yaml`, #731; a `manual` takes them too, as its title page shows them). Modules the exporter may not see, and modules or designs that do not exist, are left out." TranslationJobDocument: type: object properties: data: $ref: "#/components/schemas/TranslationJobResource" required: - data additionalProperties: false TranslationJobResource: type: object properties: type: type: string enum: - TranslationJob id: type: string attributes: $ref: "#/components/schemas/TranslationJobAttributes" meta: $ref: "#/components/schemas/TranslationJobMeta" required: - type - id - attributes - meta additionalProperties: false TranslationJobAttributes: type: object properties: languages: type: array items: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: The target languages, in the configured order. subject: $ref: "#/components/schemas/TranslationExportSubject" ref: type: string description: The ref exported, as asked for. commit: type: string description: "The commit `ref` resolved to: the files are always made from it." state: type: string enum: - sent - returned - cancelled description: "`sent`: at the provider (its units are `at-provider` in the translation status); `returned`: read back by the import; `cancelled`." dueDate: nullable: true description: The day the translation is due; null for none. type: string format: date pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$ createdBy: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who exported it. createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - languages - subject - ref - commit - state - dueDate - createdBy - createdAt additionalProperties: false TranslationJobMeta: type: object properties: modules: type: integer minimum: 0 maximum: 9007199254740991 description: "Distinct modules (and page designs, #568) with a unit." units: type: integer minimum: 0 maximum: 9007199254740991 description: "Units sent: one per block and target language." words: type: integer minimum: 0 maximum: 9007199254740991 description: Their words in the source language, roughly as counted. languages: type: array items: type: object properties: lang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ modules: type: integer minimum: 0 maximum: 9007199254740991 description: "Distinct modules (and page designs, #568) with a unit." units: type: integer minimum: 0 maximum: 9007199254740991 description: "Units sent: one per block and target language." words: type: integer minimum: 0 maximum: 9007199254740991 description: Their words in the source language, roughly as counted. required: - lang - modules - units - words additionalProperties: false description: The counts per target language, in `languages`’ order. dryRun: description: "True on a dry run’s answer: nothing was recorded." type: boolean required: - modules - units - words - languages additionalProperties: false TranslationJobPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/TranslationJobResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false CheckPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/CheckResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" counts: type: object properties: blocking: type: integer minimum: -9007199254740991 maximum: 9007199254740991 warning: type: integer minimum: -9007199254740991 maximum: 9007199254740991 required: - blocking - warning additionalProperties: false description: Every check found, by severity, before `filter[severity]`. modules: type: object properties: checked: type: integer minimum: -9007199254740991 maximum: 9007199254740991 withoutIssues: type: integer minimum: -9007199254740991 maximum: 9007199254740991 required: - checked - withoutIssues additionalProperties: false description: The modules checked (by ID, in any language the reader may read), and how many of them no check names. commit: type: string description: The commit checked. required: - page - counts - modules - commit additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false CheckResource: type: object properties: type: type: string enum: - Check id: type: string attributes: type: object properties: code: type: string enum: - invalid-module - invalid-manifest - unknown-module-type - unknown-audience - unknown-language - unknown-facet - unknown-facet-value - unknown-safety-symbol - unknown-text-attribute - placeholder-in-module - unknown-placeholder - unknown-variant-attribute - unknown-variant-value - version-compare-on-enum - invalid-version-value - missing-variant-attribute - missing-text-attribute - pdf-accessibility - pdf-not-checked - pdf-layout-not-checked - page-design-missing-value - page-design-missing-text-attribute - page-design-missing-variant-attribute - page-design-overflow - running-head-truncated - callout-label-overflow - safety-message-split - passthrough - empty-table - snippet-too-large - inconsistent-variants - above-audience - delivery-access-capped - missing-manufacturer - missing-module - module-cycle - module-ref-unknown-block - expansion-too-large - chunk-set-too-large - chunks-not-checked - xref-unknown-module - xref-unknown-block - xref-outside-manual - deprecated-module - unknown-page-design - unknown-replacement - address-taken - unknown-term - deprecated-term - unknown-callout - hidden-callout - unknown-callout-style - missing-image - missing-attachment - attachment-file-name - missing-translation - outdated-translation - page-design-missing-translation - missing-cover-image - missing-cover-alt - missing-source-title - unknown-cover-variant - unknown-source-manual - derived-source - no-gathered-types - safety-module-excluded - safety-notice-excluded - unknown-excluded-module - empty-derived-manual - derived-audience-wider - page-design-template-error - page-design-unknown-template - page-design-missing-font - page-design-dropped-text - page-design-region-languages-differ - missing-label - forbidden-term - style-rule - writing-not-checked description: "Stable. Its severity is fixed per code (in brackets below), but for `forbidden-term` and `style-rule`, whose severity the configuration decides (#55): `terminology.forbiddenIsBlocking`, a style rule's `severity`. `invalid-module` (blocking): A module file cannot be read. `invalid-manifest` (blocking): The manual’s manifest cannot be read. `unknown-module-type` (blocking): The module’s type is not configured. `unknown-audience` (blocking): The module’s or manual’s audience is not configured (a module with one is left out of every manual). `unknown-language` (blocking): The module’s language is neither the source nor a target. `unknown-facet` (blocking): The module names a facet that is not configured. `unknown-facet-value` (blocking): The module names a value its facet does not have. `unknown-safety-symbol` (blocking): A safety block uses a symbol that is not configured. `unknown-text-attribute` (blocking): A text attribute is not configured. `placeholder-in-module` (blocking): A module holds a page design placeholder (`placeholder:[]`), which only a design’s regions, header and footer may hold. `unknown-placeholder` (blocking): A placeholder names no known value. `unknown-variant-attribute` (blocking): A condition or variant names an attribute that is not configured. `unknown-variant-value` (blocking): A condition or variant names a value its attribute does not have. `version-compare-on-enum` (blocking): A condition compares an attribute that is not a version. `invalid-version-value` (blocking): A version attribute’s value is not a version. `missing-variant-attribute` (blocking): A published variant does not set an attribute a condition tests: the content under it is left out. `missing-text-attribute` (blocking): A published variant has no value for a text attribute the content uses. `pdf-accessibility` (blocking): A variant’s PDF in a language cannot meet PDF/UA-1, the configured PDF standard (`params.problem` says why): the PDF route refuses it. `pdf-not-checked` (warning): A variant’s PDF in a language could not be rendered (too slow, or a template that does not compile), so PDF/UA-1 was not checked: the PDF route says why. `pdf-layout-not-checked` (warning): With `pdf.standard` `none`, a variant’s PDF in a language with a page design (or a callout legend beside its image) could not be rendered (too slow, or a template that does not compile; `params.reason`), so what its layout cannot fit was not checked: the PDF route says why. `page-design-missing-value` (warning): A placeholder or title page field of the manual’s page design has no value for the manual and variant (`params.design`, `params.at`, `params.name` the placeholder or field): a placeholder stays one, a field is left out. The release and the date are not reported, as a manual’s checks never know them. `page-design-missing-text-attribute` (blocking): A text of the manual’s page design uses a text attribute the variant has no value for (`params.design`, `params.at`, `params.name` the attribute). `page-design-missing-variant-attribute` (blocking): A condition in the manual’s page design tests an attribute the variant does not set (`params.design`, `params.at`, `params.name` the attribute): what it holds is left out. `page-design-overflow` (warning): A region of the manual’s page design does not fit its place on the title or back page in a variant’s PDF (`params.at`, e.g. `regions.footer`): the PDF cuts it off. `running-head-truncated` (warning): A running header or footer of the manual’s page design does not fit on one line even at its smallest size (`params.at`, e.g. `header.default.right`; `params.text`, the whole text): the PDF shortens it with an ellipsis. `callout-label-overflow` (warning): A callout’s legend beside its image does not fit the image’s height in a variant’s PDF, even at the smallest size (`pdf.calloutLabelMinSize`): the PDF cuts it off (`params.module`, `params.image`, `params.callout`; `params.at`, `callouts...`). `safety-message-split` (warning): A safety message is taller than a whole page of the manual’s page design in a variant’s PDF, so it cannot be kept on one page: the PDF breaks it across pages (`params.module`, `params.block`, `params.text` its hazard; `params.at`, `safety..`). Shorten it or split it into several messages. `passthrough` (warning): Content kept verbatim from an import: convert it to blocks. `empty-table` (warning): Every cell of a table is empty. `snippet-too-large` (warning): A snippet holds a section or a module reference: snippets are one or a few blocks of text. `inconsistent-variants` (warning): The manual’s variants set different attributes. `above-audience` (warning): A module above the manual’s audience is left out of it. `delivery-access-capped` (warning): The project’s `delivery.access` (`params.access`) opens the stable addresses further than this deployment allows (`CCMS_DELIVERY_MAX_ACCESS`, `params.maxAccess`): they are served at that instead. `missing-manufacturer` (warning): The project has no manufacturer details (`manufacturer`) and turns this check on (`release.checkManufacturer`, #395): the manual would be released without its imprint, the manufacturer’s name, address and contact. `missing-module` (blocking): The manual, or a module reference block, names a module that does not exist. `module-cycle` (blocking): Module references form a cycle. `module-ref-unknown-block` (blocking): A module reference to one block of a module (#223) names a block that module does not have (`params.module`, `params.block`): nothing is included in its place. `expansion-too-large` (blocking): Too large once its module references are included: more than `MAX_EXPANDED_NODES` (500,000) content nodes, `MAX_EXPANDED_CHARS` (12,000,000) characters or `MAX_EXPANDED_TABLE_CELLS` (1,000,000) table cells (rows × columns) (a module referred to over several paths counts once per path), or blocks and references nested more than `MAX_NESTING_DEPTH` (100) deep; the message says which. At a manual, for a variant in a language: nothing of it is resolved, so its resolution, PDF, pages and previews are 422 `expansion-too-large`, and its PDF is not checked. At a module (#688), its retrieval chunks (every variant block kept, its FAQ entries counted with it): `GET /chunks` leaves the module out and names it in `meta.leftOut`; `params.reason` is `size` or `depth`. `chunk-set-too-large` (blocking): At a change set’s head, the retrieval chunks of the whole commit, as the reader sees it, are too large together (#710): many modules each include a lot, past four times the content they are made from plus room for 32 modules at the limits of one (`MAX_CHUNK_SET_FACTOR`, `CHUNK_SET_MODULES_AT_LIMITS`; of the text they keep, room for 8). Once released, `GET /chunks` refuses that commit (422 `chunk-set-too-large`) and the change feed tells none of its chunks. One check at each of the modules that expanded the most (`meta.largest` of that error, at most five, only modules the reader may see), `params.chars` and `params.nodes` what its chunks expanded to; `params.kept` `true` when the room for the text kept was the one passed. `chunks-not-checked` (warning): Cutting the retrieval chunks of the modules a checks run checks took more than its budget (#711: four times their content plus room for 32 modules at the limits of one, `ExpansionBudget.forContent`, as `GET /chunks` holds a commit’s chunks), so from this module on (module ID, then language order) whether they can be cut was not checked (`params.modules`: how many module files, a module in one language each, were not, this one included). Their modules include a lot: refer to fewer modules, over fewer paths. `xref-unknown-module` (blocking): A cross-reference links to a module that does not exist. `xref-unknown-block` (blocking): A cross-reference links to a block that does not exist. `xref-outside-manual` (warning): A cross-reference links to a module that is not in the manual. `deprecated-module` (warning): The manual includes a deprecated module, directly or through module references (`params.module`; `params.replacedBy`, the module replacing it, when it names one). `unknown-page-design` (blocking): The manual’s own page design (`design` in its manifest) or the project’s default (`pdf.design`) names a design that is not in the content, or whose file is no design (`params.design`, `params.from`: `manual` or `config`): the PDF uses the built-in design. `unknown-replacement` (warning): A deprecated module or manual names a replacement that does not exist, or itself (`params.replacedBy`). `address-taken` (blocking): A stable address (`params.address`) is both the ID of a manual and the slug or a former address of another (`delivery.manuals`, `params.as`: `slug` or `formerly`), both manuals ones the reader sees: the address opens the manual configured for it, never the one of that ID (`params.manual`, the other manual). `unknown-term` (blocking): A term link names a term that does not exist, or whose file cannot be read (`params.term`). `deprecated-term` (warning): A term link names a deprecated term (`params.term`; `params.replacedBy`, the term to use instead, when it names one). `unknown-callout` (blocking): A callout reference names an image of its module, or a callout of that image, that does not exist. `hidden-callout` (warning): A callout reference names a callout (or an image) that a variant of the manual leaves out: it has no number there. `unknown-callout-style` (blocking): A callout on an image names a style that is not configured. `missing-image` (blocking): An image block refers to an image that is not stored. `missing-attachment` (blocking): An attachment block refers to a file that is not stored. `attachment-file-name` (blocking): An attachment block names its file with an extension that does not fit the stored file (or a dangerous one): downloads ignore that name. `missing-translation` (warning): A module has no translation into a target language (a manual falls back to the source language). `outdated-translation` (warning): Blocks of the source module changed since this translation was made from it, or were never translated (`params.blocks` counts them; a translation without a record counts every block). At a manual (#656): units of its cover images’ alternative text (`params.at` `coverImage`) or of its page design’s region text (`params.design`) with a version in `params.lang` made from another source text, or without a record. `page-design-missing-translation` (warning): A text of the manual’s page design has no version in the manual’s language (`params.design`, `params.at`): the source language’s is used. `missing-cover-image` (warning): The manual’s cover image, or a variant’s (#394), is not stored or is no image (`params.at` where the manifest names it, `params.asset`): the PDF goes without it. `missing-cover-alt` (blocking): The alternative text of the manual’s cover image, or a variant’s (#394), has no version in the source language (`params.at`), which every other language falls back to. `missing-source-title` (blocking): The manual’s title, or a group’s (`params.at`), is written per language without a version in the source language (#731), which every other language falls back to. `unknown-cover-variant` (warning): The manual gives a cover image to a variant it does not build, or to one that has one already (`params.at`): it is never shown. `unknown-source-manual` (blocking): The derived manual’s source manual (#451, `rule.source`) does not exist or cannot be read: it holds only its front and back matter. `derived-source` (blocking): The derived manual’s source manual (#451) is a derived manual itself, or the manual itself: nothing is gathered, a derived manual is made from an assembled one. `no-gathered-types` (blocking): The derived manual’s rule (#451) names no module types and the configuration marks none as safety (`moduleTypes[].safety`): nothing is gathered. `safety-module-excluded` (warning): A module of a safety type (`moduleTypes[].safety`) in the derived manual’s source is left out by its rule (#451; `params.at` the module): excluded, or of a type the rule does not gather. `safety-notice-excluded` (warning): A safety notice of the derived manual’s source is left out by its notice gathering (#670; `params.at` the module holding it): every module of the source that includes it is excluded or of a type the rule does not search, or its hazard level is not one the rule gathers. `unknown-excluded-module` (warning): The derived manual’s rule excludes a module its source manual does not include (#451; `params.at` the module). `empty-derived-manual` (warning): The derived manual’s rule gathers no module from its source manual (#451): it holds only its front and back matter. `derived-audience-wider` (blocking): The derived manual is for a wider audience than its source manual (#451): nothing is gathered (only its front and back matter, with its own text attributes), so the source’s text never reaches readers it is not for. `page-design-template-error` (blocking): The page design’s own template (#396) does not compile: at a manual laid out with it, or at the design itself when a change set changes the design or its template (checked on a small manual of its own). `params.design`, `params.template`, `params.file` (its repository path), `params.line` and `params.column` (1-based; 0 when the compiler named no place) and `params.problem` (the compiler’s message). The PDF route answers 422 `template-error`; on the base branch the template merged before stays in use. `page-design-unknown-template` (blocking): The page design names an own template (`template`, #396) the content repository does not have (`templates//manual.typ`): its preset lays the PDF out. `params.design`, `params.template`. `page-design-missing-font` (warning): A font file of the manual’s page design is not stored, or is no TrueType, OpenType, WOFF or WOFF2 font (`params.design`, `params.at` the face, `params.asset`): the PDF uses the default font in its place. `page-design-dropped-text` (warning): A text of the manual’s page design has a version in neither the manual’s language nor the source language (`params.design`, `params.at`): it is left out of the PDF. `page-design-region-languages-differ` (warning): A region of the manual’s page design has other blocks in the manual’s language than in the source language (`params.design`, `params.at`, `params.name` the source language): its translation does not keep the source’s block IDs. `missing-label` (warning): No output labels in the manual’s language: English is used. `forbidden-term` (warning): The text uses a forbidden variant of an approved term in the module’s language, matched without case as a whole word (#55; `params.term`, `params.text` what was found, `params.replacement` the preferred variant, `params.note` the variant’s note, `params.field`, `params.start` and `params.end` where in the block’s plain text, UTF-16 offsets), or a variant of a deprecated term (`params.status` `deprecated`; `params.replacement` its replacement’s preferred variant, when it names one). Blocking when the configuration says so (`terminology.forbiddenIsBlocking`), for forbidden variants only; else a warning. `style-rule` (warning): The text matches a style rule of the module’s language (#55, `styleRules` in `openfolia.yaml`; `params.rule` its ID, `params.message` its message, `params.replacement` its fix, `params.text`, `params.field`, `params.start`, `params.end`), or has a sentence longer than `maxSentenceWords` (`params.rule` `max-sentence-words`, `params.words`, `params.max`). The rule’s `severity` decides: a warning unless it says `blocking`. `writing-not-checked` (warning): The writing checks (#55) stopped before the end of the module’s text (`params.stopped`): it is longer than they read (`chars`, `MAX_WRITING_CHARS`, 1,000,000 characters), it has more findings than they report (`findings`, `MAX_WRITING_FINDINGS`, 1,000), or its style rules’ patterns took more than their steps (`steps`, `MAX_WRITING_STEPS`). What comes after was not checked." severity: type: string enum: - blocking - warning description: "`blocking`: holds up review and release until it is fixed; `warning`: worth a look, holds up nothing." category: type: string enum: - validation - reference - image - attachment - translation - writing subject: $ref: "#/components/schemas/ContentSubject" blockId: nullable: true description: The block, list item or procedure step, by its ID; null for the subject as a whole. type: string message: type: string description: In English, for logs; clients show their own text for `code`. params: type: object additionalProperties: type: string description: "What the code is about: `module` (a module referred to), `block`, `lang` (a language without a translation, or an outdated one), `blocks` (how many blocks of an outdated translation: part of what makes the check, so its `id` changes with the count), `asset` (an image), `at` (where in a manifest), `problem` (why the PDF cannot meet PDF/UA-1, in the renderer's English), `reason` (the PDF route's error code for a PDF not checked), `address`, `manual` and `as` (a stable address taken, the other manual, `slug` or `formerly`), `access` and `maxAccess` (`delivery.access` and the deployment's cap), `chars`, `nodes` and `kept` (what a module's retrieval chunks expanded to in a chunk set too large together, and whether the room for the text kept was the one passed), `modules` (how many module files, a module in one language each, whose chunks were not checked), and for the writing checks (#55) `term`, `rule`, `status`, `text`, `replacement`, `note`, `message`, `words` and `max`, and `field`, `start` and `end` (which text of the block, and the UTF-16 offsets of what was found in its plain text), `stopped` (why they stopped)." required: - code - severity - category - subject - blockId - message - params additionalProperties: false meta: type: object properties: variants: type: array items: type: string description: The manual’s variants (slugs) it was found in; empty when it does not depend on one. languages: type: array items: type: string description: The manual’s languages it was found in; empty when it does not depend on one. title: nullable: true description: The subject’s title (the module in its language, or the manual), as the reader reads it; null when it cannot be read. type: string required: - variants - languages - title additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "A problem found in content: derived on every request, never stored." ContentSubject: oneOf: - type: object properties: type: type: string enum: - module lang: type: string pattern: ^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - lang - moduleId additionalProperties: false - type: object properties: type: type: string enum: - manual manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - manualId additionalProperties: false - type: object properties: type: type: string enum: - design designId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ required: - type - designId additionalProperties: false description: "The module (in one language), the manual or the page design (its own template, #396) the problem is in: where to fix it." TranslationImportDocument: type: object properties: data: $ref: "#/components/schemas/TranslationImportResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false TranslationImportResource: type: object properties: type: type: string enum: - TranslationImport id: type: string attributes: type: object properties: languages: type: array items: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: The uploaded documents’ target languages, in the job’s order. baseRef: type: string description: The branch it was checked against and goes into. baseCommit: type: string description: That branch’s commit when it was checked. state: type: string enum: - validated - applying - applied description: "`validated`: kept until `expiresAt` to be applied; `applying`: being applied now; `applied`: its change set is made." createdBy: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ expiresAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: When it is removed (an applied one an hour after it was applied). required: - languages - baseRef - baseCommit - state - createdBy - createdAt - expiresAt additionalProperties: false relationships: type: object properties: job: type: object properties: data: type: object properties: type: type: string enum: - TranslationJob id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false description: The translation job the documents came from. changeSet: type: object properties: data: nullable: true type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false description: The change set the import went into; null until applied. required: - job - changeSet additionalProperties: false meta: type: object properties: counts: $ref: "#/components/schemas/TranslationImportCounts" report: type: array items: $ref: "#/components/schemas/TranslationImportModule" description: "One page of the report: per module and target language (the languages in the job’s order, then module IDs), each unit’s state. Paged by `page[number]` and `page[size]` (the document’s `meta.page` and `links`)." commit: description: "Once applied: the save point’s commit (null when nothing changed)." nullable: true type: string required: - counts - report additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false TranslationImportCounts: type: object properties: units: type: integer minimum: 0 maximum: 9007199254740991 description: Every unit read, in every document. ok: type: integer minimum: 0 maximum: 9007199254740991 sourceChanged: type: integer minimum: 0 maximum: 9007199254740991 brokenMarkup: type: integer minimum: 0 maximum: 9007199254740991 unknownBlock: type: integer minimum: 0 maximum: 9007199254740991 unknownModule: type: integer minimum: 0 maximum: 9007199254740991 outsideScope: type: integer minimum: 0 maximum: 9007199254740991 required: - units - ok - sourceChanged - brokenMarkup - unknownBlock - unknownModule - outsideScope additionalProperties: false description: The units per state, over the whole report. TranslationImportModule: type: object properties: lang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string description: "The `` of the document: a module’s ID, `design.` for a page design’s region text (#568), `manual.` for a manual’s own text (#656), or `config.project` for the project labels (#731)." designId: description: "For a page design’s region text (#568): the design. Its units are `.`; `unknown-module` is a design that is not there, `outside-scope` one whose translation into this language you do not manage, or that you may not change (`content.edit` in a role restricting nothing)." type: string manualId: description: "For a manual’s own text (its title and its groups’ titles, #731; its cover images’ alternative text, #656): the manual. Its units are `title`, `group.`, `coverImage.default` and `coverImage.variant-`; `unknown-module` is a manual that is not there for you, `outside-scope` one you do not read in this language, whose translation into it you do not manage, or whose manifest you may not change. A translation that is not one line of at most 500 characters is `broken-markup` (`invalid-content`)." type: string config: description: For the project labels (#731, the labels in `openfolia.yaml`). Its units are `moduleTypes.`, `facets..`, …; `outside-scope` where you do not manage their translation into this language (`translation.manage` restricted by nothing but languages) or may not change the configuration. A translation that is not one line of at most 500 characters is `broken-markup` (`invalid-content`). type: boolean enum: - true title: description: The source module’s title on the base (a page design’s name, a manual’s title in the source language, `Project labels`); not for `unknown-module` or `outside-scope`. type: string units: type: array items: $ref: "#/components/schemas/TranslationImportUnit" description: In the document’s order. required: - lang - moduleId - units additionalProperties: false TranslationImportUnit: type: object properties: blockId: type: string state: type: string enum: - ok - source-changed - broken-markup - unknown-block - unknown-module - outside-scope description: "`ok`: imported on apply. `source-changed`: the source block changed since it was exported; imported unless its decision is `skip`, and then still `outdated`. `broken-markup`: its target’s inline codes do not match its source (`reason`); refused, alone. `unknown-block`: not a block the job sent in this language (`reason: not-sent`), or one the source has no longer (`removed`). `unknown-module`: no such module you may read. `outside-scope`: a module you read but do not manage translations of in this language (or whose translation you may not see)." reason: description: "Why it is refused, a stable code. `broken-markup`: `missing-segment`, `extra-segment`, `missing-target`, `unsupported-markup`, `unknown-code`, `code-mismatch`, `missing-code`, `extra-code`, `nesting`, `line-break`, `empty`, `invalid-content`, or `source-hash` (its `ccms:sourceHash` is not the one exported). `unknown-block`: `not-sent`, `removed`." type: string kind: description: "What the unit is: its block’s type (`paragraph`, `section`, `table`, …), `item` for a list item or procedure step, or `callout` for an image callout’s legend (its `blockId` the callout’s ID). Where the job sent the unit (not for `unknown-module`, `outside-scope` or `not-sent`)." type: string detail: description: What is wrong, for a person. type: string texts: description: "`source-changed` only: the texts the decision is made on, as plain text (each part of the unit on a line of its own). Left out once the report holds 4194304 characters of them." type: object properties: exported: type: string description: The source as the job sent it (at its commit). current: type: string description: The source on the base now (empty when it has none). target: type: string description: The uploaded translation. truncated: type: boolean description: One of them was cut at 2000 characters. required: - exported - current - target - truncated additionalProperties: false required: - blockId - state additionalProperties: false ApplyTranslationImportDocument: type: object properties: meta: type: object properties: decisions: maxItems: 50000 type: array items: type: object properties: lang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: anyOf: - type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ - type: string format: starts_with pattern: ^design\..* - type: string format: starts_with pattern: ^manual\..* - type: string enum: - config.project description: A module’s ID; for a page design’s region text (#568), `design.`; for a manual’s own text (#656), `manual.`; for the project labels (#731), `config.project`. blockId: anyOf: - type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ - type: string maxLength: 200 pattern: ^[a-z][a-z0-9-]*\.[a-z_][a-z0-9_-]*$ - type: string maxLength: 64 pattern: ^(?:title|group\.[0-9a-f]{12}|coverImage\.(?:default|variant-[0-9a-f]{12}))$ - type: string maxLength: 200 pattern: ^(?:moduleTypes|audiences|facets|variantAttributes|textAttributes|safetySymbols|calloutStyles)\.[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)?$ description: "A block (or list item, or callout) ID of a module; for a page design’s region text (#568), `.`; for a manual’s own text, `title`, `group.<12 hex digits>` (a group’s title, #731), `coverImage.default` or `coverImage.variant-<12 hex digits>` (#656); for the project labels (#731), the label’s list and ID: `moduleTypes.`, `audiences.`, `facets.`, `facets..`, `variantAttributes.`, `variantAttributes..`, `textAttributes.`, `safetySymbols.`, `calloutStyles.`." decision: type: string enum: - keep - skip required: - lang - moduleId - blockId - decision additionalProperties: false description: "Per `source-changed` unit: `keep` (import it; it stays `outdated`) or `skip` (leave it out). A unit not named is `keep`; a decision on any other unit changes nothing." required: - decisions additionalProperties: false additionalProperties: false MarkCurrentDocument: type: object properties: data: type: object properties: type: type: string enum: - TranslationMarkCurrent attributes: type: object properties: changeSetId: type: string minLength: 1 maxLength: 100 description: A draft change set of yours. moduleId: description: The source module whose translation is marked current. Exactly one of `moduleId`, `designId`, `manualId` and `config`. type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ designId: description: A page design whose region text in `lang` is marked current (#656). type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ manualId: description: "A manual whose own text in `lang` (its title, its groups’ titles, its cover images’ alternative text) is marked current (#656, #731)." type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ config: description: The project labels in `openfolia.yaml` (#731), marked current in `lang`. type: boolean enum: - true lang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: A target language. required: - changeSetId - lang additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false TranslationMarkCurrentDocument: type: object properties: data: $ref: "#/components/schemas/TranslationMarkCurrentResource" required: - data additionalProperties: false TranslationMarkCurrentResource: type: object properties: type: type: string enum: - TranslationMarkCurrent id: type: string attributes: type: object properties: lang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ moduleId: type: string description: The module’s ID; a page design’s key (`design.`), a manual’s (`manual.`) or the project labels’ (`config.project`). designId: type: string manualId: type: string config: type: boolean enum: - true commit: nullable: true description: The save point’s commit; null when the record said so already. type: string blocks: type: integer minimum: 0 maximum: 9007199254740991 description: The blocks (units) the record now names as translated from their current source. required: - lang - moduleId - commit - blocks additionalProperties: false relationships: type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false required: - type - id - attributes - relationships additionalProperties: false TranslationCoveragePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/TranslationCoverageResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false TranslationCoverageResource: type: object properties: type: type: string enum: - TranslationCoverage id: type: string attributes: $ref: "#/components/schemas/TranslationCoverageAttributes" meta: type: object properties: title: type: string description: The manual’s title. deprecated: type: boolean description: The manual is deprecated (#266). modules: description: The modules the manual includes (also through module references) that the reader sees in the source language and would see a translation of in this language, each once, by its state in `GET /translations/status`. allOf: - $ref: "#/components/schemas/CoverageCounts" blocks: description: The translatable blocks of those modules, by their state. allOf: - $ref: "#/components/schemas/CoverageCounts" design: description: The units of the region text of the page design the manual is laid out with (#656), by their state in `GET /translations/status` (`kind` `design`); all 0 for the built-in design or one without region text. allOf: - $ref: "#/components/schemas/CoverageCounts" cover: description: "The units of the manual’s own text, by their state in `GET /translations/status` (`kind` `manual`): its title and its groups’ titles (#731), and its cover images’ alternative text (#656)." allOf: - $ref: "#/components/schemas/CoverageCounts" labels: description: "The units of the project labels (#731: the labels in `openfolia.yaml`, which the manual’s title page and metadata show), by their state in `GET /translations/status` (`kind` `config`); all 0 without labels. The same for every manual in a language." allOf: - $ref: "#/components/schemas/CoverageCounts" required: - title - deprecated - modules - blocks - design - cover - labels additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is `/`: one manual in one target language." TranslationCoverageAttributes: type: object properties: manualId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ lang: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: The target language. required: - manualId - lang additionalProperties: false CoverageCounts: type: object properties: total: type: integer minimum: 0 maximum: 9007199254740991 upToDate: type: integer minimum: 0 maximum: 9007199254740991 outdated: type: integer minimum: 0 maximum: 9007199254740991 description: The source changed since, a block was never translated, or the translation has no record. atProvider: type: integer minimum: 0 maximum: 9007199254740991 description: Sent to a translation provider, not back yet. missing: type: integer minimum: 0 maximum: 9007199254740991 description: No file in that language. required: - total - upToDate - outdated - atProvider - missing additionalProperties: false description: How many stand in each translation state (`TranslationState`); the four add up to `total`. ModuleUsagePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ModuleUsageResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ModuleUsageResource: type: object properties: type: type: string enum: - ModuleUsage id: type: string attributes: $ref: "#/components/schemas/ModuleUsageAttributes" meta: type: object properties: languages: type: array items: type: string pattern: ^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$ description: The languages the reader sees it in, in the configured order. usage: $ref: "#/components/schemas/ModuleUsageCounts" usedIn: maxItems: 50 type: array items: $ref: "#/components/schemas/ModuleUse" description: "Where it is used: manuals first, then modules, each by title; at most 50 (`usage` counts them all). Only manuals and modules the reader may see are named or counted." required: - languages - usage - usedIn additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is the module ID: the module in any language." ModuleUsageAttributes: type: object properties: moduleId: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ title: type: string description: Its source-language file’s title, else its first file’s the reader sees. type: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ description: Its module type, from the same file. deprecated: type: boolean description: Deprecated (#266), by the same file. required: - moduleId - title - type - deprecated additionalProperties: false ModuleUsageCounts: type: object properties: manuals: type: integer minimum: 0 maximum: 9007199254740991 description: The manuals including it, directly or through module references. modules: type: integer minimum: 0 maximum: 9007199254740991 description: The modules whose module reference blocks name it. required: - manuals - modules additionalProperties: false TermPageDocument: type: object properties: data: type: array items: anyOf: - $ref: "#/components/schemas/TermResource" - $ref: "#/components/schemas/UnreadableTermResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false TermResource: type: object properties: type: type: string enum: - Term id: type: string attributes: type: object properties: schemaVersion: type: number enum: - 1 status: type: string enum: - proposed - approved - deprecated description: "`proposed` (not agreed yet), `approved` (use it), `deprecated` (no longer use it; `replacedBy` may name the term to use instead)." domain: description: The subject field the term belongs to, e.g. `charging`. type: string replacedBy: description: "A deprecated term’s successor: the ID of the term to use instead (not checked to exist here)." type: string languages: type: object additionalProperties: $ref: "#/components/schemas/TermLanguage" description: "Per language tag (canonical case): the preferred variant, the allowed and forbidden ones (each with an optional note), the definition (inline content: text runs with marks, and line breaks) and a usage note." required: - schemaVersion - status - languages additionalProperties: false meta: type: object properties: issues: type: array items: $ref: "#/components/schemas/Issue" description: "Problems found checking it against the configuration (a language it does not hold: `unknown-language`)." required: - issues additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is the term’s ID, its file name (`terms/.yaml`)." UnreadableTermResource: type: object properties: type: type: string enum: - Term id: type: string attributes: type: object properties: {} additionalProperties: false meta: type: object properties: error: type: string description: Why it cannot be read. required: - error additionalProperties: false required: - type - id - attributes - meta additionalProperties: false TermDocument: type: object properties: data: $ref: "#/components/schemas/TermDetailResource" required: - data additionalProperties: false TermDetailResource: type: object properties: type: type: string enum: - Term id: type: string attributes: type: object properties: schemaVersion: type: number enum: - 1 status: type: string enum: - proposed - approved - deprecated description: "`proposed` (not agreed yet), `approved` (use it), `deprecated` (no longer use it; `replacedBy` may name the term to use instead)." domain: description: The subject field the term belongs to, e.g. `charging`. type: string replacedBy: description: "A deprecated term’s successor: the ID of the term to use instead (not checked to exist here)." type: string languages: type: object additionalProperties: $ref: "#/components/schemas/TermLanguage" description: "Per language tag (canonical case): the preferred variant, the allowed and forbidden ones (each with an optional note), the definition (inline content: text runs with marks, and line breaks) and a usage note." required: - schemaVersion - status - languages additionalProperties: false meta: type: object properties: issues: type: array items: $ref: "#/components/schemas/Issue" description: "Problems found checking it against the configuration (a language it does not hold: `unknown-language`)." usage: type: object properties: modules: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The module files (each language apart) linking it. required: - modules additionalProperties: false description: How many module files link the term (#245), from the module index; only what the reader may see counts. linkedIn: maxItems: 50 type: array items: $ref: "#/components/schemas/TermUse" description: The module files whose term links name it, by title; at most 50 (`usage` counts them all). Only module files the reader may see are named. A term still linked cannot be deleted (422 `term-in-use` on the commit). required: - issues - usage - linkedIn additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is the term’s ID, its file name (`terms/.yaml`)." TermUse: type: object properties: moduleId: type: string lang: type: string title: type: string description: The module file’s title. required: - moduleId - lang - title additionalProperties: false description: A module file whose term links name the term (#245). PageDesignPageDocument: type: object properties: data: type: array items: anyOf: - $ref: "#/components/schemas/PageDesignResource" - $ref: "#/components/schemas/UnreadablePageDesignResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false PageDesignResource: type: object properties: type: type: string enum: - PageDesign id: type: string attributes: type: object properties: schemaVersion: type: number enum: - 1 name: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ preset: type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ template: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ page: default: size: a4 margins: top: 26 right: 22 bottom: 24 left: 22 doubleSided: false type: object properties: size: default: a4 type: string enum: - a4 - us-letter - a5 margins: default: top: 26 right: 22 bottom: 24 left: 22 type: object properties: top: type: number minimum: 0 maximum: 100 right: type: number minimum: 0 maximum: 100 bottom: type: number minimum: 0 maximum: 100 left: type: number minimum: 0 maximum: 100 required: - top - right - bottom - left additionalProperties: false doubleSided: default: false type: boolean required: - size - margins - doubleSided additionalProperties: false colours: type: object properties: primary: type: string pattern: ^#[0-9a-f]{6}$ accent: type: string pattern: ^#[0-9a-f]{6}$ text: type: string pattern: ^#[0-9a-f]{6}$ required: - primary - accent - text additionalProperties: false fonts: default: embeddingAllowed: false type: object properties: body: type: object properties: family: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ regular: type: string pattern: ^sha256:[a-f0-9]{64}$ bold: type: string pattern: ^sha256:[a-f0-9]{64}$ italic: type: string pattern: ^sha256:[a-f0-9]{64}$ boldItalic: type: string pattern: ^sha256:[a-f0-9]{64}$ required: - family - regular additionalProperties: false heading: type: object properties: family: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ regular: type: string pattern: ^sha256:[a-f0-9]{64}$ bold: type: string pattern: ^sha256:[a-f0-9]{64}$ italic: type: string pattern: ^sha256:[a-f0-9]{64}$ boldItalic: type: string pattern: ^sha256:[a-f0-9]{64}$ required: - family - regular additionalProperties: false embeddingAllowed: default: false type: boolean required: - embeddingAllowed additionalProperties: false logo: type: object properties: light: type: string pattern: ^sha256:[a-f0-9]{64}$ dark: type: string pattern: ^sha256:[a-f0-9]{64}$ required: - light additionalProperties: false titlePage: default: fields: - title - variant - language - release - date type: object properties: fields: type: array items: type: string enum: - title - subtitle - product - variant - product-version - language - release - date - document-number - revision-number - audience required: - fields additionalProperties: false regions: default: {} type: object additionalProperties: anyOf: - minItems: 1 maxItems: 50 type: array items: $ref: "#/components/schemas/Block" - type: object additionalProperties: minItems: 1 maxItems: 50 type: array items: $ref: "#/components/schemas/Block" translations: type: object additionalProperties: type: object properties: sourceCommit: type: string pattern: ^(?:[0-9a-f]{40}|[0-9a-f]{64})$ blocks: type: object additionalProperties: type: string pattern: ^[0-9a-f]{64}$ required: - sourceCommit - blocks additionalProperties: false coverImage: type: object properties: default: type: object properties: asset: type: string pattern: ^sha256:[a-f0-9]{64}$ alt: anyOf: - type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ required: - asset additionalProperties: false variants: default: [] maxItems: 100 type: array items: type: object properties: asset: type: string pattern: ^sha256:[a-f0-9]{64}$ alt: anyOf: - type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ when: $ref: "#/components/schemas/Condition" required: - asset - when additionalProperties: false required: - variants additionalProperties: false backPage: type: object properties: position: default: last type: string enum: - last - inside-cover copyright: anyOf: - type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ - type: object additionalProperties: type: string minLength: 1 pattern: ^\S(?:[^\n\r]*\S)?$ documentNumber: default: true type: boolean date: default: true type: boolean required: - position - documentNumber - date additionalProperties: false header: default: default: left: - type: placeholder key: title right: - type: placeholder key: variant type: object properties: default: type: object properties: left: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" centre: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" right: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" additionalProperties: false first: type: object properties: left: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" centre: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" right: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" additionalProperties: false even: type: object properties: left: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" centre: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" right: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" additionalProperties: false required: - default additionalProperties: false footer: default: default: left: - type: placeholder key: language right: - type: placeholder key: page type: object properties: default: type: object properties: left: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" centre: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" right: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" additionalProperties: false first: type: object properties: left: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" centre: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" right: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" additionalProperties: false even: type: object properties: left: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" centre: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" right: anyOf: - minItems: 1 type: array items: $ref: "#/components/schemas/Inline" - type: object additionalProperties: minItems: 1 type: array items: $ref: "#/components/schemas/Inline" additionalProperties: false required: - default additionalProperties: false headings: default: numbering: - decimal sizes: - 3xl - 2xl - xl - base colour: text pageBreakBeforeLevel1: true type: object properties: numbering: default: - decimal minItems: 1 maxItems: 6 type: array items: type: string enum: - decimal - none sizes: default: - 3xl - 2xl - xl - base minItems: 1 maxItems: 6 type: array items: type: string enum: - base - lg - xl - 2xl - 3xl colour: default: text type: string enum: - text - primary - accent pageBreakBeforeLevel1: default: true type: boolean required: - numbering - sizes - colour - pageBreakBeforeLevel1 additionalProperties: false body: default: fontSize: 10 lineHeight: 1.45 paragraphSpacing: 7 columns: 1 type: object properties: fontSize: default: 10 type: number minimum: 6 maximum: 24 lineHeight: default: 1.45 type: number minimum: 1 maximum: 3 paragraphSpacing: default: 7 type: number minimum: 0 maximum: 36 columns: default: 1 anyOf: - type: number enum: - 1 - type: number enum: - 2 required: - fontSize - lineHeight - paragraphSpacing - columns additionalProperties: false tables: default: headerTint: true borders: horizontal zebra: false type: object properties: headerTint: default: true type: boolean borders: default: horizontal type: string enum: - none - horizontal - grid zebra: default: false type: boolean required: - headerTint - borders - zebra additionalProperties: false steps: default: marker: filled-circle type: object properties: marker: default: filled-circle type: string enum: - filled-circle - number required: - marker additionalProperties: false notes: default: style: tinted type: object properties: style: default: tinted type: string enum: - tinted - framed required: - style additionalProperties: false safety: default: standard: ansi-z535 type: object properties: standard: default: ansi-z535 type: string enum: - ansi-z535 - iso-3864 required: - standard additionalProperties: false required: - schemaVersion - name - preset - page - colours - fonts - titlePage - regions - header - footer - headings - body - tables - steps - notes - safety additionalProperties: false meta: type: object properties: issues: type: array items: $ref: "#/components/schemas/PageDesignIssue" description: Problems found checking it against the configuration (a placeholder, language or variant attribute it does not know, too little contrast, fonts not confirmed for embedding, …). The list leaves out its assets; `GET /page-designs/:designId` checks them against the blob store (and the older `assets/` layout) too. required: - issues additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is the design’s ID, its file name (`design/.yaml`); a manual names it in `design`, the configuration as `pdf.design` for every manual naming none." PageDesignIssue: type: object properties: severity: type: string enum: - error - warning code: type: string description: Stable machine-readable code, e.g. `low-contrast`, `unknown-placeholder`, `missing-asset`. message: type: string at: description: Where in the design, as a dotted path (`regions.footer.en`, `colours.primary`); absent for the design as a whole. type: string block: description: The block of a region’s text the problem is in, by ID. type: string required: - severity - code - message additionalProperties: false UnreadablePageDesignResource: type: object properties: type: type: string enum: - PageDesign id: type: string attributes: type: object properties: {} additionalProperties: false meta: type: object properties: error: type: string description: Why it cannot be read. required: - error additionalProperties: false required: - type - id - attributes - meta additionalProperties: false PageDesignDocument: type: object properties: data: $ref: "#/components/schemas/PageDesignResource" required: - data additionalProperties: false PageDesignTemplatePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/PageDesignTemplateResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false PageDesignTemplateResource: type: object properties: type: type: string enum: - PageDesignTemplate id: type: string attributes: type: object properties: path: type: string description: Its entry file in the content repository, `templates//manual.typ`. required: - path additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is the template’s folder name, what a page design names as its `template`." PageDesignTemplateFilePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/PageDesignTemplateFileResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" folder: type: object properties: files: type: integer minimum: 0 maximum: 9007199254740991 description: The files the folder holds. bytes: type: integer minimum: 0 maximum: 9007199254740991 description: Their size together, in bytes. maxFiles: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The most files a template’s folder may hold (`MAX_TEMPLATE_FILES`). maxBytes: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The most bytes a template’s files may hold together (`MAX_TEMPLATE_BYTES`). pastCaps: type: boolean description: "Whether the folder is past either cap: then it is not compiled (its preview and PDFs are 422 `template-error`), and a save that adds to it is 422 `template-too-large`." required: - files - bytes - maxFiles - maxBytes - pastCaps additionalProperties: false description: The whole folder against its caps (#803), every page’s files counted; read with `workingCopy=true`, each draft at its length in place of its file, and every draft listed, also past the caps. required: - page - folder additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false PageDesignTemplateFileResource: type: object properties: type: type: string enum: - PageDesignTemplateFile id: type: string attributes: type: object properties: path: type: string description: Its path in the template’s folder (`manual.typ`, `parts/notice.typ`); in the content repository `templates//`. size: type: integer minimum: 0 maximum: 9007199254740991 description: Its size in bytes. text: type: boolean description: Whether it is a text file the template screen edits (`.typ`, `.yaml`, `.yml`, `.json`, `.toml`, `.csv`, `.txt`, `.xml`, `.svg`, `.bib`); an image or font is only listed. required: - path - size - text additionalProperties: false meta: type: object properties: draft: type: boolean description: "Read with `workingCopy=true`: whether the change set’s working copy stands in for it (a file only a working copy holds is listed too). Otherwise false." committed: type: boolean description: Whether the commit read has the file; false for one only a working copy holds (deleting it drops the working copy). required: - draft - committed additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is the file’s path in the template’s folder." PageDesignTemplateFileTextDocument: type: object properties: data: $ref: "#/components/schemas/PageDesignTemplateFileTextResource" required: - data additionalProperties: false PageDesignTemplateFileTextResource: type: object properties: type: type: string enum: - PageDesignTemplateFileText id: type: string attributes: type: object properties: path: type: string description: Its path in the template’s folder. text: type: string description: The file’s text (UTF-8). required: - path - text additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is the file’s path in the template’s folder." PageDesignTemplateFileTextPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/PageDesignTemplateFileTextResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false VariantAttributePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/VariantAttributeResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false VariantAttributeResource: type: object properties: type: type: string enum: - VariantAttribute id: type: string attributes: oneOf: - type: object properties: kind: type: string enum: - enum label: anyOf: - type: string - type: object additionalProperties: type: string description: "As configured: one text for every language, or one per language tag (the source language’s among them; a language without its own takes it)." values: type: array items: $ref: "#/components/schemas/VariantValue" description: The values a variant may take, in the configured order. required: - kind - label - values additionalProperties: false - type: object properties: kind: type: string enum: - version description: A dotted version, compared numerically (`2.10 > 2.9`). label: anyOf: - type: string - type: object additionalProperties: type: string description: "As configured: one text for every language, or one per language tag (the source language’s among them; a language without its own takes it)." required: - kind - label additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is the attribute’s ID, as conditions name it (`model in (large)`)." VariantValue: type: object properties: id: type: string label: anyOf: - type: string - type: object additionalProperties: type: string description: "As configured: one text for every language, or one per language tag (the source language’s among them; a language without its own takes it)." archived: description: "Archived: still valid where content uses it, but no longer offered for new content (a picker hides it). Left out for a value that is not archived." type: boolean enum: - true required: - id - label additionalProperties: false VariantBuildPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/VariantBuildResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false VariantBuildResource: type: object properties: type: type: string enum: - VariantBuild id: type: string attributes: type: object properties: values: type: object additionalProperties: type: string description: 'Variant attribute ID → value, e.g. `{ "model": "large" }`.' required: - values additionalProperties: false relationships: type: object properties: manual: type: object properties: data: type: object properties: type: type: string enum: - Manual id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - manual additionalProperties: false meta: type: object properties: slug: type: string description: Use in `/manuals/{id}/variants/{variant}/…`, e.g. `model=large`. label: type: string description: For people, e.g. "Large · Software 2.3". manualTitle: type: string required: - slug - label - manualTitle additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: A manual in one of the variant combinations its manifest lists. `id` is `/`. VariantUsePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/VariantUseResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false VariantUseResource: type: object properties: type: type: string enum: - VariantUse id: type: string attributes: oneOf: - type: object properties: kind: type: string enum: - manual description: "A manual: its variant combinations, or a condition of an entry or a text attribute, name it." manualId: type: string title: type: string required: - kind - manualId - title additionalProperties: false - type: object properties: kind: type: string enum: - module description: "A module: a variant block names it, in `languages`." moduleId: type: string title: type: string description: The title of its source-language file, else of its first file. languages: type: array items: type: string description: The languages whose files name it, in code-unit order. required: - kind - moduleId - title - languages additionalProperties: false required: - type - id - attributes additionalProperties: false description: A manual or module naming a variant attribute or value. `id` is `manual/` or `module/`. NotificationPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/NotificationResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" unreadCount: type: integer minimum: 0 maximum: 9007199254740991 description: How many of your notifications are unread, whatever the filter. required: - page - unreadCount additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false NotificationResource: type: object properties: type: type: string enum: - Notification id: type: string attributes: $ref: "#/components/schemas/NotificationAttributes" required: - type - id - attributes additionalProperties: false NotificationAttributes: type: object properties: kind: type: string enum: - change-set.submit - change-set.return - change-set.approve - change-set.sign-off - change-set.merge - lock.break - translation.imported - translation.import-failed - release.published - release.output-failed - release.output-recovered - backup.failed - backup.overdue description: "What happened: the event’s topic. `change-set.submit` (a change set to review), `change-set.return`, `change-set.approve`, `change-set.sign-off`, `change-set.merge` (your change set), `lock.break` (your locks were broken), `translation.imported`, `translation.import-failed` (your import), `release.output-failed`, `release.output-recovered` (a file told failed is ready after all), `release.published` (a major release of a manual you read)." subject: type: object properties: type: type: string enum: - change-set - release - import - backup id: type: string required: - type - id additionalProperties: false description: 'What it opens: `{ type: "change-set" | "release" | "import", id }`.' payload: type: object additionalProperties: {} description: "What a client builds its sentence from, by kind: IDs, a change set’s `title`, `by` (who did it: `{ kind, id }`), `state` (where a change set went), `reason`, `count` and `subjects` (broken locks), `manualIds`, `level`. Never text written for people on the server." createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: When the event happened. readAt: nullable: true description: When you marked it read; null while unread. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - kind - subject - payload - createdAt - readAt additionalProperties: false UnreadCountDocument: type: object properties: meta: type: object properties: unreadCount: type: integer minimum: 0 maximum: 9007199254740991 description: How many of your notifications are unread, whatever the filter. latest: nullable: true description: Your newest notification’s ID, read or not; null when there is none. It changes when one arrives. type: string required: - unreadCount - latest additionalProperties: false required: - meta additionalProperties: false NotificationDocument: type: object properties: data: $ref: "#/components/schemas/NotificationResource" required: - data additionalProperties: false MarkReadDocument: type: object properties: meta: anyOf: - type: object properties: ids: minItems: 1 maxItems: 200 type: array items: type: string pattern: ^[1-9][0-9]{0,14}$ description: Your notifications to mark read, 1 to 200 IDs. Any that is not yours (or none at all) is 404, and nothing is marked. required: - ids additionalProperties: false - type: object properties: all: type: boolean enum: - true description: Mark all of your notifications read. required: - all additionalProperties: false required: - meta additionalProperties: false MarkReadResultDocument: type: object properties: meta: type: object properties: marked: type: integer minimum: 0 maximum: 9007199254740991 description: How many were unread and are now read. unreadCount: type: integer minimum: 0 maximum: 9007199254740991 description: How many of your notifications are unread, whatever the filter. required: - marked - unreadCount additionalProperties: false required: - meta additionalProperties: false OutboxStatusDocument: type: object properties: data: $ref: "#/components/schemas/OutboxStatusResource" required: - data additionalProperties: false OutboxStatusResource: type: object properties: type: type: string enum: - OutboxStatus id: type: string attributes: type: object properties: blockedConsumers: maxItems: 100 type: array items: type: string description: 'The outbox consumers held after a restore onto another database server, by name (`notifications`, `webhooks`, `change-feed`): they deliver nothing until the operator runs the recipe in `backend/api/README.md`, "Outbox", "After a restore". Empty when all read on.' required: - blockedConsumers additionalProperties: false meta: type: object properties: level: type: string enum: - ok - error description: "`error` when any consumer is held." required: - level additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "`id` is always `outbox`." PreferencesDocument: type: object properties: data: $ref: "#/components/schemas/PreferencesResource" required: - data additionalProperties: false PreferencesResource: type: object properties: type: type: string enum: - Preferences id: type: string attributes: type: object properties: showTips: type: boolean description: Whether the editor shows tips and the first-run tour ("Show tips" in the account menu). `true` by default. dismissedTips: maxItems: 500 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:[.-][a-z0-9]+)*$ description: 'The tips you have seen and closed, by ID: never shown again. At most 500; a change replaces the whole list (each ID kept once). Empty by default; "Reset tips" empties it.' tourDone: type: boolean description: Whether you finished or skipped the first-run tour; `false` brings it back. `false` by default. required: - showTips - dismissedTips - tourDone additionalProperties: false meta: type: object properties: updatedAt: nullable: true description: "When they last changed; null: never (the defaults)." type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - updatedAt additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "Your own preferences: the editor’s tips and first-run tour. `id` is your user ID (`service` for a service, which has the defaults and changes none)." UpdatePreferencesDocument: type: object properties: data: type: object properties: type: type: string enum: - Preferences id: description: Your user ID, if given; another is refused. type: string attributes: type: object properties: showTips: type: boolean description: Whether the editor shows tips and the first-run tour ("Show tips" in the account menu). `true` by default. dismissedTips: maxItems: 500 type: array items: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:[.-][a-z0-9]+)*$ description: 'The tips you have seen and closed, by ID: never shown again. At most 500; a change replaces the whole list (each ID kept once). Empty by default; "Reset tips" empties it.' tourDone: type: boolean description: Whether you finished or skipped the first-run tour; `false` brings it back. `false` by default. additionalProperties: false description: The preferences to change; left out stays. required: - type - attributes additionalProperties: false required: - data additionalProperties: false IirdsPackagePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/IirdsPackageResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false IirdsPackageResource: type: object properties: type: type: string enum: - IirdsPackage id: type: string attributes: type: object properties: manual: type: string description: The manual’s ID. variant: type: string description: The variant’s slug, e.g. `model=large` (the manifest’s). lang: type: string description: The language, a language tag. fileName: type: string description: "The name it downloads as: `___.iirds`." pdf: type: boolean description: "Whether it holds the manual’s PDF as a rendition of its document: once the release output is `done`." required: - manual - variant - lang - fileName - pdf additionalProperties: false links: type: object properties: self: type: string file: type: string description: The package itself (`GET …/file`). required: - self - file additionalProperties: false required: - type - id - attributes - links additionalProperties: false description: "The iiRDS package of one release output (its `id` is the output’s): the manual in one variant and language, made at the release’s tag as the manual’s audience reads it." IirdsPackageDocument: type: object properties: data: type: object properties: type: type: string enum: - IirdsPackage id: type: string attributes: type: object properties: manual: type: string description: The manual’s ID. variant: type: string description: The variant’s slug, e.g. `model=large` (the manifest’s). lang: type: string description: The language, a language tag. fileName: type: string description: "The name it downloads as: `___.iirds`." pdf: type: boolean description: "Whether it holds the manual’s PDF as a rendition of its document: once the release output is `done`." required: - manual - variant - lang - fileName - pdf additionalProperties: false links: type: object properties: self: type: string file: type: string description: The package itself (`GET …/file`). required: - self - file additionalProperties: false meta: type: object properties: size: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The package’s size in bytes. topics: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: How many topics (the manual’s modules, as HTML) it holds. media: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: How many media files (images, attached files, safety symbols) it holds. warnings: type: array items: $ref: "#/components/schemas/IirdsWarning" description: What it left out or could not map, each once. Bounded by the configuration and the manual (at most one per module type, audience, facet value, variant attribute and file). required: - size - topics - media - warnings additionalProperties: false required: - type - id - attributes - links - meta additionalProperties: false description: "The iiRDS package, made: its size, what it holds and its warnings." required: - data additionalProperties: false IirdsWarning: type: object properties: code: type: string enum: - unmapped-module-type - unmapped-audience - unmapped-facet - unmapped-variant-attribute - unmapped-lifecycle-phase - missing-asset - pdf-not-included - manual-empty description: "Stable. `unmapped-*`: the configuration’s mapping (`iirds` in `openfolia.yaml`) names no iiRDS class for something the package holds, so that metadata is left out; `missing-asset`: a file a module refers to is not stored; `pdf-not-included`: the PDF is not done; `manual-empty`: the manual holds no module its audience reads in this variant, so the package holds its document alone, with no topic and no table of contents." id: type: string description: "What it is about: the module type, audience, facet, variant attribute, `/`, asset (`sha256:…`) or output." detail: type: string required: - code - id - detail additionalProperties: false DownloadPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/DownloadResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false DownloadResource: type: object properties: type: type: string enum: - Download id: type: string attributes: type: object properties: kind: type: string enum: - attachment - manual description: "`attachment`: a file attached in a module (an attachment block); `manual`: a manual’s PDF in one variant and language." product: type: string description: The product (a value of the product facet) it is a file of. lang: type: string description: Its language, a language tag. name: type: string description: The attachment’s name (its link text), or the manual’s title. description: nullable: true description: What the attachment is for; null for none and for a manual. type: string sha256: type: string description: "The file’s SHA-256, hex: its checksum, and the blob store’s key." size: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The file’s size in bytes. mediaType: type: string description: The file’s media type, e.g. `application/pdf`. fileName: type: string description: "The name it downloads as: an attachment’s `fileName`, a PDF’s `___.pdf`." moduleId: nullable: true description: The module it is attached in; null for a manual. type: string blockId: nullable: true description: The attachment block’s ID in that module; null for a manual. type: string manualId: nullable: true description: The manual; null for an attachment. type: string variant: nullable: true description: The manual’s variant, its slug (e.g. `model=large`); null for an attachment. type: string release: description: The product’s latest release (the newest that stands, cut from `main`), which holds this file. allOf: - $ref: "#/components/schemas/DownloadRelease" required: - kind - product - lang - name - description - sha256 - size - mediaType - fileName - moduleId - blockId - manualId - variant - release additionalProperties: false meta: type: object properties: moduleTitle: nullable: true description: The title of the module it is attached in; null for a manual. type: string required: - moduleTitle additionalProperties: false links: type: object properties: versions: type: string description: Its versions across the product’s releases (`GET …/versions`). file: type: string description: The file at the latest release (`GET …/versions/{releaseId}/file`). required: - versions - file additionalProperties: false required: - type - id - attributes - meta - links additionalProperties: false description: "A downloadable file of a product (#139): an attachment block of a module for the product (module, block and language), or a manual’s PDF (manual, variant and language), as the product’s latest release holds it. Its ID stays across releases, so its versions share it." DownloadRelease: type: object properties: id: type: string description: The release’s ID (`GET /releases/{releaseId}`). tag: type: string description: "The release’s tag: content as released, `?ref=`." revision: type: string description: The product revision, e.g. `2.1`. publishedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: When the release was cut. required: - id - tag - revision - publishedAt additionalProperties: false DownloadVersionPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/DownloadVersionResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" truncated: type: boolean description: "The product has more releases than are looked through (the 500 newest): older versions are not listed." required: - page - truncated additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false DownloadVersionResource: type: object properties: type: type: string enum: - DownloadVersion id: type: string attributes: type: object properties: state: type: string enum: - current - superseded - withdrawn description: "`current`: the file the product’s latest release holds; `superseded`: a later file took its place; `withdrawn`: every release that held it is withdrawn." sha256: type: string description: "The file’s SHA-256, hex: its checksum, and the blob store’s key." size: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The file’s size in bytes. mediaType: type: string description: The file’s media type, e.g. `application/pdf`. fileName: type: string description: "The name it downloads as: an attachment’s `fileName`, a PDF’s `___.pdf`." release: description: The release in which the file changed to this one (its first). allOf: - $ref: "#/components/schemas/DownloadRelease" changeNote: type: object properties: notes: nullable: true description: The notes of that release, in the download’s language when it has them (else its notes); null for none. type: string description: nullable: true description: The attachment’s description at that release; null for none and for a manual. type: string required: - notes - description additionalProperties: false description: "What changed: the release notes, and the attachment’s description." required: - state - sha256 - size - mediaType - fileName - release - changeNote additionalProperties: false links: type: object properties: file: type: string description: This version’s file (`GET …/versions/{releaseId}/file`). required: - file additionalProperties: false required: - type - id - attributes - links additionalProperties: false description: "One version of a download: its file from the release it first appeared in, listed only where the file’s hash differs from the version before." DitaPackagePageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/DitaPackageResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false DitaPackageResource: type: object properties: type: type: string enum: - DitaPackage id: type: string attributes: type: object properties: manual: type: string description: The manual’s ID. variant: type: string description: "The variant’s slug, e.g. `model=large` (the manifest’s): the one its DITAVAL file filters for." lang: type: string description: The output’s language, a language tag. fileName: type: string description: "The name it downloads as: `___-dita.zip` (`all` for the language with `languages=all`)." required: - manual - variant - lang - fileName additionalProperties: false links: type: object properties: self: type: string file: type: string description: The package itself (`GET …/file`). required: - self - file additionalProperties: false required: - type - id - attributes - links additionalProperties: false description: "The DITA 1.3 package of one release output (its `id` is the output’s): the manual as a map and topics, made at the release’s tag as the manual’s audience reads it, with a DITAVAL file for the output’s variant." DitaPackageDocument: type: object properties: data: type: object properties: type: type: string enum: - DitaPackage id: type: string attributes: type: object properties: manual: type: string description: The manual’s ID. variant: type: string description: "The variant’s slug, e.g. `model=large` (the manifest’s): the one its DITAVAL file filters for." lang: type: string description: The output’s language, a language tag. fileName: type: string description: "The name it downloads as: `___-dita.zip` (`all` for the language with `languages=all`)." required: - manual - variant - lang - fileName additionalProperties: false links: type: object properties: self: type: string file: type: string description: The package itself (`GET …/file`). required: - self - file additionalProperties: false meta: type: object properties: size: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The package’s size in bytes. languages: type: array items: type: string description: The languages it holds, each a folder of the package. references: type: string enum: - conref - resolved description: How module references are written (`references`). topics: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: How many topics it holds (each module once per language). media: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: How many media files (images, attached files, safety symbols) it holds. warnings: type: array items: $ref: "#/components/schemas/DitaExportWarning" description: What the export wrote in another form or left out, once per code, module and language (at most 1000). warningsDropped: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: How many warnings past the first 1000 are not listed. required: - size - languages - references - topics - media - warnings - warningsDropped additionalProperties: false required: - type - id - attributes - links - meta additionalProperties: false description: "The DITA package, made: its size, what it holds and its warnings." required: - data additionalProperties: false DitaExportWarning: type: object properties: code: type: string enum: - module-not-exported - missing-translation - missing-asset - missing-symbol - module-reference-cycle - xref-outside - topic-type - procedure-as-list - procedure-title - procedures-merged - id-renamed - section-flattened - nested-note - nested-table - safety-as-note - table-layout - line-break - faq - attachment - passthrough - keyboard - module-reference-resolved - condition-shipped - condition-approximated - text-attribute-variants - image-size - callouts - term-link - metadata - page-break description: "Stable: what the export could not say in DITA, wrote in another form, or left out (`docs/dita-export.md` lists each)." module: description: The module (or the manual) it is about. type: string block: description: The block it is about, in it. type: string lang: description: The language folder it is about. type: string detail: type: string count: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: How many times it came up in that module and language. required: - code - detail - count additionalProperties: false StyleReviewStatusDocument: type: object properties: data: $ref: "#/components/schemas/StyleReviewStatusResource" required: - data additionalProperties: false StyleReviewStatusResource: type: object properties: type: type: string enum: - StyleReviewStatus id: type: string attributes: type: object properties: configured: type: boolean description: "Whether a model endpoint is set up (`CCMS_STYLE_REVIEW_URL` and `CCMS_STYLE_REVIEW_MODEL`): false means a review answers 404 `not-configured`." required: - configured additionalProperties: false required: - type - id - attributes additionalProperties: false description: "`id` is always `style-review`." StyleReviewRequestDocument: type: object properties: {} additionalProperties: false StyleReviewDocument: type: object properties: data: type: object properties: type: type: string enum: - StyleReview id: type: string attributes: type: object properties: lang: type: string moduleId: type: string suggestions: maxItems: 200 type: array items: $ref: "#/components/schemas/StyleSuggestion" description: "In document order, at most 200: one answer, not a list resource, since nothing is stored to page through." required: - lang - moduleId - suggestions additionalProperties: false meta: type: object properties: version: type: integer minimum: 0 maximum: 9007199254740991 description: The working copy’s version reviewed; 0 when it was the committed file. Ranges refer to that text. baseCommit: type: string description: The commit the reviewed content is based on. dropped: type: integer minimum: 0 maximum: 9007199254740991 description: How many of the model’s proposals did not fit the module’s text (or came past the limit) and were left out. required: - version - baseCommit - dropped additionalProperties: false required: - type - id - attributes - meta additionalProperties: false required: - data additionalProperties: false StyleSuggestion: type: object properties: id: type: string description: A hash of what makes it this suggestion, stable for the same text and answer. blockId: type: string description: The block, list item, procedure step or image callout, by its ID. field: type: string enum: - title - content - alt - hazard - question - name - description - legend description: "Which part of the block: `content` (a paragraph, list item or step), `title`, `alt`, `hazard`, `question` (an FAQ entry’s), `name`, `description`, `legend` (an image callout’s)." range: type: object properties: start: type: integer minimum: 0 maximum: 9007199254740991 end: type: integer minimum: 1 maximum: 9007199254740991 required: - start - end additionalProperties: false description: "What to change: UTF-16 code units of the part’s plain text (`plainTextOf` in `@openfolia/content-model`), `start` inclusive, `end` exclusive; never empty, never touching an inline node (an attribute, a cross-reference, keys, a line break)." original: type: string description: The text the range covers. message: type: string description: Why, as the model put it (advisory; at most 1,000 characters). replacement: nullable: true description: The text to put in place of `original` (one line, at most 2,000 characters); null for a remark without a fix. type: string rule: type: string enum: - model description: "Where it comes from: `model`, the model-based review." required: - id - blockId - field - range - original - message - replacement - rule additionalProperties: false ImporterPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/ImporterResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false ImporterResource: type: object properties: type: type: string enum: - Importer id: type: string attributes: type: object properties: label: type: string description: For people choosing one. description: type: string required: - label - description additionalProperties: false meta: type: object properties: optionsSchema: type: object additionalProperties: {} description: The options it takes (`options` in the upload form), as JSON Schema, for a screen to render. maxBytes: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The largest upload it takes, in bytes (`CCMS_IMPORT_MAX_BYTES`), for a screen to state and to check before uploading. required: - optionsSchema - maxBytes additionalProperties: false required: - type - id - attributes - meta additionalProperties: false ImportDocument: type: object properties: data: $ref: "#/components/schemas/ImportResource" required: - data additionalProperties: false ImportResource: type: object properties: type: type: string enum: - Import id: type: string attributes: type: object properties: importer: type: string description: The importer’s ID. options: type: object additionalProperties: {} updateExisting: type: boolean baseRef: type: string description: The branch it was checked against and goes into. baseCommit: type: string description: That branch’s commit when checked. fileName: nullable: true type: string size: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: The upload’s size in bytes. state: type: string enum: - dry-run - validated - applying - applied - failed description: "`dry-run` (never stored), `validated` (stored; can be applied until `expiresAt`), `applying` (its job runs), `applied` or `failed`." createdBy: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ expiresAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: When a stored import is removed with its upload, unless it is being applied. startedAt: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ finishedAt: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - importer - options - updateExisting - baseRef - baseCommit - fileName - size - state - createdBy - createdAt - expiresAt - startedAt - finishedAt additionalProperties: false relationships: description: The change set it writes into, once its job made it. type: object properties: changeSet: type: object properties: data: type: object properties: type: type: string enum: - ChangeSet id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - changeSet additionalProperties: false meta: type: object properties: dryRun: type: boolean report: $ref: "#/components/schemas/ImportReport" progress: $ref: "#/components/schemas/ImportProgress" failure: nullable: true description: Why its job failed. type: object properties: code: type: string detail: type: string required: - code - detail additionalProperties: false required: - dryRun - report - progress - failure additionalProperties: false required: - type - id - attributes - meta additionalProperties: false ImportReport: type: object properties: valid: type: boolean description: The validator found no error. applicable: type: boolean description: "It can be applied: valid, nothing refused, within one change set’s limits, and something to write." applicableWithoutRefused: type: boolean description: "It can be applied with `skipRefused` (`POST /imports/:importId/apply`): `applicable`, or the bundle without its refused items, checked again in full, decides every other item exactly as this report does and is applicable itself. False when something else needs a refused item (a manual names a refused module, a module uses a refused file), when the bundle as a whole has an error, or when nothing would be written." formatVersion: type: integer minimum: -9007199254740991 maximum: 9007199254740991 source: type: object properties: system: type: string minLength: 1 maxLength: 200 pattern: ^\S(?:[^\n\r]*\S)?$ exportedAt: type: string minLength: 1 maxLength: 200 pattern: ^\S(?:[^\n\r]*\S)?$ description: type: string minLength: 1 maxLength: 1000 pattern: ^\S(?:[^\n\r]*\S)?$ required: - system additionalProperties: false issues: type: array items: $ref: "#/components/schemas/ImportReportIssue" description: Findings about the bundle as a whole (at most 200). items: type: array items: $ref: "#/components/schemas/ImportReportItem" description: Modules and manuals in document order, then the files. converterReport: type: array items: type: object properties: sourceId: type: string minLength: 1 maxLength: 500 pattern: ^\S(?:[^\n\r]*\S)?$ sourceKind: type: string minLength: 1 maxLength: 100 pattern: ^\S(?:[^\n\r]*\S)?$ message: type: string minLength: 1 maxLength: 4000 module: type: string maxLength: 100 pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$ block: type: string maxLength: 64 pattern: ^[a-z_][a-z0-9_-]*$ required: - sourceId - message additionalProperties: false description: The converter’s own report of what it could not map, passed through (at most 1,000 entries). counts: type: object properties: modules: type: integer minimum: -9007199254740991 maximum: 9007199254740991 manuals: type: integer minimum: -9007199254740991 maximum: 9007199254740991 assets: type: integer minimum: -9007199254740991 maximum: 9007199254740991 create: type: integer minimum: -9007199254740991 maximum: 9007199254740991 update: type: integer minimum: -9007199254740991 maximum: 9007199254740991 skip: type: integer minimum: -9007199254740991 maximum: 9007199254740991 refuse: type: integer minimum: -9007199254740991 maximum: 9007199254740991 passthrough: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: "`passthrough` blocks in all modules." errors: type: integer minimum: -9007199254740991 maximum: 9007199254740991 warnings: type: integer minimum: -9007199254740991 maximum: 9007199254740991 converterReport: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Entries in the converter’s report. required: - modules - manuals - assets - create - update - skip - refuse - passthrough - errors - warnings - converterReport additionalProperties: false required: - valid - applicable - applicableWithoutRefused - issues - items - converterReport - counts additionalProperties: false ImportReportIssue: type: object properties: severity: type: string enum: - error - warning - info code: type: string description: 'Stable: the validator’s codes (`@openfolia/content-model`, "Import format") and the import’s own (`outside-scope`, `exists`, `unused`, `unsupported-image-type`, `unsupported-attachment-type`, `too-large`, `too-many-subjects`, `too-many-files`, `nothing-to-import`).' message: type: string pointer: description: Where in `import.json`, as a JSON Pointer. type: string at: description: The block it is about, by ID. type: string required: - severity - code - message additionalProperties: false ImportReportItem: type: object properties: kind: type: string enum: - module - manual - asset id: type: string description: The module’s or manual’s ID, or the file’s `sha256:`. lang: type: string pointer: type: string description: "Where it is: in `import.json` (`/modules/0`) or the archive (`assets/`)." sourceId: description: "A module’s `meta.source.id`: its ID in the source system." type: string action: type: string enum: - create - update - skip - refuse description: "`create`, `update` (an existing one, only with `updateExisting`), `skip` (exists already, or a file no written module uses) or `refuse`." reasons: type: array items: $ref: "#/components/schemas/ImportReportIssue" description: Why it is skipped or refused (for `refuse`, its errors). An import applied with `skipRefused` leaves exactly its `refuse` items out, for these reasons. issues: type: array items: $ref: "#/components/schemas/ImportReportIssue" description: Its other findings. issueCount: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Its findings in all; at most 20 reasons and 20 others are listed. passthrough: description: "A module’s `passthrough` blocks: content kept verbatim." type: integer minimum: -9007199254740991 maximum: 9007199254740991 size: description: A file’s size in bytes. type: integer minimum: -9007199254740991 maximum: 9007199254740991 usedAs: description: How a file is uploaded into the change set. type: string enum: - image - attachment required: - kind - id - pointer - action - reasons - issues - issueCount additionalProperties: false ImportProgress: type: object properties: phase: type: string enum: - queued - change-set - assets - files - done assets: type: object properties: done: type: integer minimum: -9007199254740991 maximum: 9007199254740991 total: type: integer minimum: -9007199254740991 maximum: 9007199254740991 required: - done - total additionalProperties: false files: type: object properties: done: type: integer minimum: -9007199254740991 maximum: 9007199254740991 total: type: integer minimum: -9007199254740991 maximum: 9007199254740991 required: - done - total additionalProperties: false commits: type: array items: type: string description: Save points written, oldest first. required: - phase - assets - files - commits additionalProperties: false ApplyImportDocument: type: object properties: meta: type: object properties: skipRefused: description: Leave the items the report refuses out and apply the rest (default false). Only when `meta.report.applicableWithoutRefused` holds; what is left out, and why, is listed in the change set’s description and every commit message. type: boolean additionalProperties: false additionalProperties: false WebhookPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/WebhookResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" headerLimits: $ref: "#/components/schemas/WebhookHeaderLimits" required: - page - headerLimits additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false WebhookResource: type: object properties: type: type: string enum: - Webhook id: type: string attributes: type: object properties: url: type: string description: Where deliveries are POSTed (https). description: nullable: true type: string events: type: array items: type: string enum: - manual.released - module.released - module.deprecated - manual.deprecated - release.withdrawn - translation.imported description: The events it is sent, sorted. maxAudience: nullable: true description: "Its audience limit: an audience level of the configuration; it is sent only events about content at that level or a less restricted one (within what its owner may read). Null: whatever its owner may read. A level the configuration does not hold matches nothing." type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ active: type: boolean description: "Whether new events are delivered to it: false while paused (by `PATCH`) or disabled after failing (`disabledReason`)." owner: type: object properties: kind: type: string enum: - user - service id: type: string required: - kind - id additionalProperties: false description: Who made it, or last pointed it at another URL. It is sent only events about content they may read, judged when each event is made; none once they no longer act. headers: type: array items: type: object properties: name: type: string secret: type: boolean value: nullable: true description: The value sent; null for a secret header, whose value is never shown again (replace it, or remove the header). type: string required: - name - secret - value additionalProperties: false description: Custom headers sent with every delivery, in order (an `Authorization` or `X-Api-Key` for a receiver that authenticates requests its own way). createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ updatedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ secretRotatedAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ description: When its current secret was made. required: - url - description - events - maxAudience - active - owner - headers - createdAt - updatedAt - secretRotatedAt additionalProperties: false meta: type: object properties: disabledReason: nullable: true description: "`failing`: turned off after deliveries failed for good several times in a row; `PATCH` `active: true` turns it on again. Null otherwise." type: string enum: - failing disabledAt: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ consecutiveFailures: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Deliveries in a row that failed for good, since the last that succeeded. previousSecretUntil: nullable: true description: Until when the secret before the last rotation still signs deliveries, beside the current one; null when none does. type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ lastDelivery: description: "Its latest delivery (a test event too), without its body: as in its delivery log. Null when it has had none. Only in `GET /webhooks` and `GET /webhooks/{id}`." nullable: true type: object properties: id: type: string event: type: string enum: - manual.released - module.released - module.deprecated - manual.deprecated - release.withdrawn - translation.imported - ping status: type: string enum: - pending - succeeded - failed - skipped attempts: type: integer minimum: -9007199254740991 maximum: 9007199254740991 lastAttemptAt: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ lastStatusCode: nullable: true type: integer minimum: -9007199254740991 maximum: 9007199254740991 lastError: nullable: true type: string enum: - http-status - timeout - connection - blocked-address - blocked-url - secret-unreadable createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - id - event - status - attempts - lastAttemptAt - lastStatusCode - lastError - createdAt additionalProperties: false required: - disabledReason - disabledAt - consecutiveFailures - previousSecretUntil additionalProperties: false required: - type - id - attributes - meta additionalProperties: false description: "A webhook subscriber: a URL sent signed events. Never its secret, which is shown only when it is made or rotated, nor the value of a secret custom header." WebhookHeaderLimits: type: object properties: maxHeaders: type: number enum: - 20 description: The most custom headers a webhook may send. maxHeaderName: type: number enum: - 100 description: The longest header name, in characters. maxHeadersSize: type: number enum: - 8192 description: The most their names and values may add up to, in characters (ASCII only, so bytes too). required: - maxHeaders - maxHeaderName - maxHeadersSize additionalProperties: false description: The limits the custom headers are checked against (`invalid-headers`), so a client can check a form before sending it. WebhookDocument: type: object properties: data: $ref: "#/components/schemas/WebhookResource" required: - data additionalProperties: false CreateWebhookDocument: type: object properties: data: type: object properties: type: type: string enum: - Webhook attributes: type: object properties: url: type: string minLength: 1 maxLength: 2000 description: An absolute `https:` URL (`http:` only where the server allows it for local testing), with no user name, password or fragment, whose host is not a private, loopback or link-local address. Checked again, after resolving the host, on every delivery. events: minItems: 1 maxItems: 20 type: array items: type: string enum: - manual.released - module.released - module.deprecated - manual.deprecated - release.withdrawn - translation.imported description: The events to send it; at least one. description: description: What it is for, 1 to 500 characters; null for none. nullable: true type: string minLength: 1 maxLength: 500 maxAudience: nullable: true description: "Its audience limit: an audience level of the configuration (`GET /config`, `audiences`); events about content above it are not sent. Null: none (whatever its owner may read)." type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ headers: maxItems: 100 type: array items: type: object properties: name: type: string maxLength: 200 description: "An RFC 9110 token, compared without case; not one the server sets or that would break the delivery: `Host`, `Content-Length`, `Content-Type`, `Content-Encoding`, `Transfer-Encoding`, `Connection`, `Keep-Alive`, `TE`, `Trailer`, `Upgrade`, `Expect`, `Cookie`, `User-Agent`, `Idempotency-Key`, `Proxy-*` and `X-Ccms-*`." value: description: "Visible ASCII, spaces and tabs inside (never a line break); leading and trailing white space is dropped. Left out of a secret header that exists already: its stored value stays (not when the URL changes)." type: string maxLength: 10000 secret: description: Stored sealed and never shown again (`value` null in every answer). Default false. type: boolean required: - name additionalProperties: false description: "Custom headers sent with every delivery (all of them: they replace those stored); at most 20, names and values together at most 8,192 characters. A 422 names each problem with its own `code` and `source.pointer`." required: - url - events additionalProperties: false required: - type - attributes additionalProperties: false required: - data additionalProperties: false WebhookWithSecretDocument: type: object properties: data: $ref: "#/components/schemas/WebhookResource" meta: type: object properties: secret: type: string description: "The signing secret (`whsec_` and 64 hex digits). Shown only in this answer: store it now; it cannot be read again." required: - secret additionalProperties: false required: - data - meta additionalProperties: false UpdateWebhookDocument: type: object properties: data: type: object properties: type: type: string enum: - Webhook id: type: string description: The webhook’s ID, as in the path. attributes: type: object properties: url: type: string minLength: 1 maxLength: 2000 description: An absolute `https:` URL (`http:` only where the server allows it for local testing), with no user name, password or fragment, whose host is not a private, loopback or link-local address. Checked again, after resolving the host, on every delivery. events: minItems: 1 maxItems: 20 type: array items: type: string enum: - manual.released - module.released - module.deprecated - manual.deprecated - release.withdrawn - translation.imported description: The events to send it; at least one. description: description: Null removes it. nullable: true type: string minLength: 1 maxLength: 500 maxAudience: nullable: true description: "Its audience limit: an audience level of the configuration (`GET /config`, `audiences`); events about content above it are not sent. Null: none (whatever its owner may read)." type: string maxLength: 64 pattern: ^[a-z][a-z0-9-]*$ headers: maxItems: 100 type: array items: type: object properties: name: type: string maxLength: 200 description: "An RFC 9110 token, compared without case; not one the server sets or that would break the delivery: `Host`, `Content-Length`, `Content-Type`, `Content-Encoding`, `Transfer-Encoding`, `Connection`, `Keep-Alive`, `TE`, `Trailer`, `Upgrade`, `Expect`, `Cookie`, `User-Agent`, `Idempotency-Key`, `Proxy-*` and `X-Ccms-*`." value: description: "Visible ASCII, spaces and tabs inside (never a line break); leading and trailing white space is dropped. Left out of a secret header that exists already: its stored value stays (not when the URL changes)." type: string maxLength: 10000 secret: description: Stored sealed and never shown again (`value` null in every answer). Default false. type: boolean required: - name additionalProperties: false description: "Custom headers sent with every delivery (all of them: they replace those stored); at most 20, names and values together at most 8,192 characters. A 422 names each problem with its own `code` and `source.pointer`." active: description: "`false` pauses it (nothing new is delivered, and waiting deliveries are skipped); `true` resumes it, also after it was disabled for failing (the failures counted start again at 0)." type: boolean additionalProperties: false required: - type - id additionalProperties: false required: - data additionalProperties: false WebhookDeliveryPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/WebhookDeliveryResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" required: - page additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false WebhookDeliveryResource: type: object properties: type: type: string enum: - WebhookDelivery id: type: string attributes: type: object properties: event: type: string enum: - manual.released - module.released - module.deprecated - manual.deprecated - release.withdrawn - translation.imported - ping description: The event sent; `ping` for a test event (`POST /webhooks/{id}/test`). idempotencyKey: type: string description: "Sent as `Idempotency-Key`: the same event always has the same key." payload: nullable: true description: "The JSON body sent (the same on every attempt). Null for a reader who may not see what the owner it was made for may: only that owner, or a reader whose `content.read` restricts nothing (for `translation.imported` also `content.read.draft` and `translation.manage`), sees it." type: object additionalProperties: {} status: type: string enum: - pending - succeeded - failed - skipped description: "`pending` (an attempt follows), `succeeded` (a 2xx answer; never sent again), `failed` (every attempt failed, or the address was refused; `POST …/deliveries/{id}/retry` sends it again), `skipped` (not sent: the subscriber was paused, disabled or no longer subscribed to the event)." attempts: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Attempts made so far, those of every retry by hand too. lastAttemptAt: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ lastStatusCode: nullable: true description: The receiver’s status code at the last attempt, when it answered. type: integer minimum: -9007199254740991 maximum: 9007199254740991 lastError: nullable: true description: "Why the last attempt failed: `http-status` (not 2xx; redirects are not followed), `timeout`, `connection`, `blocked-address` (the host resolved to a non-public address), `blocked-url`, `secret-unreadable` (the server’s key changed)." type: string enum: - http-status - timeout - connection - blocked-address - blocked-url - secret-unreadable deliveredAt: nullable: true type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ sentHeaders: nullable: true description: The names of the headers the last attempt sent (the server’s and the webhook’s custom ones), never their values; null before an attempt sent anything. type: array items: type: string createdAt: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - event - idempotencyKey - payload - status - attempts - lastAttemptAt - lastStatusCode - lastError - deliveredAt - sentHeaders - createdAt additionalProperties: false relationships: type: object properties: webhook: type: object properties: data: type: object properties: type: type: string enum: - Webhook id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - webhook additionalProperties: false required: - type - id - attributes - relationships additionalProperties: false description: One event sent to one subscriber, with its attempts. WebhookDeliveryDocument: type: object properties: data: $ref: "#/components/schemas/WebhookDeliveryResource" required: - data additionalProperties: false StableAddressPageDocument: type: object properties: data: type: array items: $ref: "#/components/schemas/StableAddressResource" meta: type: object properties: page: $ref: "#/components/schemas/PageMeta" access: type: string enum: - public - signed-in - off description: "Who may open the addresses (`delivery.access` on `main`): `public` (anyone, up to `delivery.publicAudience`), `signed-in` (a reader with a token, in their scope) or `off` (nobody: every address is 404)." publicUrl: nullable: true description: "`CCMS_PUBLIC_URL`; null when not set (no URLs, no QR codes)." type: string required: - page - access - publicUrl additionalProperties: false links: $ref: "#/components/schemas/PageLinks" required: - data - meta - links additionalProperties: false StableAddressResource: type: object properties: type: type: string enum: - StableAddress id: type: string attributes: type: object properties: product: type: string description: The release’s product, a value of the product facet. manual: type: string description: The manual’s ID at the release. slug: type: string description: "Its address segment: `delivery.manuals..slug` in `openfolia.yaml` on `main`, else its ID." variant: type: string description: The variant’s slug, e.g. `model=large`. lang: type: string description: The language, a language tag. revision: type: string description: The release’s revision. latest: type: object properties: html: description: The manual as a web page. allOf: - $ref: "#/components/schemas/StableAddressLink" pdf: description: The release’s PDF of it. allOf: - $ref: "#/components/schemas/StableAddressLink" required: - html - pdf additionalProperties: false description: "Always the product’s latest release (the newest of `main` not withdrawn): what to print." pinned: type: object properties: html: description: The manual as a web page. allOf: - $ref: "#/components/schemas/StableAddressLink" pdf: description: The release’s PDF of it. allOf: - $ref: "#/components/schemas/StableAddressLink" required: - html - pdf additionalProperties: false description: This release, for good (`@`). required: - product - manual - slug - variant - lang - revision - latest - pinned additionalProperties: false relationships: type: object properties: release: type: object properties: data: type: object properties: type: type: string enum: - Release id: type: string required: - type - id additionalProperties: false required: - data additionalProperties: false required: - release additionalProperties: false meta: type: object properties: latestRelease: type: boolean description: "The release is its product’s latest: the latest address opens it now." withdrawn: type: boolean description: "The release is withdrawn: its pinned address shows a notice that links the latest." pdfReady: type: boolean description: The PDF is rendered (its output `done`), so `pdf` opens it. required: - latestRelease - withdrawn - pdfReady additionalProperties: false required: - type - id - attributes - relationships - meta additionalProperties: false description: "A manual’s stable addresses in one variant and language (#450): where readers open it, with a QR code at `/qr.svg` and `/qr.png`." StableAddressLink: type: object properties: path: type: string description: From the API’s root, e.g. `/d/north/operating/model=large/en`; behind the editor’s web server, at its root too. url: nullable: true description: The absolute URL readers open (`CCMS_PUBLIC_URL` and `path`), what the QR code holds; null while `CCMS_PUBLIC_URL` is not set. type: string required: - path - url additionalProperties: false security: - bearer: []