{"openapi":"3.1.1","info":{"title":"Yedra API","description":"This is an OpenAPI documentation generated automatically by Yedra.","version":"0.1.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"observabilityToken":{"type":"http","scheme":"bearer"},"auditForwardToken":{"type":"http","scheme":"bearer"},"summitConnection":{"type":"http","scheme":"bearer"}},"schemas":{}},"servers":[],"paths":{"/api/auth/access-token":{"post":{"tags":["Auth"],"summary":"Exchange a sign-in link's token for a session.","description":"Validates a single-use token — either from the CLI access script (IP-based dashboard access) or from an external user's emailed sign-in link — and creates a session.","operationId":"api_auth_access-token_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"additionalProperties":false,"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"}},"additionalProperties":false,"required":["username"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/challenge":{"get":{"tags":["Auth"],"summary":"Get WebAuthn challenge token.","operationId":"api_auth_challenge_get","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"challenge":{"type":"string","description":"Base64-encoded WebAuthn challenge token."}},"additionalProperties":false,"required":["challenge"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/check":{"get":{"tags":["Auth"],"summary":"Check authentication status.","operationId":"api_auth_check_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"isAdmin":{"type":"boolean"},"domain":{"type":"string"},"gravatarHash":{"type":"string"},"isExternal":{"type":"boolean"},"pinnedProjects":{"type":"array","items":{"type":"string"}},"hardwareKey":{"type":"object","properties":{"covered":{"type":"boolean"},"enforced":{"type":"boolean"},"hasKey":{"type":"boolean"}},"additionalProperties":false,"required":["covered","enforced","hasKey"]}},"additionalProperties":false,"required":["username","isAdmin","gravatarHash","isExternal","pinnedProjects"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/login":{"post":{"tags":["Auth"],"summary":"Login with user account.","operationId":"api_auth_login_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webauthnUser":{"type":"string"},"credentialId":{"type":"string"},"authenticatorData":{"type":"string"},"clientDataJson":{"type":"string"},"signature":{"type":"string"}},"additionalProperties":false,"required":["webauthnUser","authenticatorData","clientDataJson","signature"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"wrappedSeed":{"anyOf":[{"type":"string"},{"type":"null"}]},"identityPublicKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"required":["wrappedSeed","identityPublicKey"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/logout":{"post":{"tags":["Auth"],"summary":"Log out of account.","operationId":"api_auth_logout_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/setup":{"post":{"tags":["Auth"],"summary":"Complete user setup.","operationId":"api_auth_setup_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"setupToken":{"type":"string"},"credential":{"type":"object","properties":{"id":{"type":"string","description":"Base64url credential ID."},"clientDataJson":{"type":"string","description":"Base64url clientDataJSON."},"attestationObject":{"type":"string","description":"Base64url attestationObject."}},"additionalProperties":false,"required":["id","clientDataJson","attestationObject"]},"prfSupported":{"type":"boolean"},"wrappedSeed":{"type":"string","description":"Identity seed wrapped under this credential's PRF KEK."},"identityPublicKey":{"type":"string","description":"X-Wing public key established at enrollment."}},"additionalProperties":false,"required":["setupToken","credential"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/setup-token":{"post":{"tags":["Auth"],"summary":"Generate a setup token for passkey registration.","description":"Creates a setup token for the current user and returns a URL to the domain's setup page. Used from the IP dashboard to initiate passkey registration on the real domain.","operationId":"api_auth_setup-token_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"additionalProperties":false,"required":["url"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/step-up":{"get":{"tags":["Auth"],"summary":"Whether this session is currently stepped up.","operationId":"api_auth_step-up_get","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"steppedUp":{"type":"boolean"},"windowSeconds":{"type":"number"}},"additionalProperties":false,"required":["steppedUp","windowSeconds"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Auth"],"summary":"Confirm with a passkey to unlock sensitive actions.","description":"Verifies a fresh WebAuthn assertion (user presence; the PIN or biometric is not required) from one of the signed-in user's own passkeys (challenge from GET /api/auth/challenge) and marks this browser's session as stepped up for a few minutes, by setting a step-up cookie that gated requests must carry alongside the session cookie. Endpoints that reveal secrets, open shells or do destructive admin work refuse with 403 `step_up_required` until this has succeeded.","operationId":"api_auth_step-up_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"credentialId":{"type":"string"},"authenticatorData":{"type":"string"},"clientDataJson":{"type":"string"},"signature":{"type":"string"}},"additionalProperties":false,"required":["authenticatorData","clientDataJson","signature"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"steppedUp":{"type":"boolean"},"windowSeconds":{"type":"number"}},"additionalProperties":false,"required":["steppedUp","windowSeconds"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/domain-move":{"get":{"tags":["Auth"],"summary":"Whether the platform domain is being moved.","description":"Public: both names already resolve publicly. The sign-in page on the previous domain uses it to show the move page instead.","operationId":"api_auth_domain-move_get","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"oldDomain":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/domain-move/start":{"post":{"tags":["Auth"],"summary":"Sign in on the previous platform domain to move to the new one.","operationId":"api_auth_domain-move_start_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webauthnUser":{"type":"string"},"credentialId":{"type":"string"},"authenticatorData":{"type":"string"},"clientDataJson":{"type":"string"},"signature":{"type":"string"}},"additionalProperties":false,"required":["webauthnUser","authenticatorData","clientDataJson","signature"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"domain":{"type":"string"},"wrappedSeed":{"anyOf":[{"type":"string"},{"type":"null"}]},"identityPublicKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"required":["token","domain","wrappedSeed","identityPublicKey"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/domain-move/seed":{"post":{"tags":["Auth"],"summary":"Attach the re-wrapped vault seed to a move link.","operationId":"api_auth_domain-move_seed_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"transferSeed":{"type":"string","description":"The identity seed wrapped under the key in the link's fragment."}},"additionalProperties":false,"required":["token","transferSeed"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/domain-move/redeem":{"post":{"tags":["Auth"],"summary":"Finish a move on the new platform domain.","description":"Consumes a move link's token for a session on the new domain and returns the vault seed wrapped under the link's other half.","operationId":"api_auth_domain-move_redeem_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"additionalProperties":false,"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"transferSeed":{"anyOf":[{"type":"string"},{"type":"null"}]},"identityPublicKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"webauthnUser":{"anyOf":[{"type":"string"},{"type":"null"}]},"isExternal":{"type":"boolean"}},"additionalProperties":false,"required":["username","transferSeed","identityPublicKey","webauthnUser","isExternal"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/external/request":{"post":{"tags":["Auth"],"summary":"Email a sign-in link to an external user.","description":"Sends a single-use sign-in link, but only to an address that is already named on a firewall allowlist or in a project group. The response is identical either way — see below.","operationId":"api_auth_external_request_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"}},"additionalProperties":false,"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/ssh-keys":{"get":{"tags":["Auth"],"summary":"List the caller's registered SSH public keys.","operationId":"api_auth_ssh-keys_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fingerprint":{"type":"string"},"algorithm":{"type":"string"},"createdAt":{"type":"number"},"lastUsedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false,"required":["id","label","fingerprint","algorithm","createdAt","lastUsedAt"]}}},"additionalProperties":false,"required":["keys"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Auth"],"summary":"Register an SSH public key for the caller.","operationId":"api_auth_ssh-keys_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"publicKey":{"type":"string","description":"An authorized_keys-style line, e.g. 'ssh-ed25519 AAAA… alice@laptop'."},"label":{"type":"string"}},"additionalProperties":false,"required":["publicKey"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"fingerprint":{"type":"string"}},"additionalProperties":false,"required":["id","fingerprint"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/ssh-keys/{id}":{"delete":{"tags":["Auth"],"summary":"Remove one of the caller's SSH public keys.","operationId":"api_auth_ssh-keys_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/passkeys":{"get":{"tags":["Auth"],"summary":"List the caller's dashboard login passkeys.","operationId":"api_auth_passkeys_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"webauthnUser":{"anyOf":[{"type":"string"},{"type":"null"}]},"identityPublicKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"passkeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"credentialId":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"createdAt":{"type":"number"},"lastUsedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"prfSupported":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"wrappedSeed":{"anyOf":[{"type":"string"},{"type":"null"}]},"rpId":{"anyOf":[{"type":"string"},{"type":"null"}]},"attestedModel":{"anyOf":[{"type":"string"},{"type":"null"}]},"attestationRecorded":{"type":"boolean"},"counts":{"type":"boolean"}},"additionalProperties":false,"required":["id","credentialId","label","createdAt","lastUsedAt","prfSupported","wrappedSeed","rpId","attestedModel","attestationRecorded","counts"]}},"hardwareKey":{"type":"object","properties":{"enforced":{"type":"boolean"}},"additionalProperties":false,"required":["enforced"]}},"additionalProperties":false,"required":["username","webauthnUser","identityPublicKey","passkeys"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Auth"],"summary":"Register an additional dashboard login passkey.","operationId":"api_auth_passkeys_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"credential":{"type":"object","properties":{"id":{"type":"string","description":"Base64url credential ID."},"clientDataJson":{"type":"string","description":"Base64url clientDataJSON."},"attestationObject":{"type":"string","description":"Base64url attestationObject."}},"additionalProperties":false,"required":["id","clientDataJson","attestationObject"]},"label":{"type":"string"},"prfSupported":{"type":"boolean"},"wrappedSeed":{"type":"string","description":"Identity seed wrapped under this credential's PRF KEK."},"identityPublicKey":{"type":"string","description":"X-Wing public key, only on first enrollment."}},"additionalProperties":false,"required":["credential"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/passkeys/{id}":{"delete":{"tags":["Auth"],"summary":"Remove a dashboard login passkey.","operationId":"api_auth_passkeys_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/forward":{"post":{"tags":["Auth"],"summary":"Get a forward auth token.","operationId":"api_auth_forward_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"}},"additionalProperties":false,"required":["domain"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"additionalProperties":false,"required":["token"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/nebula/device":{"post":{"tags":["Auth"],"summary":"Create a device code for CLI authentication.","operationId":"api_auth_nebula_device_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secretHash":{"type":"string"}},"additionalProperties":false,"required":["secretHash"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"verificationUrl":{"type":"string"}},"additionalProperties":false,"required":["code","verificationUrl"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/nebula/device/{code}":{"post":{"tags":["Auth"],"summary":"Poll a device code for completion.","operationId":"api_auth_nebula_device_code_post","security":[],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceSecret":{"type":"string"}},"additionalProperties":false,"required":["deviceSecret"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","complete"]},"token":{"type":"string"}},"additionalProperties":false,"required":["status"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/nebula/device/{code}/approve":{"post":{"tags":["Auth"],"summary":"Approve a device code (requires browser session).","operationId":"api_auth_nebula_device_code_approve_post","security":[],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"additionalProperties":false,"required":["success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/vault/device":{"post":{"tags":["Auth"],"summary":"Create a device code for browser-extension vault authentication.","operationId":"api_auth_vault_device_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secretHash":{"type":"string"},"label":{"type":"string","maxLength":100,"description":"Display name for the minted token, shown in Settings."},"ephemeralPublicKey":{"type":"string","maxLength":4096,"description":"X-Wing public key, base64. The approving dashboard seals this user's identity seed to it."}},"additionalProperties":false,"required":["secretHash","ephemeralPublicKey"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"verificationUrl":{"type":"string"}},"additionalProperties":false,"required":["code","verificationUrl"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/vault/device/{code}":{"get":{"tags":["Auth"],"summary":"Details of a pending vault device code.","operationId":"api_auth_vault_device_code_get","security":[],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"ephemeralPublicKey":{"type":"string"}},"additionalProperties":false,"required":["label","ephemeralPublicKey"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Auth"],"summary":"Poll a vault device code for completion.","operationId":"api_auth_vault_device_code_post","security":[],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceSecret":{"type":"string"}},"additionalProperties":false,"required":["deviceSecret"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","complete"]},"token":{"type":"string"},"sealedSeed":{"type":"string","description":"The user's X-Wing identity seed, sealed to the ephemeral key supplied at create."}},"additionalProperties":false,"required":["status"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/auth/vault/device/{code}/approve":{"post":{"tags":["Auth"],"summary":"Approve a vault device code (requires browser session).","operationId":"api_auth_vault_device_code_approve_post","security":[],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sealedSeed":{"type":"string","description":"The identity seed, unlocked in the approving browser and re-sealed to the requester's ephemeral key."}},"additionalProperties":false,"required":["sealedSeed"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"label":{"type":"string"}},"additionalProperties":false,"required":["success","label"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/app-passwords":{"get":{"tags":["App Passwords"],"summary":"List the current user's app passwords, per inbox and legacy (metadata only).","operationId":"api_app-passwords_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"},"inboxId":{"type":"string","description":"The inbox it opens. Absent for a legacy password, which opens every inbox you hold a grant on."},"inboxAddress":{"type":"string"}},"additionalProperties":false,"required":["id","label","createdAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/app-passwords/{id}":{"delete":{"tags":["App Passwords"],"summary":"Revoke an app password.","operationId":"api_app-passwords_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/api-tokens":{"get":{"tags":["API Tokens"],"summary":"List your API tokens (metadata only).","operationId":"api_api-tokens_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"},"sshKeyFingerprint":{"type":"string"},"grantedProjects":{"type":"integer","description":"Projects the token currently holds a live grant on."},"pendingProjectRequests":{"type":"integer"},"openSshSessions":{"type":"integer"}},"additionalProperties":false,"required":["id","name","createdAt","expiresAt","grantedProjects","pendingProjectRequests","openSshSessions"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["API Tokens"],"summary":"Create an API token. The token is returned ONCE.","description":"The token acts as you on the endpoints that accept API tokens — reads directly, everything else only after you approve each request in the dashboard. It never acts as an administrator.","operationId":"api_api-tokens_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"expiresInDays":{"type":"integer","minimum":1,"maximum":90}},"additionalProperties":false,"required":["name","expiresInDays"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"token":{"type":"string"}},"additionalProperties":false,"required":["id","token"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/api-tokens/{id}":{"delete":{"tags":["API Tokens"],"summary":"Revoke one of your API tokens.","operationId":"api_api-tokens_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/api-tokens/{id}/access":{"get":{"tags":["API Tokens"],"summary":"What one of your API tokens can reach: project grants, SSH key, open SSH connections.","operationId":"api_api-tokens_id_access_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"projectGrants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tokenId":{"type":"string"},"tokenName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"status":{"type":"string","enum":["pending","granted","denied","revoked","expired"]},"reason":{"type":"string"},"autoApprove":{"type":"boolean","description":"The token's requests in this project are approved automatically, except those that always need a person (a shell, a secret, paging people, mailing customers, anything needing a passkey tap)."},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When a pending request lapses, or when a granted one ends."}},"additionalProperties":false,"required":["id","tokenId","tokenName","projectId","projectName","status","autoApprove","createdAt","expiresAt"]}},"sshKey":{"type":"object","properties":{"publicKey":{"type":"string"},"fingerprint":{"type":"string"},"addedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["publicKey","fingerprint","addedAt"]},"sshSessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"containerId":{"type":"string","description":"Set for a shell in a container."},"nodeId":{"type":"string","description":"Set for a shell on a node's host."},"serviceName":{"type":"string","description":"What the connection opened: the service, or the node's address."},"kind":{"type":"string","description":"`shell`, `exec` or `sftp`."},"peerIp":{"type":"string"},"openedAt":{"type":"string","format":"date-time"},"terminating":{"type":"boolean","description":"Termination was requested and the gateway is closing it."}},"additionalProperties":false,"required":["id","serviceName","kind","openedAt","terminating"]}}},"additionalProperties":false,"required":["projectGrants","sshSessions"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/api-tokens/{id}/project-grants/{grantId}":{"delete":{"tags":["API Tokens"],"summary":"Revoke a token's access to a project (or withdraw its pending request).","description":"Takes effect on the token's next request. Its open SSH connections into that project are closed within seconds.","operationId":"api_api-tokens_id_project-grants_grantId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"grantId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["API Tokens"],"summary":"Turn automatic approval on or off for a token's access to a project.","description":"With it on, the token's requests in that project run without waiting for you, and still appear on the Agents page. The token can then do anything the project's containers can, including reading every secret, so turning it on needs a passkey tap. Paging or notifying people, mailing customers and public status-page updates still wait for you. Not available for the Infrastructure project.","operationId":"api_api-tokens_id_project-grants_grantId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"grantId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"autoApprove":{"type":"boolean"}},"additionalProperties":false,"required":["autoApprove"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"tokenId":{"type":"string"},"tokenName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"status":{"type":"string","enum":["pending","granted","denied","revoked","expired"]},"reason":{"type":"string"},"autoApprove":{"type":"boolean","description":"The token's requests in this project are approved automatically, except those that always need a person (a shell, a secret, paging people, mailing customers, anything needing a passkey tap)."},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When a pending request lapses, or when a granted one ends."}},"additionalProperties":false,"required":["id","tokenId","tokenName","projectId","projectName","status","autoApprove","createdAt","expiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/api-tokens/{id}/ssh-key":{"delete":{"tags":["API Tokens"],"summary":"Remove a token's SSH key.","description":"The key opens no new connections. Connections already open stay open — terminate them separately.","operationId":"api_api-tokens_id_ssh-key_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/api-tokens/{id}/ssh-sessions/{sessionId}":{"delete":{"tags":["API Tokens"],"summary":"Close one of a token's open SSH connections.","description":"The gateway disconnects it within a few seconds; the connection disappears from the list once it has.","operationId":"api_api-tokens_id_ssh-sessions_sessionId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/agent-approvals":{"get":{"tags":["Agent Approvals"],"summary":"List requests your API tokens made that needed approval.","operationId":"api_agent-approvals_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tokenId":{"type":"string"},"tokenName":{"type":"string"},"method":{"type":"string"},"url":{"type":"string"},"query":{},"body":{"description":"The request body as the agent sent it. Cleared once the request ran or its approval or denial lapsed."},"status":{"type":"string","enum":["pending","approved","denied","consumed","expired"]},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":"string","format":"date-time"},"consumedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When a pending approval lapses undecided, an approved one lapses unused, or a denial lapses (after which the same request may be asked again)."},"projectId":{"type":"string","description":"The project the request acts in."},"projectName":{"type":"string"},"serviceId":{"type":"string","description":"The service it acts on, if any."},"serviceName":{"type":"string"},"containerId":{"type":"string","description":"The container it acts on, if any."},"autoApproved":{"type":"boolean","description":"Approved by the project grant's automatic approval rather than by a person; such a request ran when it was made."},"title":{"type":"string","description":"What the request does, in plain language."},"requiresStepUp":{"type":"boolean","description":"Approving it needs a recent passkey tap: it acts as an administrator, or the endpoint asks for one in the dashboard too."}},"additionalProperties":false,"required":["id","tokenId","tokenName","method","url","query","body","status","createdAt","expiresAt","autoApproved","requiresStepUp"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/agent-approvals/{id}":{"get":{"tags":["Agent Approvals"],"summary":"Read one approval — how an agent learns whether to retry.","description":"Called with the API token that raised the approval (an approval of another token is not found). When `status` is `approved`, send the original request again, unchanged.","operationId":"api_agent-approvals_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"tokenId":{"type":"string"},"tokenName":{"type":"string"},"method":{"type":"string"},"url":{"type":"string"},"query":{},"body":{"description":"The request body as the agent sent it. Cleared once the request ran or its approval or denial lapsed."},"status":{"type":"string","enum":["pending","approved","denied","consumed","expired"]},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":"string","format":"date-time"},"consumedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When a pending approval lapses undecided, an approved one lapses unused, or a denial lapses (after which the same request may be asked again)."},"projectId":{"type":"string","description":"The project the request acts in."},"projectName":{"type":"string"},"serviceId":{"type":"string","description":"The service it acts on, if any."},"serviceName":{"type":"string"},"containerId":{"type":"string","description":"The container it acts on, if any."},"autoApproved":{"type":"boolean","description":"Approved by the project grant's automatic approval rather than by a person; such a request ran when it was made."},"title":{"type":"string","description":"What the request does, in plain language."},"requiresStepUp":{"type":"boolean","description":"Approving it needs a recent passkey tap: it acts as an administrator, or the endpoint asks for one in the dashboard too."}},"additionalProperties":false,"required":["id","tokenId","tokenName","method","url","query","body","status","createdAt","expiresAt","autoApproved","requiresStepUp"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/agent-approvals/{id}/approve":{"post":{"tags":["Agent Approvals"],"summary":"Approve an agent request. It runs when the agent retries it.","description":"Applies to a pending request, or to a denied one whose denial has not lapsed — reversing a denial.","operationId":"api_agent-approvals_id_approve_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"tokenId":{"type":"string"},"tokenName":{"type":"string"},"method":{"type":"string"},"url":{"type":"string"},"query":{},"body":{"description":"The request body as the agent sent it. Cleared once the request ran or its approval or denial lapsed."},"status":{"type":"string","enum":["pending","approved","denied","consumed","expired"]},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":"string","format":"date-time"},"consumedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When a pending approval lapses undecided, an approved one lapses unused, or a denial lapses (after which the same request may be asked again)."},"projectId":{"type":"string","description":"The project the request acts in."},"projectName":{"type":"string"},"serviceId":{"type":"string","description":"The service it acts on, if any."},"serviceName":{"type":"string"},"containerId":{"type":"string","description":"The container it acts on, if any."},"autoApproved":{"type":"boolean","description":"Approved by the project grant's automatic approval rather than by a person; such a request ran when it was made."},"title":{"type":"string","description":"What the request does, in plain language."},"requiresStepUp":{"type":"boolean","description":"Approving it needs a recent passkey tap: it acts as an administrator, or the endpoint asks for one in the dashboard too."}},"additionalProperties":false,"required":["id","tokenId","tokenName","method","url","query","body","status","createdAt","expiresAt","autoApproved","requiresStepUp"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/agent-approvals/{id}/deny":{"post":{"tags":["Agent Approvals"],"summary":"Deny an agent request.","description":"Applies to a pending request, or to an approved one the agent has not used yet — withdrawing the approval.","operationId":"api_agent-approvals_id_deny_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"tokenId":{"type":"string"},"tokenName":{"type":"string"},"method":{"type":"string"},"url":{"type":"string"},"query":{},"body":{"description":"The request body as the agent sent it. Cleared once the request ran or its approval or denial lapsed."},"status":{"type":"string","enum":["pending","approved","denied","consumed","expired"]},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":"string","format":"date-time"},"consumedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When a pending approval lapses undecided, an approved one lapses unused, or a denial lapses (after which the same request may be asked again)."},"projectId":{"type":"string","description":"The project the request acts in."},"projectName":{"type":"string"},"serviceId":{"type":"string","description":"The service it acts on, if any."},"serviceName":{"type":"string"},"containerId":{"type":"string","description":"The container it acts on, if any."},"autoApproved":{"type":"boolean","description":"Approved by the project grant's automatic approval rather than by a person; such a request ran when it was made."},"title":{"type":"string","description":"What the request does, in plain language."},"requiresStepUp":{"type":"boolean","description":"Approving it needs a recent passkey tap: it acts as an administrator, or the endpoint asks for one in the dashboard too."}},"additionalProperties":false,"required":["id","tokenId","tokenName","method","url","query","body","status","createdAt","expiresAt","autoApproved","requiresStepUp"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/agent-project-requests":{"get":{"tags":["Agent Approvals"],"summary":"List project-access requests and grants across your API tokens.","operationId":"api_agent-project-requests_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tokenId":{"type":"string"},"tokenName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"status":{"type":"string","enum":["pending","granted","denied","revoked","expired"]},"reason":{"type":"string"},"autoApprove":{"type":"boolean","description":"The token's requests in this project are approved automatically, except those that always need a person (a shell, a secret, paging people, mailing customers, anything needing a passkey tap)."},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When a pending request lapses, or when a granted one ends."}},"additionalProperties":false,"required":["id","tokenId","tokenName","projectId","projectName","status","autoApprove","createdAt","expiresAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/agent-project-requests/{id}/footprint":{"get":{"tags":["Agent Approvals"],"summary":"What the project of a token's request or grant owns outside itself.","description":"The DNS zones and email domains the project owns — shown before automatic approval is turned on, since a token approved automatically can change their DNS records.","operationId":"api_agent-project-requests_id_footprint_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"zones":{"type":"array","items":{"type":"string"}},"emailDomains":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["zones","emailDomains"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/agent-project-requests/{id}/grant":{"post":{"tags":["Agent Approvals"],"summary":"Grant an API token access to the project it asked for.","description":"`hours` is one of 1, 8, 24, 168, or null for \"until the token expires\". A grant never outlives its token, and it never reaches past your own membership of the project.","operationId":"api_agent-project-requests_id_grant_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hours":{"anyOf":[{"type":"integer"},{"type":"null"}]},"autoApprove":{"type":"boolean","description":"Approve the token's requests in this project automatically. Not available for the Infrastructure project."}},"additionalProperties":false,"required":["hours"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"tokenId":{"type":"string"},"tokenName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"status":{"type":"string","enum":["pending","granted","denied","revoked","expired"]},"reason":{"type":"string"},"autoApprove":{"type":"boolean","description":"The token's requests in this project are approved automatically, except those that always need a person (a shell, a secret, paging people, mailing customers, anything needing a passkey tap)."},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When a pending request lapses, or when a granted one ends."}},"additionalProperties":false,"required":["id","tokenId","tokenName","projectId","projectName","status","autoApprove","createdAt","expiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/agent-project-requests/{id}/deny":{"post":{"tags":["Agent Approvals"],"summary":"Deny an API token's request for project access.","operationId":"api_agent-project-requests_id_deny_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"tokenId":{"type":"string"},"tokenName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"status":{"type":"string","enum":["pending","granted","denied","revoked","expired"]},"reason":{"type":"string"},"autoApprove":{"type":"boolean","description":"The token's requests in this project are approved automatically, except those that always need a person (a shell, a secret, paging people, mailing customers, anything needing a passkey tap)."},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When a pending request lapses, or when a granted one ends."}},"additionalProperties":false,"required":["id","tokenId","tokenName","projectId","projectName","status","autoApprove","createdAt","expiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/agent":{"get":{"tags":["Agent"],"summary":"Describe the calling API token: its projects and SSH key.","description":"Lists every project the token's owner is a member of, with whether the token may act there (`granted`), is waiting for the owner (`pending`), or has to ask first (`none`) — request access with POST /api/agent/project-access. When the owner is an administrator, the list includes the Infrastructure project: a grant there also opens the administrator endpoints that accept API tokens (nodes, for example).","operationId":"api_agent_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"owner":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","name","owner","expiresAt"]},"sshKey":{"type":"object","properties":{"publicKey":{"type":"string"},"fingerprint":{"type":"string"},"addedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["publicKey","fingerprint","addedAt"]},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"access":{"type":"string","enum":["granted","pending","none"]},"expiresAt":{"type":"string","format":"date-time","description":"When the grant ends, or when the pending request lapses."}},"additionalProperties":false,"required":["id","name","access"]}}},"additionalProperties":false,"required":["token","projects"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/agent/project-access":{"post":{"tags":["Agent"],"summary":"Ask the token's owner for access to a project.","description":"A token reaches no project until its owner grants it one. This queues a request under Agents in the dashboard; the owner grants it for a duration of their choosing, or denies it. Poll GET /api/agent until the project's `access` is `granted`. An undecided request lapses after 24 hours. Asking again while a request is pending (or access is granted) returns the existing one.","operationId":"api_agent_project-access_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"reason":{"type":"string","maxLength":500,"description":"Shown to the owner: what you need the project for."}},"additionalProperties":false,"required":["projectId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","granted"]},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","status","expiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/agent/ssh-key":{"put":{"tags":["Agent"],"summary":"Set the calling token's SSH public key.","description":"Generate a keypair yourself (e.g. `ssh-keygen -t ed25519 -N '' -f key`) and send the PUBLIC half. A token holds one key; setting another replaces it. The key alone opens nothing: each SSH connection needs an approved POST /api/containers/{id}/agent-ssh (or, for an administrator's token holding the Infrastructure project, POST /api/nodes/{id}/agent-ssh for a root shell on the node).","operationId":"api_agent_ssh-key_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"publicKey":{"type":"string","description":"An authorized_keys-style line, e.g. 'ssh-ed25519 AAAA… agent'."}},"additionalProperties":false,"required":["publicKey"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"publicKey":{"type":"string"},"fingerprint":{"type":"string"},"addedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["publicKey","fingerprint","addedAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Agent"],"summary":"Remove the calling token's SSH public key.","operationId":"api_agent_ssh-key_delete","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/deployment-queue":{"get":{"tags":["Monitoring"],"summary":"What the deployment loop is doing","description":"Admin-only. Each control plane's deployment loop as last reported (every 5 s): whether it leads, whether it is paused and by which node operation, the container operations in flight, the repository jobs holding a restic lock, and every pending container operation with the reason the loop gave for not starting it. A control plane whose report is older than 20 s is `stale`. Report-only — reading this changes nothing.","operationId":"api_deployment-queue_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"controlPlanes":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"address":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"stale":{"type":"boolean"},"leader":{"type":"boolean"},"paused":{"type":"boolean"},"pause":{"type":"object","properties":{"nodeId":{"type":"string"},"nodeAddress":{"type":"string"},"kind":{"type":"string","enum":["reload","upgrade","localUpgrade","reset"]},"state":{"type":"string","enum":["waitingForLock","pausingLoop","running"]},"holdsLock":{"type":"boolean"},"startedAt":{"type":"string","format":"date-time"},"stateSince":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["nodeId","kind","state","holdsLock","startedAt","stateSince"]},"nodeOperations":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"nodeAddress":{"type":"string"},"kind":{"type":"string","enum":["reload","upgrade","localUpgrade","reset"]},"state":{"type":"string","enum":["waitingForLock","pausingLoop","running"]},"holdsLock":{"type":"boolean"},"startedAt":{"type":"string","format":"date-time"},"stateSince":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["nodeId","kind","state","holdsLock","startedAt","stateSince"]}},"nativeReachable":{"type":"boolean"},"nativeError":{"type":"string"},"mayStart":{"type":"boolean"},"lastTick":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"due":{"type":"number"},"error":{"type":"string"}},"additionalProperties":false,"required":["at","due"]}},"additionalProperties":false,"required":["nodeId","address","updatedAt","stale","leader","paused","nodeOperations","nativeReachable","mayStart"]}},"running":{"type":"array","items":{"type":"object","properties":{"controlPlaneId":{"type":"string"},"containerId":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"operation":{"type":"string"},"nodeId":{"type":"string"},"nodeAddress":{"type":"string"},"targetNodeId":{"type":"string"},"targetNodeAddress":{"type":"string"},"startedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["controlPlaneId","containerId","serviceId","operation","nodeId","startedAt"]}},"jobs":{"type":"array","items":{"type":"object","properties":{"controlPlaneId":{"type":"string"},"operation":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"since":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["controlPlaneId","operation","since"]}},"pending":{"type":"array","items":{"type":"object","properties":{"containerId":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"nodeId":{"type":"string"},"nodeAddress":{"type":"string"},"operation":{"type":"string"},"requestedAt":{"type":"string","format":"date-time"},"failureCount":{"type":"number"},"failureMessage":{"type":"string"},"failedAt":{"type":"string","format":"date-time"},"waiting":{"type":"object","properties":{"kind":{"type":"string","enum":["backingOff","serviceBusy","repositoryBusy","nodeBusy","placeholderNotPlaced","placeholderError","departuresPending"]},"since":{"type":"string","format":"date-time"},"until":{"type":"string","format":"date-time"},"nodeId":{"type":"string"},"nodeAddress":{"type":"string"},"message":{"type":"string"},"holder":{"type":"object","properties":{"operation":{"type":"string"},"containerId":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"since":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["operation","since"]}},"additionalProperties":false,"required":["kind","since"],"description":"Why the leading loop did not start it on its last tick. Absent when it has not been looked at yet, or when the loop is paused or not leading (see the control plane)."}},"additionalProperties":false,"required":["containerId","serviceId","nodeId","nodeAddress","operation","failureCount"]}},"unplaced":{"type":"array","items":{"type":"object","properties":{"containerId":{"type":"string"},"serviceName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"migrationTarget":{"type":"boolean"},"pendingSince":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["containerId","migrationTarget"]}},"nodes":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"address":{"type":"string"},"isControlPlane":{"type":"boolean"},"upgradeDue":{"type":"string","format":"date-time"},"reloadRequested":{"type":"string","format":"date-time"},"failedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["nodeId","address","isControlPlane"]}}},"additionalProperties":false,"required":["controlPlanes","running","jobs","pending","unplaced","nodes"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/node-restarts":{"get":{"tags":["Monitoring"],"summary":"When each node last restarted","description":"Admin-only. Each node's last boot, as its own node_exporter reports it, next to its nightly upgrade. A node's containers run on mesh certificates that lapse about 48 hours after its last restart, because the nightly upgrade's reboot is what puts the renewed ones into use; `state` judges that (`ok` < 30 h, `warning`, `critical` ≥ 40 h, `lapsed` ≥ 48 h, `unknown` when the node reports no boot time). When the metrics query fails the nodes are still listed, every one `unknown`, and `error` says why.","operationId":"api_node-restarts_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"address":{"type":"string"},"isControlPlane":{"type":"boolean"},"disabled":{"type":"boolean","description":"Disabled (cordoned). It still gets its nightly upgrade and reboot."},"bootedAt":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["ok","warning","critical","lapsed","unknown"]},"certsLapseAt":{"type":"string","format":"date-time"},"upgradeAt":{"type":"string","format":"date-time","description":"When the nightly upgrade is (or was) due; in the past means it has not completed."},"upgradeFailedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["nodeId","address","isControlPlane","disabled","state"]}},"warningHours":{"type":"number"},"criticalHours":{"type":"number"},"certLifetimeHours":{"type":"number"},"error":{"type":"string"}},"additionalProperties":false,"required":["nodes","warningHours","criticalHours","certLifetimeHours"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns":{"post":{"tags":["DNS Zones"],"summary":"Add DNS zone.","operationId":"api_dns_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$","description":"The DNS zone name (e.g., example.com)."},"parentZone":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$","description":"The parent real zone for virtual subzone delegation."},"projectId":{"type":"string","description":"The project to delegate this zone to. Required for virtual subzones."},"registrarAccountId":{"type":"string","description":"Registrar account to manage this zone. When set, glue / NS / DS are pushed to the registrar after creation. Not allowed for virtual subzones."}},"additionalProperties":false,"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"get":{"tags":["DNS Zones"],"summary":"List DNS zones.","operationId":"api_dns_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","description":"Filter by project ID.","required":false,"schema":{"type":"string","description":"Filter by project ID."}},{"name":"topLevel","in":"query","description":"If true, only return top-level zones (admin only).","required":false,"schema":{"type":"boolean","description":"If true, only return top-level zones (admin only)."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$"},"immutable":{"type":"boolean"},"parentZone":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"registrarAccount":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false,"required":["id","name","type"]},"validation":{"type":"object","properties":{"status":{"type":"string","enum":["valid","invalid","error","pending","unchecked","managed"]},"lastChecked":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["status"]},"canvasX":{"type":"number"},"canvasY":{"type":"number"},"canvasGroupId":{"type":"string"}},"additionalProperties":false,"required":["name","immutable","validation"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/propagation-status":{"get":{"tags":["DNS Records"],"summary":"Get Envoy config propagation status.","description":"Returns how many gateway nodes still have a pending config reload vs the total. Used to show a propagation banner after DNS record changes.","operationId":"api_dns_propagation-status_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"pending":{"type":"integer","description":"Nodes that have not yet received the latest config."},"total":{"type":"integer","description":"Total joined gateway nodes."}},"additionalProperties":false,"required":["pending","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/resolve":{"get":{"tags":["DNS Records"],"summary":"Resolve a hostname to its IPv4/IPv6 addresses.","description":"UI helper for PROXY upstreams and A/AAAA records — resolves a hostname server-side via the platform's DNS resolver. The persisted value is always literal IPs, never a hostname.","operationId":"api_dns_resolve_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"host","in":"query","description":"Hostname to resolve (e.g. proxy-ssl.webflow.com).","required":true,"schema":{"type":"string","minLength":1,"maxLength":253,"description":"Hostname to resolve (e.g. proxy-ssl.webflow.com)."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ipv4":{"type":"array","items":{"type":"string"}},"ipv6":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ipv4","ipv6"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/resolve-ns":{"get":{"tags":["DNS Records"],"summary":"Resolve a domain's authoritative nameservers.","description":"UI helper for the Domain asset editor — returns the NS records for a domain via the platform's DNS resolver so they can be pre-filled into the asset.","operationId":"api_dns_resolve-ns_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"host","in":"query","description":"Domain to look up (e.g. example.com).","required":true,"schema":{"type":"string","minLength":1,"maxLength":253,"description":"Domain to look up (e.g. example.com)."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"nameservers":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["nameservers"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/registrars":{"get":{"tags":["DNS Registrars"],"summary":"List configured registrar accounts.","operationId":"api_dns_registrars_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"linkedZoneCount":{"type":"number"}},"additionalProperties":false,"required":["id","name","type","linkedZoneCount"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/registrars/{id}/domains":{"get":{"tags":["DNS Registrars"],"summary":"List domains in a registrar account.","operationId":"api_dns_registrars_id_domains_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"status":{"type":"string"},"expiresAt":{"type":"string"},"linked":{"type":"boolean"},"linkedToOtherAccount":{"type":"boolean"}},"additionalProperties":false,"required":["domain","status","expiresAt","linked","linkedToOtherAccount"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/registrars/{id}/zones/{zone}/sync":{"post":{"tags":["DNS Registrars"],"summary":"Re-apply current glue / NS / DS records at the registrar for a linked zone.","operationId":"api_dns_registrars_id_zones_zone_sync_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}":{"get":{"tags":["DNS Zones"],"summary":"Get DNS zone details.","operationId":"api_dns_zone_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$"},"immutable":{"type":"boolean"},"parentZone":{"type":"string"},"projectId":{"type":"string"},"registrarAccount":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false,"required":["id","name","type"]},"validation":{"type":"object","properties":{"status":{"type":"string","enum":["valid","invalid","error","pending","unchecked","managed"]},"nsValid":{"type":"boolean"},"glueValid":{"type":"boolean"},"dsValid":{"type":"boolean"},"lastChecked":{"type":"string","format":"date-time"},"errorMessage":{"type":"string"},"details":{"type":"object","properties":{"expectedNs":{"type":"array","items":{"type":"string"}},"actualNs":{"type":"array","items":{"type":"string"}},"expectedGlue":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["A","AAAA"]},"ip":{"type":"string"}},"additionalProperties":false,"required":["name","type","ip"]}},"actualGlue":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["A","AAAA"]},"ip":{"type":"string"}},"additionalProperties":false,"required":["name","type","ip"]}},"expectedDs":{"type":"string"},"actualDs":{"type":"string"},"parentZone":{"type":"string"},"parentNsQueried":{"type":"string"}},"additionalProperties":false,"required":["expectedNs","actualNs","expectedGlue","actualGlue","expectedDs","parentZone","parentNsQueried"]}},"additionalProperties":false,"required":["status"]},"glueRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"ttl":{"type":"number"}},"additionalProperties":false,"required":["type","name","content","ttl"]}},"dsRecord":{"type":"string"},"keyData":{"type":"string"},"dnssecProblem":{"type":"string"},"subzones":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$"},"projectId":{"type":"string"}},"additionalProperties":false,"required":["name","projectId"]}}},"additionalProperties":false,"required":["name","immutable","validation","glueRecords","subzones"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["DNS Zones"],"summary":"Update DNS zone project assignment.","operationId":"api_dns_zone_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","description":"The project to assign this zone to. Omit or null to unassign."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["DNS Zones"],"summary":"Delete DNS zone.","operationId":"api_dns_zone_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/records":{"post":{"tags":["DNS Records"],"summary":"Add DNS record.","operationId":"api_dns_zone_records_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The record name (subdomain or @)."},"content":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","TXT","CNAME","MX","SRV","NS","CAA"]},"value":{"type":"string"},"ttl":{"type":"integer","minimum":1}},"additionalProperties":false,"required":["type","value","ttl"]},{"type":"object","properties":{"type":{"type":"string","enum":["INGRESS"]},"serviceId":{"type":"string","format":"uuid","description":"Target service ID."},"port":{"type":"integer","minimum":1,"maximum":65535,"description":"Service port."},"prefix":{"type":"string","description":"Path prefix added before forwarding."},"public":{"type":"boolean","description":"Allow unauthenticated access. When false (default), the firewall applies and an empty firewall denies everyone."},"firewall":{"type":"array","items":{"type":"string"},"description":"Allowed usernames and `@group` references."},"csrfRelaxed":{"type":"boolean","description":"Allow cross-site deep-link navigations, disabling the strict CSRF bounce to the app root. Off by default."},"exceptions":{"type":"string","description":"Comma-separated paths served without authentication. A trailing `/*` matches the whole subtree."},"healthCheckPath":{"type":"string","description":"Health check path, empty to disable."},"rateLimit":{"type":"integer","minimum":1,"description":"Max requests per second per client IP. Omit to use the default baseline."},"mode":{"type":"string","enum":["http","tcp"],"description":"`http` (default) handles requests as HTTP. `tcp` terminates TLS on port 443 and forwards the decrypted stream as raw TCP; the record must then be public and take no HTTP-only options."},"useUdpPort":{"type":"boolean","description":"TCP mode only: forward to each container's public UDP port number instead of `port`, for servers (such as TURN) that listen for TCP on that number. The service must have a UDP port."}},"additionalProperties":false,"required":["type","serviceId","port"]},{"type":"object","properties":{"type":{"type":"string","enum":["PROXY"]},"upstreamIps":{"type":"array","items":{"type":"string"},"description":"Literal IPv4/IPv6 addresses of the upstream. Resolve a hostname via GET /api/dns/resolve and store the result here."},"prefix":{"type":"string","description":"Path prefix prepended before forwarding."},"rateLimit":{"type":"integer","minimum":1,"description":"Max requests per second per client IP. Omit to use the default baseline."},"caa":{"type":"array","items":{"type":"string"},"description":"CA issuers allowed to issue certificates for this hostname, e.g. [\"letsencrypt.org\", \"pki.goog\"]. Published as CAA records at the hostname beside oneDeploy's own issuer. Required for an upstream that renews its own certificate: every zone apex denies all other CAs by default, and that policy is inherited by any name without a CAA of its own."}},"additionalProperties":false,"required":["type","upstreamIps"]},{"type":"object","properties":{"type":{"type":"string","enum":["ORIGIN"]},"upstreamIps":{"type":"array","items":{"type":"string"},"description":"Literal IPv4/IPv6 addresses of the upstream. Resolve a hostname via GET /api/dns/resolve and store the result here."},"prefix":{"type":"string","description":"Path prefix prepended before forwarding."},"public":{"type":"boolean","description":"Allow unauthenticated access. When false (default), the firewall applies and an empty firewall denies everyone."},"firewall":{"type":"array","items":{"type":"string"},"description":"Allowed usernames and `@group` references."},"csrfRelaxed":{"type":"boolean","description":"Allow cross-site deep-link navigations, disabling the strict CSRF bounce to the app root. Off by default."},"exceptions":{"type":"string","description":"Comma-separated paths served without authentication. A trailing `/*` matches the whole subtree."},"rateLimit":{"type":"integer","minimum":1,"description":"Max requests per second per client IP. Omit to use the default baseline."}},"additionalProperties":false,"required":["type","upstreamIps"]},{"type":"object","properties":{"type":{"type":"string","enum":["TUNNEL"]},"prefix":{"type":"string","description":"Path prefix prepended before forwarding."},"public":{"type":"boolean","description":"Allow unauthenticated access. When false (default), the firewall applies and an empty firewall denies everyone."},"firewall":{"type":"array","items":{"type":"string"},"description":"Allowed usernames and `@group` references."},"csrfRelaxed":{"type":"boolean","description":"Allow cross-site deep-link navigations, disabling the strict CSRF bounce to the app root. Off by default."},"exceptions":{"type":"string","description":"Comma-separated paths served without authentication. A trailing `/*` matches the whole subtree."},"healthCheckPath":{"type":"string","description":"HTTP path Envoy probes on each daemon to gate failover; omit for a TCP-connect check."},"rateLimit":{"type":"integer","minimum":1,"description":"Max requests per second per client IP. Omit to use the default baseline."}},"additionalProperties":false,"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["REDIRECT"]},"url":{"type":"string","description":"Redirect target URL."},"code":{"type":"number","enum":[301,302],"description":"HTTP redirect code."},"preservePath":{"type":"boolean","description":"Whether to append the original path."}},"additionalProperties":false,"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["GATEWAY"]}},"additionalProperties":false,"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["LB"]},"targets":{"type":"array","items":{"type":"object","properties":{"ipv4":{"type":"string","description":"IPv4 address of the target."},"ipv6":{"type":"string","description":"Optional IPv6 address returned on AAAA queries."},"latitude":{"type":"number","minimum":-90,"maximum":90,"description":"Latitude in degrees, for geo-steering."},"longitude":{"type":"number","minimum":-180,"maximum":180,"description":"Longitude in degrees, for geo-steering."}},"additionalProperties":false,"required":["ipv4"]},"description":"Backend targets to load-balance across."},"healthCheckPath":{"type":"string","description":"Path probed via PowerDNS ifurlup (HTTP GET to health.check); omit to disable."}},"additionalProperties":false,"required":["type","targets"]},{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL"]}},"additionalProperties":false,"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["SMTP"]},"mx":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"integer","minimum":0,"maximum":65535,"description":"MX preference (lower = higher priority)."},"host":{"type":"string","description":"Mail exchanger hostname."}},"additionalProperties":false,"required":["priority","host"]}},"spf":{"type":"object","properties":{"includes":{"type":"array","items":{"type":"string"},"description":"`include:` mechanisms, e.g. `_spf.google.com`."},"ip4":{"type":"array","items":{"type":"string"},"description":"`ip4:` mechanisms."},"ip6":{"type":"array","items":{"type":"string"},"description":"`ip6:` mechanisms."},"a":{"type":"boolean","description":"Add the bare `a` mechanism."},"mx":{"type":"boolean","description":"Add the bare `mx` mechanism."},"all":{"type":"string","enum":["-all","~all","?all"],"description":"Trailing qualifier: -all (fail), ~all (softfail), ?all."}},"additionalProperties":false,"required":["includes","all"]},"dkim":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"string","description":"Selector label, published as `<selector>._domainkey`."},"kind":{"type":"string","enum":["TXT","CNAME"],"description":"Provider hands you a TXT or CNAME."},"value":{"type":"string","description":"TXT value (`v=DKIM1; …`) or CNAME target."}},"additionalProperties":false,"required":["selector","kind","value"]}},"dmarc":{"type":"object","properties":{"policy":{"type":"string","enum":["none","quarantine","reject"],"description":"Published policy `p=` — what receivers do on failure."},"subdomainPolicy":{"type":"string","enum":["none","quarantine","reject"],"description":"Optional subdomain policy `sp=`; defaults to `policy`."},"percent":{"type":"integer","minimum":0,"maximum":100,"description":"Optional `pct=` — share of failing mail the policy applies to."},"dkimAlignment":{"type":"string","enum":["relaxed","strict"],"description":"DKIM alignment `adkim=` (relaxed→r, strict→s)."},"spfAlignment":{"type":"string","enum":["relaxed","strict"],"description":"SPF alignment `aspf=` (relaxed→r, strict→s)."},"extraRua":{"type":"array","items":{"type":"string"},"description":"Additional aggregate-report addresses; postmaster@<platform> is always added so the dashboard works."}},"additionalProperties":false,"required":["policy"]},"mtaSts":{"type":"object","properties":{"mode":{"type":"string","enum":["enforce","testing","none"],"description":"Policy mode: enforce, testing (safe default — report-only), or none (teardown)."},"mx":{"type":"array","items":{"type":"string"},"description":"MX host patterns for the policy file, e.g. `*.l.google.com`. Custom — not derived from the MX section. Required unless mode is `none`."},"maxAge":{"type":"integer","minimum":60,"maximum":31557600,"description":"Policy max_age in seconds; defaults to 86400 (one day)."}},"additionalProperties":false,"required":["mode","mx"]},"tlsRptRua":{"type":"array","items":{"type":"string"},"description":"Additional TLS-RPT report addresses. TLS-RPT is published automatically when an MX section is present; postmaster@<platform> always receives reports."}},"additionalProperties":false,"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["STATUS"]},"title":{"type":"string","description":"Heading shown at the top of the page."},"description":{"type":"string","description":"Optional sub-heading."},"showLatency":{"type":"boolean","description":"Show per-service response-time graphs (default true)."},"services":{"type":"array","items":{"type":"object","properties":{"record":{"type":"string","format":"uuid","description":"INGRESS dns_records id to include."},"displayName":{"type":"string","description":"Optional label shown instead of the hostname."}},"additionalProperties":false,"required":["record"]},"description":"Public ingresses to aggregate on the page."}},"additionalProperties":false,"required":["type","title","services"]}]}},"additionalProperties":false,"required":["name","content"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"get":{"tags":["DNS Records"],"summary":"List DNS records.","operationId":"api_dns_zone_records_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"platformDomain":{"type":"string"},"platformZone":{"type":"string"},"tunnelDomain":{"type":"string"},"previewDomain":{"type":"string"},"oldPlatform":{"type":"object","properties":{"domain":{"type":"string"},"zone":{"type":"string"}},"additionalProperties":false,"required":["domain","zone"]},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"mutable":{"type":"boolean"},"overwritten":{"type":"boolean"},"shadowedBy":{"type":"string","description":"Name of the delegated child zone that shadows this record."},"parentId":{"type":"string","description":"Id of the record that auto-generates this one; the UI nests it under that parent."},"content":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","TXT","CNAME","MX","SRV","NS","CAA","SSHFP","SOA","HTTPS"]},"value":{"type":"string"},"ttl":{"type":"integer"}},"additionalProperties":false,"required":["type","value","ttl"]},{"type":"object","properties":{"type":{"type":"string","enum":["INGRESS"]},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"serviceProjectId":{"type":"string","description":"Set when the service belongs to another project that shares this port with the zone's project."},"serviceProjectName":{"type":"string"},"routable":{"type":"boolean","description":"False when the record no longer routes: its service (in another project) stopped sharing the port. Absent otherwise."},"port":{"type":"integer"},"prefix":{"type":"string"},"public":{"type":"boolean"},"firewall":{"type":"array","items":{"type":"string"}},"csrfRelaxed":{"type":"boolean"},"exceptions":{"type":"string"},"healthCheckPath":{"type":"string"},"rateLimit":{"type":"integer"},"mode":{"type":"string","enum":["http","tcp"]},"useUdpPort":{"type":"boolean"}},"additionalProperties":false,"required":["type","port","prefix","public","firewall","exceptions","healthCheckPath"]},{"type":"object","properties":{"type":{"type":"string","enum":["PROXY"]},"upstreamIps":{"type":"array","items":{"type":"string"}},"prefix":{"type":"string"},"rateLimit":{"type":"integer"},"caa":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["type","upstreamIps","prefix"]},{"type":"object","properties":{"type":{"type":"string","enum":["ORIGIN"]},"upstreamIps":{"type":"array","items":{"type":"string"}},"prefix":{"type":"string"},"public":{"type":"boolean"},"firewall":{"type":"array","items":{"type":"string"}},"csrfRelaxed":{"type":"boolean"},"exceptions":{"type":"string"},"rateLimit":{"type":"integer"}},"additionalProperties":false,"required":["type","upstreamIps","prefix","public","firewall","exceptions"]},{"type":"object","properties":{"type":{"type":"string","enum":["TUNNEL"]},"prefix":{"type":"string"},"public":{"type":"boolean"},"firewall":{"type":"array","items":{"type":"string"}},"csrfRelaxed":{"type":"boolean"},"exceptions":{"type":"string"},"healthCheckPath":{"type":"string"},"rateLimit":{"type":"integer"}},"additionalProperties":false,"required":["type","prefix","public","firewall","exceptions","healthCheckPath"]},{"type":"object","properties":{"type":{"type":"string","enum":["REDIRECT"]},"url":{"type":"string","description":"Redirect target URL."},"code":{"type":"number","enum":[301,302],"description":"HTTP redirect code."},"preservePath":{"type":"boolean","description":"Whether to append the original path."}},"additionalProperties":false,"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["DELEGATION"]},"label":{"type":"string"}},"additionalProperties":false,"required":["type","label"]},{"type":"object","properties":{"type":{"type":"string","enum":["GATEWAY"]}},"additionalProperties":false,"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["LB"]},"targets":{"type":"array","items":{"type":"object","properties":{"ipv4":{"type":"string"},"ipv6":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"additionalProperties":false,"required":["ipv4"]}},"healthCheckPath":{"type":"string"}},"additionalProperties":false,"required":["type","targets"]},{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL"]}},"additionalProperties":false,"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["SMTP"]},"mx":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"integer","minimum":0,"maximum":65535,"description":"MX preference (lower = higher priority)."},"host":{"type":"string","description":"Mail exchanger hostname."}},"additionalProperties":false,"required":["priority","host"]}},"spf":{"type":"object","properties":{"includes":{"type":"array","items":{"type":"string"},"description":"`include:` mechanisms, e.g. `_spf.google.com`."},"ip4":{"type":"array","items":{"type":"string"},"description":"`ip4:` mechanisms."},"ip6":{"type":"array","items":{"type":"string"},"description":"`ip6:` mechanisms."},"a":{"type":"boolean","description":"Add the bare `a` mechanism."},"mx":{"type":"boolean","description":"Add the bare `mx` mechanism."},"all":{"type":"string","enum":["-all","~all","?all"],"description":"Trailing qualifier: -all (fail), ~all (softfail), ?all."}},"additionalProperties":false,"required":["includes","all"]},"dkim":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"string","description":"Selector label, published as `<selector>._domainkey`."},"kind":{"type":"string","enum":["TXT","CNAME"],"description":"Provider hands you a TXT or CNAME."},"value":{"type":"string","description":"TXT value (`v=DKIM1; …`) or CNAME target."}},"additionalProperties":false,"required":["selector","kind","value"]}},"dmarc":{"type":"object","properties":{"policy":{"type":"string","enum":["none","quarantine","reject"]},"subdomainPolicy":{"type":"string","enum":["none","quarantine","reject"]},"percent":{"type":"integer"},"dkimAlignment":{"type":"string","enum":["relaxed","strict"]},"spfAlignment":{"type":"string","enum":["relaxed","strict"]},"extraRua":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["policy","extraRua"]},"mtaSts":{"type":"object","properties":{"mode":{"type":"string","enum":["enforce","testing","none"]},"mx":{"type":"array","items":{"type":"string"}},"maxAge":{"type":"integer"}},"additionalProperties":false,"required":["mode","mx","maxAge"]},"tlsRptRua":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["STATUS"]},"title":{"type":"string"},"description":{"type":"string"},"showLatency":{"type":"boolean"},"services":{"type":"array","items":{"type":"object","properties":{"record":{"type":"string"},"displayName":{"type":"string"}},"additionalProperties":false,"required":["record"]}}},"additionalProperties":false,"required":["type","title","showLatency","services"]}]}},"additionalProperties":false,"required":["id","name","mutable","content"]}}},"additionalProperties":false,"required":["projectId","records"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/records/{id}":{"delete":{"tags":["DNS Records"],"summary":"Delete DNS record.","operationId":"api_dns_zone_records_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["DNS Records"],"summary":"Update DNS record.","operationId":"api_dns_zone_records_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The record name (subdomain or @)."},"content":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","TXT","CNAME","MX","SRV","NS","CAA"]},"value":{"type":"string"},"ttl":{"type":"integer","minimum":1}},"additionalProperties":false,"required":["type","value","ttl"]},{"type":"object","properties":{"type":{"type":"string","enum":["INGRESS"]},"serviceId":{"type":"string","format":"uuid","description":"Target service ID."},"port":{"type":"integer","minimum":1,"maximum":65535,"description":"Service port."},"prefix":{"type":"string","description":"Path prefix added before forwarding."},"public":{"type":"boolean","description":"Allow unauthenticated access. When false (default), the firewall applies and an empty firewall denies everyone."},"firewall":{"type":"array","items":{"type":"string"},"description":"Allowed usernames and `@group` references."},"csrfRelaxed":{"type":"boolean","description":"Allow cross-site deep-link navigations, disabling the strict CSRF bounce to the app root. Off by default."},"exceptions":{"type":"string","description":"Comma-separated paths served without authentication. A trailing `/*` matches the whole subtree."},"healthCheckPath":{"type":"string","description":"Health check path, empty to disable."},"rateLimit":{"type":"integer","minimum":1,"description":"Max requests per second per client IP. Omit to use the default baseline."},"mode":{"type":"string","enum":["http","tcp"],"description":"`http` (default) handles requests as HTTP. `tcp` terminates TLS on port 443 and forwards the decrypted stream as raw TCP; the record must then be public and take no HTTP-only options."},"useUdpPort":{"type":"boolean","description":"TCP mode only: forward to each container's public UDP port number instead of `port`, for servers (such as TURN) that listen for TCP on that number. The service must have a UDP port."}},"additionalProperties":false,"required":["type","serviceId","port"]},{"type":"object","properties":{"type":{"type":"string","enum":["PROXY"]},"upstreamIps":{"type":"array","items":{"type":"string"},"description":"Literal IPv4/IPv6 addresses of the upstream. Resolve a hostname via GET /api/dns/resolve and store the result here."},"prefix":{"type":"string","description":"Path prefix prepended before forwarding."},"rateLimit":{"type":"integer","minimum":1,"description":"Max requests per second per client IP. Omit to use the default baseline."},"caa":{"type":"array","items":{"type":"string"},"description":"CA issuers allowed to issue certificates for this hostname, e.g. [\"letsencrypt.org\", \"pki.goog\"]. Published as CAA records at the hostname beside oneDeploy's own issuer. Required for an upstream that renews its own certificate: every zone apex denies all other CAs by default, and that policy is inherited by any name without a CAA of its own."}},"additionalProperties":false,"required":["type","upstreamIps"]},{"type":"object","properties":{"type":{"type":"string","enum":["ORIGIN"]},"upstreamIps":{"type":"array","items":{"type":"string"},"description":"Literal IPv4/IPv6 addresses of the upstream. Resolve a hostname via GET /api/dns/resolve and store the result here."},"prefix":{"type":"string","description":"Path prefix prepended before forwarding."},"public":{"type":"boolean","description":"Allow unauthenticated access. When false (default), the firewall applies and an empty firewall denies everyone."},"firewall":{"type":"array","items":{"type":"string"},"description":"Allowed usernames and `@group` references."},"csrfRelaxed":{"type":"boolean","description":"Allow cross-site deep-link navigations, disabling the strict CSRF bounce to the app root. Off by default."},"exceptions":{"type":"string","description":"Comma-separated paths served without authentication. A trailing `/*` matches the whole subtree."},"rateLimit":{"type":"integer","minimum":1,"description":"Max requests per second per client IP. Omit to use the default baseline."}},"additionalProperties":false,"required":["type","upstreamIps"]},{"type":"object","properties":{"type":{"type":"string","enum":["TUNNEL"]},"prefix":{"type":"string","description":"Path prefix prepended before forwarding."},"public":{"type":"boolean","description":"Allow unauthenticated access. When false (default), the firewall applies and an empty firewall denies everyone."},"firewall":{"type":"array","items":{"type":"string"},"description":"Allowed usernames and `@group` references."},"csrfRelaxed":{"type":"boolean","description":"Allow cross-site deep-link navigations, disabling the strict CSRF bounce to the app root. Off by default."},"exceptions":{"type":"string","description":"Comma-separated paths served without authentication. A trailing `/*` matches the whole subtree."},"healthCheckPath":{"type":"string","description":"HTTP path Envoy probes on each daemon to gate failover; omit for a TCP-connect check."},"rateLimit":{"type":"integer","minimum":1,"description":"Max requests per second per client IP. Omit to use the default baseline."}},"additionalProperties":false,"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["REDIRECT"]},"url":{"type":"string","description":"Redirect target URL."},"code":{"type":"number","enum":[301,302],"description":"HTTP redirect code."},"preservePath":{"type":"boolean","description":"Whether to append the original path."}},"additionalProperties":false,"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["GATEWAY"]}},"additionalProperties":false,"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["LB"]},"targets":{"type":"array","items":{"type":"object","properties":{"ipv4":{"type":"string","description":"IPv4 address of the target."},"ipv6":{"type":"string","description":"Optional IPv6 address returned on AAAA queries."},"latitude":{"type":"number","minimum":-90,"maximum":90,"description":"Latitude in degrees, for geo-steering."},"longitude":{"type":"number","minimum":-180,"maximum":180,"description":"Longitude in degrees, for geo-steering."}},"additionalProperties":false,"required":["ipv4"]},"description":"Backend targets to load-balance across."},"healthCheckPath":{"type":"string","description":"Path probed via PowerDNS ifurlup (HTTP GET to health.check); omit to disable."}},"additionalProperties":false,"required":["type","targets"]},{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL"]}},"additionalProperties":false,"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["SMTP"]},"mx":{"type":"array","items":{"type":"object","properties":{"priority":{"type":"integer","minimum":0,"maximum":65535,"description":"MX preference (lower = higher priority)."},"host":{"type":"string","description":"Mail exchanger hostname."}},"additionalProperties":false,"required":["priority","host"]}},"spf":{"type":"object","properties":{"includes":{"type":"array","items":{"type":"string"},"description":"`include:` mechanisms, e.g. `_spf.google.com`."},"ip4":{"type":"array","items":{"type":"string"},"description":"`ip4:` mechanisms."},"ip6":{"type":"array","items":{"type":"string"},"description":"`ip6:` mechanisms."},"a":{"type":"boolean","description":"Add the bare `a` mechanism."},"mx":{"type":"boolean","description":"Add the bare `mx` mechanism."},"all":{"type":"string","enum":["-all","~all","?all"],"description":"Trailing qualifier: -all (fail), ~all (softfail), ?all."}},"additionalProperties":false,"required":["includes","all"]},"dkim":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"string","description":"Selector label, published as `<selector>._domainkey`."},"kind":{"type":"string","enum":["TXT","CNAME"],"description":"Provider hands you a TXT or CNAME."},"value":{"type":"string","description":"TXT value (`v=DKIM1; …`) or CNAME target."}},"additionalProperties":false,"required":["selector","kind","value"]}},"dmarc":{"type":"object","properties":{"policy":{"type":"string","enum":["none","quarantine","reject"],"description":"Published policy `p=` — what receivers do on failure."},"subdomainPolicy":{"type":"string","enum":["none","quarantine","reject"],"description":"Optional subdomain policy `sp=`; defaults to `policy`."},"percent":{"type":"integer","minimum":0,"maximum":100,"description":"Optional `pct=` — share of failing mail the policy applies to."},"dkimAlignment":{"type":"string","enum":["relaxed","strict"],"description":"DKIM alignment `adkim=` (relaxed→r, strict→s)."},"spfAlignment":{"type":"string","enum":["relaxed","strict"],"description":"SPF alignment `aspf=` (relaxed→r, strict→s)."},"extraRua":{"type":"array","items":{"type":"string"},"description":"Additional aggregate-report addresses; postmaster@<platform> is always added so the dashboard works."}},"additionalProperties":false,"required":["policy"]},"mtaSts":{"type":"object","properties":{"mode":{"type":"string","enum":["enforce","testing","none"],"description":"Policy mode: enforce, testing (safe default — report-only), or none (teardown)."},"mx":{"type":"array","items":{"type":"string"},"description":"MX host patterns for the policy file, e.g. `*.l.google.com`. Custom — not derived from the MX section. Required unless mode is `none`."},"maxAge":{"type":"integer","minimum":60,"maximum":31557600,"description":"Policy max_age in seconds; defaults to 86400 (one day)."}},"additionalProperties":false,"required":["mode","mx"]},"tlsRptRua":{"type":"array","items":{"type":"string"},"description":"Additional TLS-RPT report addresses. TLS-RPT is published automatically when an MX section is present; postmaster@<platform> always receives reports."}},"additionalProperties":false,"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["STATUS"]},"title":{"type":"string","description":"Heading shown at the top of the page."},"description":{"type":"string","description":"Optional sub-heading."},"showLatency":{"type":"boolean","description":"Show per-service response-time graphs (default true)."},"services":{"type":"array","items":{"type":"object","properties":{"record":{"type":"string","format":"uuid","description":"INGRESS dns_records id to include."},"displayName":{"type":"string","description":"Optional label shown instead of the hostname."}},"additionalProperties":false,"required":["record"]},"description":"Public ingresses to aggregate on the page."}},"additionalProperties":false,"required":["type","title","services"]}]}},"additionalProperties":false,"required":["name","content"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/records/{id}/validate":{"get":{"tags":["DNS Records"],"summary":"Validate an SMTP record's mail DNS against live resolution.","description":"Runs DNS-only checks (SPF lookup audit, DKIM key parsing, DMARC policy/alignment/authorization, MX resolution) on an External email (SMTP) record and reports findings. Does not probe mail servers over SMTP.","operationId":"api_dns_zone_records_id_validate_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"findings":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","enum":["spf","dkim","dmarc","mx"]},"level":{"type":"string","enum":["pass","warning","fail"]},"title":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":false,"required":["section","level","title"]}},"spf":{"type":"object","properties":{"totalLookups":{"type":"integer"},"voidLookups":{"type":"integer"},"limit":{"type":"integer"},"voidLimit":{"type":"integer"},"overLimit":{"type":"boolean"},"entries":{"type":"array","items":{"type":"object","properties":{"mechanism":{"type":"string"},"depth":{"type":"integer"},"cost":{"type":"integer"},"note":{"type":"string"}},"additionalProperties":false,"required":["mechanism","depth","cost"]}}},"additionalProperties":false,"required":["totalLookups","voidLookups","limit","voidLimit","overLimit","entries"]}},"additionalProperties":false,"required":["findings"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/records/{id}/origin-ca":{"get":{"tags":["DNS Records"],"summary":"Get the origin CA material for an ORIGIN record.","description":"Returns the PEM-encoded per-record origin CA certificate (the chain/trust root for the cert installed on the upstream) and the cluster-wide client CA certificate (which the upstream's reverse proxy can trust to require mutual TLS). Only public certificates are returned — no private keys ever cross the network.","operationId":"api_dns_zone_records_id_origin-ca_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"fqdn":{"type":"string","description":"The hostname the origin cert must serve."},"originCaCert":{"type":"string","description":"PEM origin CA cert that signs the upstream's leaf."},"clientCaCert":{"type":"string","description":"PEM client CA cert to trust if the upstream requires mutual TLS. Absent until the first ORIGIN record exists."}},"additionalProperties":false,"required":["fqdn","originCaCert"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/records/{id}/origin-ca/sign":{"post":{"tags":["DNS Records"],"summary":"Sign a CSR with an ORIGIN record's origin CA.","description":"Signs an operator-supplied PKCS#10 CSR with the record's per-record origin CA and returns the leaf certificate to install on the upstream. The SAN is stamped to the record's FQDN regardless of what the CSR requests; the public key must be ECDSA P-256. The private key stays on the operator's machine — only the CSR is uploaded.","operationId":"api_dns_zone_records_id_origin-ca_sign_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csr":{"type":"string","description":"PEM-encoded PKCS#10 certificate request."}},"additionalProperties":false,"required":["csr"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"certificate":{"type":"string","description":"PEM-encoded signed leaf cert."}},"additionalProperties":false,"required":["certificate"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/records/{id}/origin-ca/rotate":{"post":{"tags":["DNS Records"],"summary":"Rotate an ORIGIN record's origin CA.","description":"Destructive: regenerates the per-record origin CA. Every leaf the old CA signed stops being trusted, so the operator must submit a fresh CSR and reinstall the returned cert on the upstream. Reloads gateways so Envoy validates against the new trust root.","operationId":"api_dns_zone_records_id_origin-ca_rotate_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/records/{id}/tunnel-secrets":{"get":{"tags":["DNS Records"],"summary":"List the daemons (secrets) registered for a TUNNEL record.","description":"Returns the tunnel daemons registered for this TUNNEL record. The secret value itself is never returned — only its label, creation time, and when the daemon last fetched a Nebula cert (`lastSeenAt`, null if it has never connected).","operationId":"api_dns_zone_records_id_tunnel-secrets_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"secrets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"createdAt":{"type":"string"},"lastSeenAt":{"type":"string","description":"When the daemon last connected, if ever."}},"additionalProperties":false,"required":["id","label","createdAt"]}}},"additionalProperties":false,"required":["secrets"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["DNS Records"],"summary":"Register a new tunnel daemon for a TUNNEL record.","description":"Allocates a pinned Nebula address and generates a secret for one `onedeploy-cli tunnel-daemon`. The secret is returned exactly once and is never recoverable afterwards — the operator must store it. Gateways reload in the background so Envoy starts dialing the new daemon shortly after this call returns. Add one secret per machine: two daemons sharing a secret collide on the same Nebula address.","operationId":"api_dns_zone_records_id_tunnel-secrets_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","description":"Human label for this daemon, e.g. the machine name."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"secret":{"type":"string","description":"The daemon secret. Shown once — store it now."}},"additionalProperties":false,"required":["id","secret"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/records/{id}/tunnel-secrets/{secretId}":{"delete":{"tags":["DNS Records"],"summary":"Revoke a tunnel daemon.","description":"Deletes the secret and removes the daemon's Nebula address from Envoy's upstream set via a background gateway reload. The daemon stops receiving traffic once the reload lands and falls off the mesh within one cert lifetime (≤15 minutes), since it can no longer refresh its certificate.","operationId":"api_dns_zone_records_id_tunnel-secrets_secretId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"secretId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/acme-tokens":{"get":{"tags":["DNS Zones"],"summary":"List ACME tokens for a DNS zone.","description":"Returns the ACME tokens minted for this zone. Plaintext tokens are never returned; only the name, prefix, creator, and timestamps are visible to project members.","operationId":"api_dns_zone_acme-tokens_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tokenPrefix":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","name","tokenPrefix","createdAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["DNS Zones"],"summary":"Mint a new ACME token for a DNS zone.","description":"Returns the plaintext token in the response — store it now, it cannot be retrieved later. The token is bound to this single zone and can only write _acme-challenge TXT records under it.","operationId":"api_dns_zone_acme-tokens_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64}},"additionalProperties":false,"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"token":{"type":"string"},"tokenPrefix":{"type":"string"}},"additionalProperties":false,"required":["id","name","token","tokenPrefix"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/acme-tokens/{id}":{"delete":{"tags":["DNS Zones"],"summary":"Revoke an ACME token.","operationId":"api_dns_zone_acme-tokens_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/registrar":{"put":{"tags":["DNS Zones"],"summary":"Link an existing DNS zone to a registrar account: pushes NS / glue / DS to the registrar.","operationId":"api_dns_zone_registrar_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","description":"The registrar account to link this zone to."}},"additionalProperties":false,"required":["accountId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["DNS Zones"],"summary":"Unlink an existing DNS zone from its registrar account. Records at the registrar are left untouched.","operationId":"api_dns_zone_registrar_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/revalidate":{"post":{"tags":["DNS Zones"],"summary":"Trigger DNS zone validation.","operationId":"api_dns_zone_revalidate_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["valid","invalid","error","pending","unchecked"]},"nsValid":{"type":"boolean"},"glueValid":{"type":"boolean"},"dsValid":{"type":"boolean"},"lastChecked":{"type":"string","format":"date-time"},"errorMessage":{"type":"string"},"details":{"type":"object","properties":{"expectedNs":{"type":"array","items":{"type":"string"}},"actualNs":{"type":"array","items":{"type":"string"}},"expectedGlue":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["A","AAAA"]},"ip":{"type":"string"}},"additionalProperties":false,"required":["name","type","ip"]}},"actualGlue":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["A","AAAA"]},"ip":{"type":"string"}},"additionalProperties":false,"required":["name","type","ip"]}},"expectedDs":{"type":"string"},"actualDs":{"type":"string"},"parentZone":{"type":"string"},"parentNsQueried":{"type":"string"}},"additionalProperties":false,"required":["expectedNs","actualNs","expectedGlue","actualGlue","expectedDs","parentZone","parentNsQueried"]}},"additionalProperties":false,"required":["status"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/acme-budget":{"get":{"tags":["DNS Zones"],"summary":"Get the Let's Encrypt certificate budget for a zone's registered domain.","operationId":"api_dns_zone_acme-budget_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"registeredDomain":{"type":"string"},"limit":{"type":"number"},"used":{"type":"number"},"available":{"type":"number"},"nextAvailableAt":{"type":"string"},"windowDays":{"type":"number"},"refillMinutes":{"type":"number"},"zones":{"type":"array","items":{"type":"string"}},"recent":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string"},"issuedAt":{"type":"string"}},"additionalProperties":false,"required":["identifier","issuedAt"]}}},"additionalProperties":false,"required":["limit","used","available","windowDays","refillMinutes","zones","recent"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/hsts-preload":{"get":{"tags":["DNS Zones"],"summary":"Get the HSTS preload status for a DNS zone.","operationId":"api_dns_zone_hsts-preload_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"refresh","in":"query","description":"If set to 'true', skip the cache and fetch fresh status from hstspreload.org.","required":false,"schema":{"type":"string","description":"If set to 'true', skip the cache and fetch fresh status from hstspreload.org."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["unknown","pending","preloaded","rejected","pending-removal","removed"]},"checkedAt":{"type":"string"},"upstreamError":{"type":"string"},"submissionUrl":{"type":"string"},"apex":{"type":"object","properties":{"coverage":{"type":"string","enum":["oneDeploy","placeholder","external","pending","none"]},"recordType":{"type":"string"},"shadowedBy":{"type":"string"},"delegationReady":{"type":"boolean"}},"additionalProperties":false,"required":["coverage","delegationReady"]}},"additionalProperties":false,"required":["submissionUrl","apex"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/hsts-probe":{"get":{"tags":["DNS Zones"],"summary":"Probe a zone apex for the HSTS headers required by the preload list.","operationId":"api_dns_zone_hsts-probe_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"https":{"type":"object","properties":{"reachable":{"type":"boolean"},"status":{"type":"integer"},"header":{"type":"string"},"error":{"type":"string"}},"additionalProperties":false,"required":["reachable"]},"hsts":{"type":"object","properties":{"maxAge":{"type":"integer"},"includeSubDomains":{"type":"boolean"},"preload":{"type":"boolean"}},"additionalProperties":false,"required":["maxAge","includeSubDomains","preload"]},"httpRedirect":{"type":"object","properties":{"reachable":{"type":"boolean"},"status":{"type":"integer"},"location":{"type":"string"},"toHttps":{"type":"boolean"},"sameHost":{"type":"boolean"},"error":{"type":"string"}},"additionalProperties":false,"required":["reachable","toHttps","sameHost"]},"preloadable":{"type":"boolean"},"problems":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["https","httpRedirect","preloadable","problems"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/regenerate-dnssec":{"post":{"tags":["DNS Zones"],"summary":"Roll the DNSSEC KSK for a zone. Use only when the parent registry rejects the current DS material — the new DS must be re-submitted to the registrar.","operationId":"api_dns_zone_regenerate-dnssec_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ds":{"type":"string"}},"additionalProperties":false,"required":["ds"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/dnssec-keys":{"get":{"tags":["DNS Zones"],"summary":"List a zone's DNSSEC keys, and which one the registrar sync submits to the parent zone.","operationId":"api_dns_zone_dnssec-keys_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"active":{"type":"boolean"},"published":{"type":"boolean"},"bits":{"type":"integer"},"algorithm":{"type":"string"},"keyTag":{"type":"integer"},"dnskey":{"type":"string"}},"additionalProperties":false,"required":["id","type","active","published","bits","algorithm","keyTag","dnskey"]}},"parentKeyId":{"type":["integer","null"]},"problem":{"type":["string","null"]}},"additionalProperties":false,"required":["keys","parentKeyId","problem"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["DNS Zones"],"summary":"DANGEROUS: import a DNSSEC private key into a zone as an active signing key. Meant for moving a zone from another cluster without changing its key.","operationId":"api_dns_zone_dnssec-keys_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"privateKey":{"type":"string"},"confirm":{"type":"string"}},"additionalProperties":false,"required":["privateKey","confirm"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"active":{"type":"boolean"},"published":{"type":"boolean"},"bits":{"type":"integer"},"algorithm":{"type":"string"},"keyTag":{"type":"integer"},"dnskey":{"type":"string"}},"additionalProperties":false,"required":["id","type","active","published","bits","algorithm","keyTag","dnskey"]}},"additionalProperties":false,"required":["key"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/dnssec-keys/{keyId}":{"delete":{"tags":["DNS Zones"],"summary":"DANGEROUS: delete one of a zone's DNSSEC keys. Refuses the zone's last active signing key.","operationId":"api_dns_zone_dnssec-keys_keyId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"confirm","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/dns/{zone}/dnssec-keys/{keyId}/export":{"post":{"tags":["DNS Zones"],"summary":"DANGEROUS: reveal a DNSSEC private key. Whoever holds it can sign answers for the zone.","operationId":"api_dns_zone_dnssec-keys_keyId_export_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string"}},"additionalProperties":false,"required":["confirm"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"privateKey":{"type":"string"}},"additionalProperties":false,"required":["privateKey"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/domains":{"get":{"tags":["Domains"],"summary":"List domains the user has firewall access to.","description":"The app launcher. For an external user this is the whole dashboard.","operationId":"api_domains_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"fqdn":{"type":"string"},"kind":{"type":"string","enum":["ingress","origin","redirect","tunnel"]}},"additionalProperties":false,"required":["fqdn","kind"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/docs":{"get":{"tags":["Docs"],"summary":"List the guides.","description":"The index of the guides the caller may read: getting started and the user guides for everyone, the admin guides for administrators (an API token needs a grant on the Infrastructure project for those). `restricted` names the guides that exist but the caller may not read. Fetch a guide with GET /api/docs/{section}/page?slug=….","operationId":"api_docs_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","enum":["getting-started","user","admin"]},"groups":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"docs":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"pages":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false,"required":["slug","title","description"]}}},"additionalProperties":false,"required":["slug","title","description"]}}},"additionalProperties":false,"required":["title","docs"]}}},"additionalProperties":false,"required":["section","groups"]}},"restricted":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","enum":["getting-started","user","admin"]},"slugs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["section","slugs"]}}},"additionalProperties":false,"required":["sections","restricted"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/docs/search":{"get":{"tags":["Docs"],"summary":"Search the guides.","description":"Every guide the caller may read whose title, description or text contains `q` (case-insensitive), title matches first, each with an excerpt around the first match.","operationId":"api_docs_search_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","enum":["getting-started","user","admin"]},"slug":{"type":"string"},"title":{"type":"string"},"excerpt":{"type":"string"}},"additionalProperties":false,"required":["section","slug","title","excerpt"]}}},"additionalProperties":false,"required":["results"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/docs/{section}/page":{"get":{"tags":["Docs"],"summary":"Get one guide as Markdown.","description":"One guide's Markdown, as text/markdown. `slug` is as the index lists it (e.g. `services/autoscaling`). Links between guides are relative file paths, as in the repository: `../storage/volumes.md` from `services/autoscaling` is the slug `storage/volumes`.","operationId":"api_docs_section_page_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"section","in":"path","required":true,"schema":{"type":"string","enum":["getting-started","user","admin"]}},{"name":"slug","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cert-monitoring":{"get":{"tags":["Cert Monitoring"],"summary":"List unknown TLS certificates seen in CT logs.","operationId":"api_cert-monitoring_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"issuer":{"type":"string"},"serialNumber":{"type":"string"},"subject":{"type":"string"},"subjectAltName":{"type":"string"},"fingerprint":{"type":"string"},"notBefore":{"type":"string","format":"date-time"},"notAfter":{"type":"string","format":"date-time"},"certificate":{"type":"string"},"zones":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["issuer","serialNumber","fingerprint","notBefore","notAfter","certificate","zones"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cert-monitoring/trust":{"post":{"tags":["Cert Monitoring"],"summary":"Trust an unknown certificate (add it to the allow-list).","operationId":"api_cert-monitoring_trust_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fingerprint":{"type":"string"}},"additionalProperties":false,"required":["fingerprint"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"additionalProperties":false,"required":["success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects":{"post":{"tags":["Projects"],"summary":"Create project. Requires administrator permissions.","operationId":"api_projects_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9 -]*$","description":"The project name."}},"additionalProperties":false,"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the new project."}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"get":{"tags":["Projects"],"summary":"List the user's projects.","description":"Projects the user is a member of, and those they read through a project link (permissions: read). Admins additionally get every project unless mine=true, which restricts the result to the admin's own memberships (used by the dashboard so an admin's nav/cards/incident banner reflect what they're actually responsible for). Non-admins are always membership-scoped and mine has no effect. Called with an API token, only the projects the token has been granted are listed; GET /api/agent lists the rest it may ask for.","operationId":"api_projects_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"mine","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"serviceCount":{"type":"integer"},"memberCount":{"type":"integer"},"isAdmin":{"type":"boolean"},"permissions":{"type":"array","items":{"type":"string","enum":["read","tickets"]}},"openIncidents":{"type":"integer"},"pendingAlerts":{"type":"integer"},"highestSeverity":{"type":"string","enum":["critical","high","medium","low","info"]}},"additionalProperties":false,"required":["id","name","serviceCount","memberCount","isAdmin","openIncidents","pendingAlerts"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/directory":{"get":{"tags":["Projects"],"summary":"List every project's name.","description":"The id and name of every project on the cluster, and whether the caller is a member of it. For pickers that name another project.","operationId":"api_projects_directory_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"member":{"type":"boolean","description":"Whether the caller is a member of the project."}},"additionalProperties":false,"required":["id","name","member"]}}},"additionalProperties":false,"required":["projects"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}":{"get":{"tags":["Projects"],"summary":"Get project details with members list.","operationId":"api_projects_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"members":{"type":"array","items":{"type":"string"}},"memberPermissions":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Limited members and their permissions (src/util/project-permissions.ts). A member absent here is a full member."},"isAdmin":{"type":"boolean"},"quotaCpu":{"type":"integer","description":"CPU quota in decicores (0 = unlimited)."},"quotaMemory":{"type":"integer","description":"Memory quota in MiB (0 = unlimited)."},"quotaStorage":{"type":"object","additionalProperties":{"type":"integer"},"description":"Per-disk-type storage quota in MiB. Keys are disk types; a disk type absent from the map is unlimited."}},"additionalProperties":false,"required":["id","name","members","memberPermissions","isAdmin","quotaCpu","quotaMemory","quotaStorage"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Projects"],"summary":"Rename project. Requires administrator permissions.","operationId":"api_projects_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9 -]*$","description":"The new project name."},"quotaCpu":{"type":"integer","minimum":0,"description":"CPU quota in decicores (0 = unlimited)."},"quotaMemory":{"type":"integer","minimum":0,"description":"Memory quota in MiB (0 = unlimited)."},"quotaStorage":{"type":"object","additionalProperties":{"type":"integer","minimum":0},"description":"Per-disk-type storage quota in MiB. Keys are disk types; a disk type absent from the map is unlimited."}},"additionalProperties":false,"required":["name","quotaCpu","quotaMemory","quotaStorage"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Projects"],"summary":"Delete project. Must have no live services; any recently-deleted services and their backups are permanently discarded. Requires administrator permissions.","operationId":"api_projects_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/members":{"post":{"tags":["Projects"],"summary":"Add member to project. Requires administrator permissions.","operationId":"api_projects_id_members_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","description":"The username to add as a member."},"permissions":{"anyOf":[{"type":"array","items":{"type":"string","enum":["read","tickets"]}},{"type":"null"}],"description":"Limit the member to these permissions: 'read' (see the project, no changes, no secrets) and/or 'tickets' (work the support desk). Absent or null for a full member."}},"additionalProperties":false,"required":["username"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/members/{username}":{"delete":{"tags":["Projects"],"summary":"Remove member from project. Requires administrator permissions.","operationId":"api_projects_id_members_username_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Projects"],"summary":"Change what a project member may reach. Requires administrator permissions.","description":"Null makes them a full member; a list of permissions limits them. Limiting a member removes their copy of the project's vault key in the same statement; making them a full member again leaves the vault key to the next vault-encryption sync, like any new member.","operationId":"api_projects_id_members_username_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"permissions":{"anyOf":[{"type":"array","items":{"type":"string","enum":["read","tickets"]}},{"type":"null"}],"description":"Limit the member to these permissions: 'read' (see the project, no changes, no secrets) and/or 'tickets' (work the support desk). Absent or null for a full member."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/ingress-targets":{"get":{"tags":["Projects"],"summary":"List services other projects share with this project.","description":"Services of other projects whose owners let this project point INGRESS records at one or more of their ports, with those ports.","operationId":"api_projects_id_ingress-targets_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"targets":{"type":"array","items":{"type":"object","properties":{"serviceId":{"type":"string"},"serviceName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"ports":{"type":"array","items":{"type":"integer"}}},"additionalProperties":false,"required":["serviceId","serviceName","projectId","projectName","ports"]}}},"additionalProperties":false,"required":["targets"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/groups":{"get":{"tags":["Projects"],"summary":"List user groups in a project.","operationId":"api_projects_id_groups_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"members":{"type":"array","items":{"type":"string"}},"automatic":{"type":"boolean","description":"True for the built-in all-members group, which tracks project membership and cannot be edited or deleted."}},"additionalProperties":false,"required":["id","name","members","automatic"]}},"projectMembers":{"type":"array","items":{"type":"string"},"description":"Usernames with access to this project."}},"additionalProperties":false,"required":["groups","projectMembers"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Projects"],"summary":"Create a user group in a project.","operationId":"api_projects_id_groups_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Group name. Referenced from a firewall as @<name>; lowercase letters and digits."}},"additionalProperties":false,"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/groups/{groupId}":{"delete":{"tags":["Projects"],"summary":"Delete a user group.","operationId":"api_projects_id_groups_groupId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/groups/{groupId}/members":{"post":{"tags":["Projects"],"summary":"Add a member to a user group.","operationId":"api_projects_id_groups_groupId_members_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","description":"Username to add to the group, or the email address of an external user."}},"additionalProperties":false,"required":["username"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/groups/{groupId}/members/{username}":{"delete":{"tags":["Projects"],"summary":"Remove a member from a user group.","operationId":"api_projects_id_groups_groupId_members_username_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}},{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/oncall":{"get":{"tags":["On-call"],"summary":"List on-call rotations for a project.","operationId":"api_projects_id_oncall_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"projectMembers":{"type":"array","items":{"type":"string"}},"memberTimezones":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"timezone":{"type":"string"}},"additionalProperties":false,"required":["username","timezone"]}},"availability":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"start":{"type":"integer"},"end":{"type":"integer"},"note":{"type":"string"}},"additionalProperties":false,"required":["username","start","end","note"]}},"rotations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"periodDays":{"type":"integer"},"startsAt":{"type":"integer"},"timeStart":{"type":"string"},"timeEnd":{"type":"string"},"weekdays":{"type":"integer"},"anchorWeekday":{"type":["integer","null"]},"layer":{"type":"integer"},"members":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"currentOnCall":{"type":"array","items":{"type":"string"}},"swaps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"activeDay":{"type":"integer"},"offeredBy":{"type":"string"},"acceptedBy":{"type":"string"},"status":{"type":"string"},"date":{"type":"integer"}},"additionalProperties":false,"required":["id","activeDay","offeredBy","status","date"]}},"shiftOverrides":{"type":"array","items":{"type":"object","properties":{"activeDay":{"type":"integer"},"username":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false,"required":["activeDay","username","type"]}}},"additionalProperties":false,"required":["id","name","periodDays","startsAt","timeStart","timeEnd","weekdays","anchorWeekday","layer","members","currentOnCall","swaps","shiftOverrides"]}}},"additionalProperties":false,"required":["projectMembers","memberTimezones","availability","rotations"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["On-call"],"summary":"Create an on-call rotation for a project. Requires administrator permissions.","operationId":"api_projects_id_oncall_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"periodDays":{"type":"integer","minimum":1},"startsAt":{"type":"integer","description":"Unix timestamp (UTC) when the first slot begins."},"timeStart":{"type":"string","pattern":"^\\d{2}:\\d{2}$","description":"HH:MM in UTC"},"timeEnd":{"type":"string","pattern":"^\\d{2}:\\d{2}$","description":"HH:MM in UTC"},"weekdays":{"type":"integer","minimum":1,"maximum":127,"description":"Bitmask (UTC weekday): bit 0=Mon, bit 6=Sun"},"anchorWeekday":{"type":"integer","minimum":0,"maximum":6,"description":"Pin the cycle's boundary to this weekday (0=Mon, 6=Sun); the period must then be a whole number of weeks. Omit for the rolling default, which counts active days from startsAt."},"layer":{"type":"integer","minimum":1,"description":"Escalation layer (1 = first paged, 2 = second, etc.)"},"members":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Ordered list of slots, each slot is a list of usernames."}},"additionalProperties":false,"required":["name","periodDays","startsAt","timeStart","timeEnd","weekdays","members"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/oncall/fairness":{"get":{"tags":["On-call"],"summary":"Per-person on-call load over a trailing window.","operationId":"api_projects_id_oncall_fairness_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"days","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"windowDays":{"type":"integer"},"users":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"timezone":{"type":"string"},"totalHours":{"type":"number"},"offHours":{"type":"number"},"shiftDays":{"type":"integer"}},"additionalProperties":false,"required":["username","timezone","totalHours","offHours","shiftDays"]}}},"additionalProperties":false,"required":["windowDays","users"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/oncall/swaps":{"get":{"tags":["On-call"],"summary":"List shift swaps for a project.","operationId":"api_projects_id_oncall_swaps_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"swaps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rotationId":{"type":"string"},"activeDay":{"type":"integer"},"offeredBy":{"type":"string"},"acceptedBy":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"integer"}},"additionalProperties":false,"required":["id","rotationId","activeDay","offeredBy","status","createdAt"]}}},"additionalProperties":false,"required":["swaps"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["On-call"],"summary":"Offer a single-day shift swap.","operationId":"api_projects_id_oncall_swaps_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rotationId":{"type":"string"},"activeDay":{"type":"integer"}},"additionalProperties":false,"required":["rotationId","activeDay"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/oncall/swaps/{swapId}/accept":{"post":{"tags":["On-call"],"summary":"Accept an open shift swap.","operationId":"api_projects_id_oncall_swaps_swapId_accept_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"swapId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/oncall/swaps/{swapId}":{"delete":{"tags":["On-call"],"summary":"Cancel a shift swap.","operationId":"api_projects_id_oncall_swaps_swapId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"swapId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/oncall/{rotationId}/shifts/{activeDay}/members":{"post":{"tags":["On-call"],"summary":"Add a user to a specific day's on-call shift.","operationId":"api_projects_id_oncall_rotationId_shifts_activeDay_members_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"rotationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"activeDay","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"}},"additionalProperties":false,"required":["username"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/oncall/{rotationId}/shifts/{activeDay}/members/{username}":{"delete":{"tags":["On-call"],"summary":"Remove a user from a specific day's on-call shift.","operationId":"api_projects_id_oncall_rotationId_shifts_activeDay_members_username_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"rotationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"activeDay","in":"path","required":true,"schema":{"type":"string"}},{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/oncall/{rotationId}":{"put":{"tags":["On-call"],"summary":"Update an on-call rotation. Requires administrator permissions.","operationId":"api_projects_id_oncall_rotationId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"rotationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"periodDays":{"type":"integer","minimum":1},"startsAt":{"type":"integer"},"timeStart":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"timeEnd":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"weekdays":{"type":"integer","minimum":1,"maximum":127},"anchorWeekday":{"type":"integer","minimum":0,"maximum":6},"layer":{"type":"integer","minimum":1},"members":{"type":"array","items":{"type":"array","items":{"type":"string"}}}},"additionalProperties":false,"required":["name","periodDays","startsAt","timeStart","timeEnd","weekdays","members"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["On-call"],"summary":"Delete an on-call rotation. Requires administrator permissions.","operationId":"api_projects_id_oncall_rotationId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"rotationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/resources":{"get":{"tags":["Projects"],"summary":"Get resource usage breakdown for a project.","operationId":"api_projects_id_resources_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"quota":{"type":"object","properties":{"cpu":{"type":"integer"},"memory":{"type":"integer"},"storage":{"type":"object","additionalProperties":{"type":"integer"}}},"additionalProperties":false,"required":["cpu","memory","storage"]},"usage":{"type":"object","properties":{"cpu":{"type":"integer"},"memory":{"type":"integer"},"storage":{"type":"object","additionalProperties":{"type":"integer"}}},"additionalProperties":false,"required":["cpu","memory","storage"]},"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"containers":{"type":"integer"},"cpu":{"type":"integer"},"memory":{"type":"integer"},"storage":{"type":"object","additionalProperties":{"type":"integer"}}},"additionalProperties":false,"required":["id","name","containers","cpu","memory","storage"]}}},"additionalProperties":false,"required":["quota","usage","services"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/metrics":{"get":{"tags":["Projects"],"summary":"Resource metrics for all services in a project over a selectable time window.","operationId":"api_projects_id_metrics_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"start":{"type":"number"},"end":{"type":"number"},"step":{"type":"number"},"series":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"cpu":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cpuThrottled":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"memory":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"networkRx":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"networkTx":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"diskRead":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"diskWrite":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cpuLimit":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"memoryLimit":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","cpu","cpuThrottled","memory","networkRx","networkTx","diskRead","diskWrite","cpuLimit","memoryLimit"]}},"volumes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"seriesKey":{"type":"string"},"volume":{"type":"string"},"usage":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"fraction":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","seriesKey","volume","usage","fraction"]}},"ingress":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"requestsPerSec":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"errorRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"avgLatencyMs":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","requestsPerSec","errorRate","avgLatencyMs"]}},"errors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["key","message"]}}},"additionalProperties":false,"required":["range","start","end","step","series","volumes","ingress","errors"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/csp-reports":{"get":{"tags":["Projects"],"summary":"Recent CSP / Reporting API violation reports for a project.","operationId":"api_projects_id_csp-reports_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","description":"How far back to look (default 24h).","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d"],"description":"How far back to look (default 24h)."}},{"name":"kind","in":"query","description":"Filter to one report type label.","required":false,"schema":{"type":"string","description":"Filter to one report type label."}},{"name":"domain","in":"query","description":"Filter to one domain label.","required":false,"schema":{"type":"string","description":"Filter to one domain label."}},{"name":"limit","in":"query","description":"Max rows (default 200).","required":false,"schema":{"type":"string","description":"Max rows (default 200)."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"reports":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"number"},"domain":{"type":"string"},"kind":{"type":"string"},"disposition":{"type":"string"},"effectiveDirective":{"type":"string"},"blockedURL":{"type":"string"},"documentURL":{"type":"string"},"sourceFile":{"type":"string"},"sample":{"type":"string"},"userAgent":{"type":"string"},"raw":{"type":"string"}},"additionalProperties":false,"required":["timestamp","domain","kind","disposition","effectiveDirective","blockedURL","documentURL","sourceFile","sample","userAgent","raw"]}}},"additionalProperties":false,"required":["reports"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/security-reporting":{"get":{"tags":["Security Reports"],"summary":"A project's vulnerability-reporting setup.","operationId":"api_projects_id_security-reporting_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"platformDomainConfigured":{"type":"boolean"},"sealingPublicKey":{"type":"string"},"address":{"type":"string"},"contacts":{"type":"array","items":{"type":"string"}},"key":{"type":"object","properties":{"fingerprint":{"type":"string"},"url":{"type":"string"},"publicKey":{"type":"string"},"encryptedSecretKey":{"type":"string"}},"additionalProperties":false,"required":["fingerprint","publicKey","encryptedSecretKey"]},"preferredLanguages":{"type":"string"},"policyUrl":{"type":"string"},"acknowledgmentsUrl":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"storageUsed":{"type":"number"},"storageMax":{"type":"number"},"repliesAvailable":{"type":"boolean"},"replyFormat":{"type":"string","enum":["pgp-mime","inline"]},"replyProvider":{"type":"string"}},"additionalProperties":false,"required":["configured","platformDomainConfigured","domains","storageUsed","storageMax","repliesAvailable"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Security Reports"],"summary":"Change a project's security.txt settings.","operationId":"api_projects_id_security-reporting_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contacts":{"type":"array","items":{"type":"string"}},"preferredLanguages":{"type":"string"},"policyUrl":{"type":"string"},"acknowledgmentsUrl":{"type":"string"}},"additionalProperties":false,"required":["contacts"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"platformDomainConfigured":{"type":"boolean"},"sealingPublicKey":{"type":"string"},"address":{"type":"string"},"contacts":{"type":"array","items":{"type":"string"}},"key":{"type":"object","properties":{"fingerprint":{"type":"string"},"url":{"type":"string"},"publicKey":{"type":"string"},"encryptedSecretKey":{"type":"string"}},"additionalProperties":false,"required":["fingerprint","publicKey","encryptedSecretKey"]},"preferredLanguages":{"type":"string"},"policyUrl":{"type":"string"},"acknowledgmentsUrl":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"storageUsed":{"type":"number"},"storageMax":{"type":"number"},"repliesAvailable":{"type":"boolean"},"replyFormat":{"type":"string","enum":["pgp-mime","inline"]},"replyProvider":{"type":"string"}},"additionalProperties":false,"required":["configured","platformDomainConfigured","domains","storageUsed","storageMax","repliesAvailable"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/security-reports":{"get":{"tags":["Security Reports"],"summary":"A project's received vulnerability reports, sealed.","description":"Newest first, at most 500. `sealedKey` opens with the project's sealing key; `sealedSummary` (base64) then opens with the result.","operationId":"api_projects_id_security-reports_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"receivedAt":{"type":"string"},"state":{"type":"string","enum":["new","triaged","resolved","spam"]},"messageBytes":{"type":"number"},"sealedKey":{"type":"string"},"sealedSummary":{"type":"string"},"stateChangedAt":{"type":"string"},"stateChangedBy":{"type":"string"}},"additionalProperties":false,"required":["id","receivedAt","state","messageBytes","sealedKey","sealedSummary"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/security-reports/{reportId}":{"put":{"tags":["Security Reports"],"summary":"Change a report's triage state.","operationId":"api_projects_id_security-reports_reportId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["new","triaged","resolved","spam"]}},"additionalProperties":false,"required":["state"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Security Reports"],"summary":"Delete a report.","operationId":"api_projects_id_security-reports_reportId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/security-reports/{reportId}/detail":{"get":{"tags":["Security Reports"],"summary":"Download one report's sealed detail.","description":"The message exactly as received (its PGP ciphertext included), wrapped under the content key in the list's `sealedKey`.","operationId":"api_projects_id_security-reports_reportId_detail_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/security-reports/{reportId}/wkd":{"post":{"tags":["Security Reports"],"summary":"Look a reply's recipient up in their domain's Web Key Directory.","description":"Fetched here rather than by the browser because a directory answers no cross-origin request; the key comes back as fetched, and the dashboard reads and judges it. The keys the report itself carried are read in the browser from the opened report.","operationId":"api_projects_id_security-reports_reportId_wkd_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"}},"additionalProperties":false,"required":["to"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["found","not-found","error","skipped"]},"url":{"type":"string"},"host":{"type":"string"},"error":{"type":"string"},"data":{"type":"string"}},"additionalProperties":false,"required":["status"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/security-reports/{reportId}/reply":{"post":{"tags":["Security Reports"],"summary":"Reply to a report.","description":"Sends from the project's report address through the platform domain's outbound account. Only to an address the report came from (its From, Reply-To or envelope sender), at most 100 per project per day. The browser encrypts and signs the reply itself: `armored` is its ciphertext, framed as `format` says (`pgp-mime` carries the subject inside, `inline` sends it in the clear; it must match the provider). `plain` sends `text` unencrypted. The copy kept for the dashboard arrives sealed to the project's sealing key.","operationId":"api_projects_id_security-reports_reportId_reply_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"},"format":{"type":"string","enum":["plain","pgp-mime","inline"]},"subject":{"type":"string"},"text":{"type":"string"},"armored":{"type":"string"},"inReplyTo":{"type":"string"},"references":{"type":"array","items":{"type":"string"}},"sealedKey":{"type":"string"},"sealedCopy":{"type":"string"},"keyFingerprint":{"type":"string"}},"additionalProperties":false,"required":["to","format","sealedKey","sealedCopy"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"encrypted":{"type":"boolean"},"subjectEncrypted":{"type":"boolean"}},"additionalProperties":false,"required":["id","encrypted","subjectEncrypted"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/security-reports/{reportId}/replies":{"get":{"tags":["Security Reports"],"summary":"The replies sent in a report's thread, sealed.","description":"Oldest first. `sealedKey` opens with the project's sealing key, `sealedBody` (base64) then opens with the result. `deliveryState` is the outbound queue's, absent once that record has been pruned.","operationId":"api_projects_id_security-reports_reportId_replies_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string"},"sentAt":{"type":"string"},"sentBy":{"type":"string"},"encrypted":{"type":"boolean"},"sealedKey":{"type":"string"},"sealedBody":{"type":"string"},"deliveryState":{"type":"string","enum":["pending","sent","failed"]},"deliveryError":{"type":"string"}},"additionalProperties":false,"required":["id","reportId","sentAt","sentBy","encrypted","sealedKey","sealedBody"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/file-drops":{"get":{"tags":["File drops"],"summary":"List a project's file drops.","operationId":"api_projects_id_file-drops_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"drops":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"sealedLink":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"closedAt":{"type":"string"},"maxBytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxFiles":{"anyOf":[{"type":"number"},{"type":"null"}]},"fileCount":{"type":"number"},"bytes":{"type":"number"},"uploading":{"type":"number"},"subscribed":{"type":"boolean"},"subscribers":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","label","sealedLink","createdBy","createdAt","expiresAt","maxBytes","maxFiles","fileCount","bytes","uploading","subscribed","subscribers"]}},"used":{"type":"number"},"quota":{"type":"number"},"maxDays":{"type":"number"},"maxFiles":{"type":"number"},"sealingPublicKey":{"type":"string"},"platformDomain":{"type":"string"}},"additionalProperties":false,"required":["drops","used","quota","maxDays","maxFiles"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["File drops"],"summary":"Create a file drop.","description":"The link token is generated by the member's browser and sent here once; only its SHA-256 is stored. `sealedLink` is the complete link sealed to the project's sealing key.","operationId":"api_projects_id_file-drops_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"expiresInDays":{"type":"number"},"maxBytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxFiles":{"anyOf":[{"type":"number"},{"type":"null"}]},"token":{"type":"string"},"sealedLink":{"type":"string"}},"additionalProperties":false,"required":["label","expiresInDays","maxBytes","maxFiles","token","sealedLink"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"expiresAt":{"type":"string"}},"additionalProperties":false,"required":["id","expiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/file-drops/{dropId}":{"put":{"tags":["File drops"],"summary":"Close a file drop to new uploads, or open it again.","operationId":"api_projects_id_file-drops_dropId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dropId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"closed":{"type":"boolean"}},"additionalProperties":false,"required":["closed"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["File drops"],"summary":"Delete a file drop and every file in it.","operationId":"api_projects_id_file-drops_dropId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dropId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/file-drops/{dropId}/subscription":{"put":{"tags":["File drops"],"summary":"Subscribe to a file drop's notifications, or unsubscribe.","description":"Applies to the caller only. Subscribers get a push when files arrive, as long as they can open the project.","operationId":"api_projects_id_file-drops_dropId_subscription_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dropId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscribed":{"type":"boolean"}},"additionalProperties":false,"required":["subscribed"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/file-drops/{dropId}/files":{"get":{"tags":["File drops"],"summary":"List the files in a file drop.","description":"Each file's sealed content key and sealed metadata (name, type, size), opened in the browser with the project's sealing key.","operationId":"api_projects_id_file-drops_dropId_files_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dropId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sealedKey":{"type":"string"},"sealedMeta":{"type":"string"},"size":{"type":"number"},"createdAt":{"type":"string"},"completedAt":{"type":"string"},"uploadedBy":{"type":"string"}},"additionalProperties":false,"required":["id","sealedKey","sealedMeta","size","createdAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["File drops"],"summary":"Start uploading a file into a file drop from the dashboard.","operationId":"api_projects_id_file-drops_dropId_files_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dropId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sealedKey":{"type":"string"},"sealedMeta":{"type":"string"},"size":{"type":"number"}},"additionalProperties":false,"required":["sealedKey","sealedMeta","size"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string"},"parts":{"type":"number"}},"additionalProperties":false,"required":["fileId","parts"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/file-drops/{dropId}/files/{fileId}/parts/{index}":{"put":{"tags":["File drops"],"summary":"Upload one part of a file from the dashboard.","operationId":"api_projects_id_file-drops_dropId_files_fileId_parts_index_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dropId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"get":{"tags":["File drops"],"summary":"Download one encrypted part of a file.","operationId":"api_projects_id_file-drops_dropId_files_fileId_parts_index_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dropId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/file-drops/{dropId}/files/{fileId}/complete":{"post":{"tags":["File drops"],"summary":"Finish uploading a file from the dashboard.","operationId":"api_projects_id_file-drops_dropId_files_fileId_complete_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dropId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/file-drops/{dropId}/files/{fileId}/shares":{"get":{"tags":["File drops"],"summary":"List a file's share links.","operationId":"api_projects_id_file-drops_dropId_files_fileId_shares_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dropId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"maxViews":{"anyOf":[{"type":"number"},{"type":"null"}]},"views":{"type":"number"},"lastViewedAt":{"type":"string"}},"additionalProperties":false,"required":["id","createdBy","createdAt","expiresAt","maxViews","views"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["File drops"],"summary":"Create a share link to one file.","description":"The browser makes the link secret and sends only the auth token derived from it plus the file's content key wrapped under the wrap key derived from it — the vault's share-link scheme. The server stores the token's SHA-256.","operationId":"api_projects_id_file-drops_dropId_files_fileId_shares_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dropId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"wrappedKey":{"type":"string"},"expiresAt":{"type":"number"},"maxViews":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false,"required":["token","wrappedKey","maxViews"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/file-drops/{dropId}/files/{fileId}/shares/{shareId}":{"delete":{"tags":["File drops"],"summary":"Revoke a share link to a file.","operationId":"api_projects_id_file-drops_dropId_files_fileId_shares_shareId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dropId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"shareId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/file-drops/{dropId}/files/{fileId}":{"delete":{"tags":["File drops"],"summary":"Delete one file from a file drop.","operationId":"api_projects_id_file-drops_dropId_files_fileId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dropId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/ticket-queues":{"get":{"tags":["Tickets"],"summary":"The project's ticket queues.","description":"Its own, its queues whose tickets go to a linked project, and linked projects' queues whose tickets come here (`side`).","operationId":"api_projects_id_ticket-queues_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"side":{"type":"string","enum":["own","delivers","receives"]},"ticketProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"homeProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"address":{"type":"string"},"emailDomainId":{"type":"string"},"defaultAssignees":{"type":"array","items":{"type":"string"}},"canReply":{"type":"boolean"},"openTickets":{"type":"integer"},"firstResponseMinutes":{"type":"integer"},"resolutionHours":{"type":"integer"},"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hourlyLimit":{"type":"integer"}},"additionalProperties":false,"required":["id","name","hourlyLimit"]}}},"additionalProperties":false,"required":["id","name","side","ticketProject","homeProject","defaultAssignees","canReply","openTickets","services"]}},"newTickets":{"type":"integer"}},"additionalProperties":false,"required":["queues","newTickets"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Tickets"],"summary":"Create a ticket queue receiving on a new address.","description":"The address is created on one of the project's email domains and must not exist yet. Mail to it, and submissions from the listed services, become tickets in this project, or in `ticketProjectId` when this project is linked to send its tickets there.","operationId":"api_projects_id_ticket-queues_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"emailDomainId":{"type":"string"},"localPart":{"type":"string"},"ticketProjectId":{"type":"string"},"defaultAssignees":{"type":"array","items":{"type":"string"}},"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"hourlyLimit":{"type":"integer"}},"additionalProperties":false,"required":["id"]}}},"additionalProperties":false,"required":["name","emailDomainId","localPart","defaultAssignees"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"}},"additionalProperties":false,"required":["id","address"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/ticket-queues/{queueId}":{"put":{"tags":["Tickets"],"summary":"Rename a ticket queue, move where its new tickets go, change who they are assigned to, or which services may submit to it.","description":"The name, services and `ticketProjectId` (where new tickets go) are the queue's own project's to change; default assignees and response-time targets are the project its tickets go to. A queue whose tickets go to a linked project is changed from both sides, each its part. Moving a queue to another project clears its default assignees and targets (the new project sets its own) and leaves the tickets it already opened where they are: they keep threading and replying from the queue's address.","operationId":"api_projects_id_ticket-queues_queueId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"queueId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"defaultAssignees":{"type":"array","items":{"type":"string"}},"firstResponseMinutes":{"type":"integer"},"resolutionHours":{"type":"integer"},"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"hourlyLimit":{"type":"integer"}},"additionalProperties":false,"required":["id"]}},"ticketProjectId":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Tickets"],"summary":"Delete a ticket queue and its address.","description":"Mail to the address is refused from then on. The queue's tickets are kept but can no longer be replied to.","operationId":"api_projects_id_ticket-queues_queueId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"queueId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/ticket-ai":{"get":{"tags":["Tickets"],"summary":"Whether AI assistance is on for the project's tickets.","operationId":"api_projects_id_ticket-ai_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"instructions":{"type":"string"},"readLogs":{"type":"boolean"},"readImages":{"type":"boolean"},"analyzeIncidents":{"type":"boolean"},"teamLanguage":{"type":"string"},"available":{"type":"boolean"},"model":{"type":"string"},"callsToday":{"type":"integer"},"dailyLimit":{"type":"integer"},"incidentCallsToday":{"type":"integer"},"incidentDailyLimit":{"type":"integer"}},"additionalProperties":false,"required":["enabled","instructions","readLogs","readImages","analyzeIncidents","teamLanguage","available","callsToday","dailyLimit","incidentCallsToday","incidentDailyLimit"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Tickets"],"summary":"Turn AI assistance for the project's tickets and incidents on or off.","description":"Turning it on lets the cluster's AI provider read the text of this project's plain tickets (never encrypted ones, attachments other than images when `readImages` is on, or addresses). `instructions` is the team's own guidance, such as tone and sign-off. `teamLanguage` is the language the team reads, as its English name: customer messages in another language are translated into it, and summaries are written in it. Unchanged when left out (English by default). `readLogs` lets the investigation search this project's logs and traces, which sends log lines and error messages to the provider (off by default; unchanged when left out). `readImages` shows the images customers attach (screenshots; never tiny logos) to the provider along with the text, which can reveal personal data and internal addresses (off by default; unchanged when left out). `analyzeIncidents` lets the AI analyse this project's new incidents with the same tools (on by default; unchanged when left out).","operationId":"api_projects_id_ticket-ai_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"instructions":{"type":"string"},"teamLanguage":{"type":"string"},"readLogs":{"type":"boolean"},"readImages":{"type":"boolean"},"analyzeIncidents":{"type":"boolean"}},"additionalProperties":false,"required":["enabled","instructions"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/ticket-labels":{"get":{"tags":["Tickets"],"summary":"Labels in use on the project's tickets.","operationId":"api_projects_id_ticket-labels_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"count":{"type":"integer"}},"additionalProperties":false,"required":["label","count"]}}},"additionalProperties":false,"required":["labels"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/ticket-lists":{"get":{"tags":["Tickets"],"summary":"The project's ticket lists (sprints, backlogs), archived last.","operationId":"api_projects_id_ticket-lists_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"lists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer"},"archived":{"type":"boolean"},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"total":{"type":"integer"},"open":{"type":"integer"}},"additionalProperties":false,"required":["id","name","position","archived","createdAt","total","open"]}}},"additionalProperties":false,"required":["lists"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Tickets"],"summary":"Create a ticket list.","operationId":"api_projects_id_ticket-lists_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/ticket-lists/{listId}":{"put":{"tags":["Tickets"],"summary":"Rename, reorder, archive or unarchive a ticket list.","operationId":"api_projects_id_ticket-lists_listId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"listId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"archived":{"type":"boolean"},"position":{"type":"integer"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Tickets"],"summary":"Delete a ticket list. Its tickets are kept.","operationId":"api_projects_id_ticket-lists_listId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"listId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/ticket-lists/{listId}/items":{"post":{"tags":["Tickets"],"summary":"Put tickets on a list, at its end.","description":"Tickets already on the list keep their place. At most 500 at a time.","operationId":"api_projects_id_ticket-lists_listId_items_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"listId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ticketIds"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"integer"}},"additionalProperties":false,"required":["added"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/ticket-lists/{listId}/items/{ticketId}":{"delete":{"tags":["Tickets"],"summary":"Take a ticket off a list.","operationId":"api_projects_id_ticket-lists_listId_items_ticketId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"listId","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Tickets"],"summary":"Move a ticket within a list.","description":"Just before `before` (another ticket on the list), or to the end when it is absent.","operationId":"api_projects_id_ticket-lists_listId_items_ticketId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"listId","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"before":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/ticket-lists/{listId}/move-unfinished":{"post":{"tags":["Tickets"],"summary":"Move every unfinished ticket of a list to another list.","description":"Every ticket on the list that is not resolved (or spam) leaves it for the end of the target list, in its order: the end of a sprint.","operationId":"api_projects_id_ticket-lists_listId_move-unfinished_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"listId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"}},"additionalProperties":false,"required":["to"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"moved":{"type":"integer"}},"additionalProperties":false,"required":["moved"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/ticket-queue-domains":{"get":{"tags":["Tickets"],"summary":"Where a new ticket queue of this project may receive and deliver.","description":"The project's own email domains (a queue's address is always on its own project's domain), and the projects its tickets may go to besides itself: those linked to receive them.","operationId":"api_projects_id_ticket-queue-domains_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"canReply":{"type":"boolean"}},"additionalProperties":false,"required":["id","domain","canReply"]}},"ticketProjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]}}},"additionalProperties":false,"required":["domains","ticketProjects"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/environment":{"put":{"tags":["Tickets"],"summary":"Say which environment this project is.","description":"Tickets in projects linked to this one show where a fix stands per environment; a project with none counts as production.","operationId":"api_projects_id_environment_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"type":"string","enum":["development","staging","production"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/project-links":{"get":{"tags":["Tickets"],"summary":"The project's environment and its links to other projects.","description":"Links where this project receives another project's tickets (and reads that project), and links where its own tickets go to another project.","operationId":"api_projects_id_project-links_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"type":"string","enum":["development","staging","production"]},"links":{"type":"array","items":{"type":"object","properties":{"ticketProjectId":{"type":"string"},"ticketProjectName":{"type":"string"},"sourceProjectId":{"type":"string"},"sourceProjectName":{"type":"string"},"sourceEnvironment":{"type":"string"},"requestedBySource":{"type":"boolean"},"requestedBy":{"type":"string"},"requestedAt":{"type":"string"},"acceptedBy":{"type":"string"},"acceptedAt":{"type":"string"}},"additionalProperties":false,"required":["ticketProjectId","ticketProjectName","sourceProjectId","sourceProjectName","requestedBySource","requestedBy","requestedAt"]}}},"additionalProperties":false,"required":["links"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Tickets"],"summary":"Ask another project for a link with this one.","description":"A link sends one project's tickets to the other: the source project's ticket queues may deliver there, the ticket project's fix tracker reads the source's deployments, and the ticket project's full members read the source project as read-only members. `ticketsGoTo` says which way: `other` sends this project's tickets to the other one, `this` receives the other's. A full member of the other project accepts; when the caller is one too, the link is accepted at once.","operationId":"api_projects_id_project-links_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"otherProjectId":{"type":"string"},"ticketsGoTo":{"type":"string","enum":["this","other"]}},"additionalProperties":false,"required":["otherProjectId","ticketsGoTo"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["requested","accepted","exists"]}},"additionalProperties":false,"required":["state"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Tickets"],"summary":"End a link, or withdraw or decline a request (either side).","description":"Refused while ticket queues still deliver through the link; delete them first.","operationId":"api_projects_id_project-links_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"otherProjectId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/project-links/accept":{"post":{"tags":["Tickets"],"summary":"Accept a link another project asked this one for.","operationId":"api_projects_id_project-links_accept_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"otherProjectId":{"type":"string"}},"additionalProperties":false,"required":["otherProjectId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/bulk":{"post":{"tags":["Tickets"],"summary":"Change several tickets at once.","description":"Status, priority, assignees (replacing them) and labels to add or remove. Each ticket is changed on its own, so one that cannot be changed is reported and the others still change.","operationId":"api_projects_id_tickets_bulk_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"assignees":{"type":"array","items":{"type":"string"}},"addLabels":{"type":"array","items":{"type":"string"}},"removeLabels":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer"},"failed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"error":{"type":"string"}},"additionalProperties":false,"required":["id","error"]}}},"additionalProperties":false,"required":["updated","failed"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/ticket-workload":{"get":{"tags":["Tickets"],"summary":"Who worked the support desk, per person.","description":"Support tickets only (tickets with a customer). For each person over the last `days` (default 90, at most 365): distinct tickets they replied to, noted on or changed the status of; tickets where theirs was the team's first reply; replies sent; tickets they resolved or canceled themselves; and, right now, unfinished tickets assigned to them. Automatic changes, the AI assistant and customers are not counted. Every current member who works tickets is listed, with zeros if need be.","operationId":"api_projects_id_ticket-workload_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"days","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"windowDays":{"type":"integer"},"users":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"ticketsWorked":{"type":"integer"},"firstResponses":{"type":"integer"},"emailsSent":{"type":"integer"},"resolved":{"type":"integer"},"openAssigned":{"type":"integer"}},"additionalProperties":false,"required":["username","ticketsWorked","firstResponses","emailsSent","resolved","openAssigned"]}}},"additionalProperties":false,"required":["windowDays","users"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets":{"get":{"tags":["Tickets"],"summary":"List the project's tickets, most recently active first.","operationId":"api_projects_id_tickets_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"active","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"queue","in":"query","required":false,"schema":{"type":"string"}},{"name":"assignee","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"priority","in":"query","required":false,"schema":{"type":"string","enum":["low","normal","high","urgent"]}},{"name":"label","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["activity","priority"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["support","development"]}},{"name":"list","in":"query","required":false,"schema":{"type":"string"}},{"name":"subtasks","in":"query","required":false,"schema":{"type":"string","enum":["all","nested"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"assignees":{"type":"array","items":{"type":"string"}},"queueId":{"type":"string"},"queueName":{"type":"string"},"customers":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"lastActivityAt":{"type":"string"},"heldCount":{"type":"integer"},"incidentCount":{"type":"integer"},"summary":{"type":"string"},"unread":{"type":"boolean"},"snoozedUntil":{"type":"string"},"firstResponseDueAt":{"type":"string"},"resolutionDueAt":{"type":"string"},"replyOwed":{"type":"boolean"},"hasCustomer":{"type":"boolean"},"delivery":{"type":"array","items":{"type":"object","properties":{"environment":{"type":"string","enum":["development","staging","production"]},"state":{"type":"string","enum":["none","partial","reached","unknown"]},"servicesWithFix":{"type":"integer"},"servicesTotal":{"type":"integer"},"reachedAt":{"type":"string"}},"additionalProperties":false,"required":["environment","state","servicesWithFix","servicesTotal"]}},"listPosition":{"type":"number"},"parentId":{"type":"string"},"parentNumber":{"type":"integer"},"subtaskCount":{"type":"integer"},"subtasksDone":{"type":"integer"}},"additionalProperties":false,"required":["id","number","subject","status","priority","labels","assignees","customers","createdAt","lastActivityAt","heldCount","incidentCount","unread","replyOwed","hasCustomer","delivery","subtaskCount","subtasksDone"]}}},"additionalProperties":false,"required":["tickets"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Tickets"],"summary":"Create a task, or a support ticket by hand.","description":"Without customers it is a task of the team's own. With customers it is a support ticket (for a customer who called or wrote somewhere else) and needs a queue: replies go out from the queue's address.","operationId":"api_projects_id_tickets_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string"},"queueId":{"type":"string"},"customers":{"type":"array","items":{"type":"string"}},"note":{"type":"string"},"description":{"type":"string"},"parentId":{"type":"string"},"listId":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"assignees":{"type":"array","items":{"type":"string"}},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["subject"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"}},"additionalProperties":false,"required":["id","number"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}":{"get":{"tags":["Tickets"],"summary":"One ticket with its people, incidents and timeline.","operationId":"api_projects_id_tickets_ticketId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"assignees":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"lastActivityAt":{"type":"string"},"closedAt":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"side":{"type":"string","enum":["own","delivers","receives"]},"ticketProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"homeProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"address":{"type":"string"},"emailDomainId":{"type":"string"},"defaultAssignees":{"type":"array","items":{"type":"string"}},"canReply":{"type":"boolean"},"openTickets":{"type":"integer"},"firstResponseMinutes":{"type":"integer"},"resolutionHours":{"type":"integer"},"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hourlyLimit":{"type":"integer"}},"additionalProperties":false,"required":["id","name","hourlyLimit"]}}},"additionalProperties":false,"required":["id","name","side","ticketProject","homeProject","defaultAssignees","canReply","openTickets","services"]},"participants":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"role":{"type":"string","enum":["customer","cc"]},"addedAt":{"type":"string"},"addedBy":{"type":"string"}},"additionalProperties":false,"required":["address","role","addedAt"]}},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"severity":{"type":"string"},"linkedAt":{"type":"string"},"statusUrl":{"type":"string"}},"additionalProperties":false,"required":["id","title","status","severity","linkedAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"at":{"type":"string"},"actor":{"type":"string"},"held":{"type":"boolean"},"fromAddress":{"type":"string"},"fromName":{"type":"string"},"toAddresses":{"type":"array","items":{"type":"string"}},"ccAddresses":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"bodyText":{"type":"string"},"shared":{"type":"object","properties":{"recipient":{"type":"string"},"label":{"type":"string"}},"additionalProperties":false},"hasRaw":{"type":"boolean"},"service":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"context":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["key","value"]}},"automatic":{"type":"boolean"},"auth":{"type":"object","properties":{"spf":{"type":"string"},"dkim":{"type":"string"},"dmarc":{"type":"string"}},"additionalProperties":false,"required":["spf","dkim","dmarc"]},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"}},"additionalProperties":false,"required":["filename","contentType","size"]}},"from":{"type":"string"},"to":{"type":"string"},"added":{"type":"array","items":{"type":"string"}},"removed":{"type":"array","items":{"type":"string"}},"address":{"type":"string"},"role":{"type":"string"},"change":{"type":"string"},"until":{"type":"string"},"environment":{"type":"string"},"list":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"from":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"incidentId":{"type":"string"},"incidentTitle":{"type":"string"},"via":{"type":"string"},"fix":{"type":"object","properties":{"repo":{"type":"string"},"number":{"type":"integer"},"sha":{"type":"string"},"pull":{"type":"integer"},"service":{"type":"string"},"revision":{"type":"string"}},"additionalProperties":false,"required":["repo","number","sha","service","revision"]},"related":{"type":"object","properties":{"ticketId":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"reason":{"type":"string"},"in":{"type":"string"}},"additionalProperties":false,"required":["ticketId","number","subject"]},"parent":{"type":"object","properties":{"to":{"type":"object","properties":{"ticketId":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"}},"additionalProperties":false,"required":["ticketId","number","subject"]},"from":{"type":"object","properties":{"ticketId":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"}},"additionalProperties":false,"required":["ticketId","number","subject"]}},"additionalProperties":false},"merge":{"type":"object","properties":{"direction":{"type":"string"},"ticketId":{"type":"string"},"number":{"type":"integer"},"added":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["direction"]},"forgejo":{"type":"object","properties":{"type":{"type":"string"},"repo":{"type":"string"},"number":{"type":"integer"},"url":{"type":"string"},"by":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"state":{"type":"string"},"action":{"type":"string"},"verdict":{"type":"string"},"isPull":{"type":"boolean"},"issue":{"type":"integer"},"created":{"type":"boolean"}},"additionalProperties":false,"required":["type","repo","number","url"]},"note":{"type":"string"},"imported":{"type":"object","properties":{"source":{"type":"string"},"author":{"type":"string"}},"additionalProperties":false,"required":["source"]},"digest":{"type":"object","properties":{"gist":{"type":"string"},"translation":{"type":"string"},"effects":{"type":"array","items":{"type":"string","enum":["new_request","more_info","answers_us","still_broken","works_now","thanks","asks_update","unhappy","new_topic"]}},"asks":{"type":"array","items":{"type":"string"}},"language":{"type":"string"}},"additionalProperties":false,"required":["gist","translation","effects","asks","language"]},"assistant":{"type":"object","properties":{"trigger":{"type":"string","enum":["analysis","mention","rewrite"]},"actions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["priority","labels","incident","ticket","issue","issue_created","draft","description","failed"]},"priority":{"type":"string"},"added":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"title":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"ref":{"type":"string"},"url":{"type":"string"},"isPull":{"type":"boolean"},"eventId":{"type":"string"},"what":{"type":"string"},"error":{"type":"string"}},"additionalProperties":false,"required":["kind"]}},"services":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["trigger","actions","services"]},"draft":{"type":"object","properties":{"state":{"type":"string","enum":["pending","sending","sent","denied"]},"warnings":{"type":"array","items":{"type":"string"}},"decidedBy":{"type":"string"},"decidedAt":{"type":"string"},"reason":{"type":"string"},"editedBy":{"type":"string"},"replyEventId":{"type":"string"},"nextStatus":{"type":"string","enum":["open","waiting","resolved"]},"nextStatusReason":{"type":"string"}},"additionalProperties":false,"required":["state","warnings"]},"translation":{"type":"object","properties":{"translation":{"type":"string"},"language":{"type":"string"}},"additionalProperties":false,"required":["translation","language"]},"delivery":{"type":"object","properties":{"state":{"type":"string"},"attempts":{"type":"integer"},"lastError":{"type":"string"},"completedAt":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"event":{"type":"string"},"recipient":{"type":"string"},"diagnostic":{"type":"string"}},"additionalProperties":false,"required":["at","event"]}}},"additionalProperties":false,"required":["state","attempts","events"]}},"additionalProperties":false,"required":["id","kind","at","held","toAddresses","ccAddresses","hasRaw"]}},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"related":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"linkedBy":{"type":"string"},"reason":{"type":"string"},"linkedAt":{"type":"string"}},"additionalProperties":false,"required":["id","number","subject","status","linkedAt"]}},"snoozedUntil":{"type":"string"},"firstResponseDueAt":{"type":"string"},"resolutionDueAt":{"type":"string"},"replyOwed":{"type":"boolean"},"hasCustomer":{"type":"boolean"},"delivery":{"type":"array","items":{"type":"object","properties":{"environment":{"type":"string","enum":["development","staging","production"]},"state":{"type":"string","enum":["none","partial","reached","unknown"]},"servicesWithFix":{"type":"integer"},"servicesTotal":{"type":"integer"},"reachedAt":{"type":"string"}},"additionalProperties":false,"required":["environment","state","servicesWithFix","servicesTotal"]}},"lists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"}},"additionalProperties":false,"required":["id","name","archived"]}},"description":{"type":"string"},"descriptionUpdatedAt":{"type":"string"},"descriptionUpdatedBy":{"type":"string"},"parent":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]}},"additionalProperties":false,"required":["id","number","subject","status"]},"subtasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"assignees":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","number","subject","status","assignees"]}},"lastReadAt":{"type":"string"},"ai":{"type":"object","properties":{"enabled":{"type":"boolean"},"available":{"type":"boolean"},"teamLanguage":{"type":"string"},"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trigger":{"type":"string","enum":["analysis","mention","rewrite"]},"sourceEventId":{"type":"string"},"requestedBy":{"type":"string"},"status":{"type":"string","enum":["pending","running","done","failed"]},"attempts":{"type":"integer"},"error":{"type":"string"},"createdAt":{"type":"string"},"startedAt":{"type":"string"}},"additionalProperties":false,"required":["id","trigger","status","attempts","createdAt"]}}},"additionalProperties":false,"required":["enabled","available","teamLanguage","jobs"]},"issues":{"type":"array","items":{"type":"object","properties":{"repo":{"type":"string"},"number":{"type":"integer"},"title":{"type":"string"},"url":{"type":"string"},"isPull":{"type":"boolean"},"state":{"type":"string"},"createdHere":{"type":"boolean"},"linkedAt":{"type":"string"},"linkedBy":{"type":"string"}},"additionalProperties":false,"required":["repo","number","title","url","isPull","state","createdHere","linkedAt"]}},"forgejo":{"type":"object","properties":{"connected":{"type":"boolean"},"defaultRepo":{"type":"string"}},"additionalProperties":false,"required":["connected"]}},"additionalProperties":false,"required":["id","number","subject","status","assignees","createdAt","lastActivityAt","participants","incidents","events","priority","labels","related","replyOwed","hasCustomer","delivery","lists","description","subtasks","ai","issues","forgejo"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Tickets"],"summary":"Change a ticket's status, priority, labels, assignees or subject.","operationId":"api_projects_id_tickets_ticketId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"assignees":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"snoozedUntil":{"type":"string"},"description":{"type":"string"},"descriptionBase":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Tickets"],"summary":"Delete a ticket and the messages kept for it.","operationId":"api_projects_id_tickets_ticketId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/read":{"post":{"tags":["Tickets"],"summary":"Record that the caller has looked at a ticket.","operationId":"api_projects_id_tickets_ticketId_read_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/reply-waived":{"post":{"tags":["Tickets"],"summary":"Say that the customer needs no reply for the ticket's latest automatic move to fixed or resolved.","description":"Clears `replyOwed`. Refused when the ticket owes no reply, so nothing is recorded twice.","operationId":"api_projects_id_tickets_ticketId_reply-waived_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/fixes":{"get":{"tags":["Tickets"],"summary":"Whether the fixes for the ticket's linked Forgejo issues and pull requests run where its customers are.","description":"For each linked issue: the merge commits of the pull requests that fixed it (for a linked pull request, its own merge commit), of the pull requests that fixed it, and for each service built from its repository whether every running container's image contains the commit (read from the image's `org.opencontainers.image.revision` label). `targets` are the services that decide the ticket; `verdict` is `live` once every fix runs on every target.","operationId":"api_projects_id_tickets_ticketId_fixes_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string","enum":["none","open","live","waiting","unknown"]},"reasons":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"repo":{"type":"string"},"number":{"type":"integer"},"isPull":{"type":"boolean"},"state":{"type":"string","enum":["open","closed","merged"]},"title":{"type":"string"},"url":{"type":"string"},"targets":{"type":"array","items":{"type":"string"}},"others":{"type":"array","items":{"type":"string"}},"environments":{"type":"object","additionalProperties":{"type":"string","enum":["development","staging","production"]}},"fixes":{"type":"array","items":{"type":"object","properties":{"sha":{"type":"string"},"pull":{"type":"integer"},"url":{"type":"string"},"addedBy":{"type":"string"},"mergedAt":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string"},"state":{"type":"string","enum":["live","pending","deploying","unknown"]},"since":{"type":"string"},"revision":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["service","state"]}}},"additionalProperties":false,"required":["sha","services"]}}},"additionalProperties":false,"required":["repo","number","isPull","state","title","url","targets","others","environments","fixes"]}},"delivery":{"type":"array","items":{"type":"object","properties":{"environment":{"type":"string","enum":["development","staging","production"]},"state":{"type":"string","enum":["none","partial","reached","unknown"]},"servicesWithFix":{"type":"integer"},"servicesTotal":{"type":"integer"},"reachedAt":{"type":"string"}},"additionalProperties":false,"required":["environment","state","servicesWithFix","servicesTotal"]}}},"additionalProperties":false,"required":["verdict","reasons","issues","delivery"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Tickets"],"summary":"Say which pull request fixes a linked Forgejo issue.","description":"For when the developers named the fix in a comment rather than with a closing keyword (`fixes #12`) in the pull request. The pull request is in the issue's repository and must be merged: its merge commit is what the deploy check looks for. The fix is recorded for the issue, so every ticket linking it sees it.","operationId":"api_projects_id_tickets_ticketId_fixes_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string"},"issue":{"type":"integer"},"pull":{"type":"integer","minimum":1}},"additionalProperties":false,"required":["repo","issue","pull"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"sha":{"type":"string"}},"additionalProperties":false,"required":["sha"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Tickets"],"summary":"Say a recorded fix does not fix a linked Forgejo issue.","description":"For a pull request that only mentioned the issue. The deploy check stops waiting for its commit, on every ticket linking the issue; a webhook redelivery does not bring it back, adding it by hand does.","operationId":"api_projects_id_tickets_ticketId_fixes_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repo","in":"query","required":true,"schema":{"type":"string"}},{"name":"issue","in":"query","required":true,"schema":{"type":"integer"}},{"name":"sha","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/drafts/{eventId}":{"put":{"tags":["Tickets"],"summary":"Change the text of a reply draft the AI assistant wrote.","description":"Only while it waits for approval. The text is what the customer will receive when it is approved; its translation into the team's language is written again.","operationId":"api_projects_id_tickets_ticketId_drafts_eventId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}},"additionalProperties":false,"required":["text"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/drafts/{eventId}/approve":{"post":{"tags":["Tickets"],"summary":"Approve a reply draft the AI assistant wrote, and send it.","description":"Sends the draft's text, as it stands, to the ticket's customers from the queue's address — or only to the `recipients` given (each must be on the ticket) — exactly like a reply written by hand, from the approving member. `status` optionally changes the ticket's status in the same step.","operationId":"api_projects_id_tickets_ticketId_drafts_eventId_approve_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"recipients":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string"}},"additionalProperties":false,"required":["eventId"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/drafts/{eventId}/deny":{"post":{"tags":["Tickets"],"summary":"Reject a reply draft the AI assistant wrote.","description":"The draft is never sent. It stays in the thread, folded away. With a `reason`, the assistant writes a new draft at once that follows it (`rewrite` is true when that run was queued; false when AI is off for the project). Without one nothing more happens, though the assistant still reads the rejected draft the next time it runs on this ticket.","operationId":"api_projects_id_tickets_ticketId_drafts_eventId_deny_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rewrite":{"type":"boolean"}},"additionalProperties":false,"required":["rewrite"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/links":{"post":{"tags":["Tickets"],"summary":"Link a related ticket.","description":"`ticket` is the other ticket's id or its number (`#12` or `12`). Both tickets show the link, and each hears when the other is resolved. Nothing moves between them and nothing is sent to anyone.","operationId":"api_projects_id_tickets_ticketId_links_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["ticket"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"number":{"type":"integer"}},"additionalProperties":false,"required":["ticketId","number"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/links/{otherId}":{"delete":{"tags":["Tickets"],"summary":"Remove the link between two tickets.","description":"Both tickets show that the link was removed. The AI assistant never links the pair again.","operationId":"api_projects_id_tickets_ticketId_links_otherId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"otherId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/shares":{"get":{"tags":["Tickets"],"summary":"Who a ticket is shared with: people and links.","operationId":"api_projects_id_tickets_ticketId_shares_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","link"]},"recipient":{"type":"string"},"label":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"},"active":{"type":"boolean"}},"additionalProperties":false,"required":["id","kind","createdBy","createdAt","expiresAt","active"]}}},"additionalProperties":false,"required":["shares"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Tickets"],"summary":"Share a ticket read-only with a person (a username or an email address) or through a link. A link's token is returned ONCE.","operationId":"api_projects_id_tickets_ticketId_shares_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipient":{"type":"string","maxLength":254},"label":{"type":"string","maxLength":100},"expiresInDays":{"type":"integer","minimum":1}},"additionalProperties":false,"required":["expiresInDays"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"share":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["user","link"]},"recipient":{"type":"string"},"label":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"},"active":{"type":"boolean"}},"additionalProperties":false,"required":["id","kind","createdBy","createdAt","expiresAt","active"]},"token":{"type":"string"}},"additionalProperties":false,"required":["share"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/shares/{shareId}":{"delete":{"tags":["Tickets"],"summary":"Revoke a share of a ticket, whoever made it.","operationId":"api_projects_id_tickets_ticketId_shares_shareId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"shareId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/notes":{"post":{"tags":["Tickets"],"summary":"Add an internal note. Notes are never sent to anyone.","operationId":"api_projects_id_tickets_ticketId_notes_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}},"additionalProperties":false,"required":["text"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/reply":{"post":{"tags":["Tickets"],"summary":"Reply to the ticket's customers by email.","description":"Sent from the queue's address to every customer, with the ticket's CCs copied, or only to the `recipients` given (each must be on the ticket). `status` optionally changes the ticket's status in the same step (usually `waiting` or `resolved`).","operationId":"api_projects_id_tickets_ticketId_reply_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"recipients":{"type":"array","items":{"type":"string"}},"note":{"type":"string"}},"additionalProperties":false,"required":["text"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string"}},"additionalProperties":false,"required":["eventId"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/reply/preview":{"post":{"tags":["Tickets"],"summary":"Show exactly what a reply would email, without sending it.","description":"Sender, recipients, subject and the full text — the reply followed by the quoted customer message, as `reply` would send it. Give `text` (with `recipients` as for `reply`), or `draftEventId` for an AI reply draft as it stands now (with the `recipients` its approval would carry). `refused` says why it would not be sent.","operationId":"api_projects_id_tickets_ticketId_reply_preview_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"draftEventId":{"type":"string"},"recipients":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"refused":{"type":"string"},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"text":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/participants":{"post":{"tags":["Tickets"],"summary":"Add someone to a ticket, or change their role.","description":"A `customer` receives every reply; a `cc` receives a copy. Mail from someone not on the ticket is held until a member accepts it.","operationId":"api_projects_id_tickets_ticketId_participants_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"role":{"type":"string","enum":["customer","cc"]}},"additionalProperties":false,"required":["address","role"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"}},"additionalProperties":false,"required":["address"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Tickets"],"summary":"Remove someone from a ticket.","operationId":"api_projects_id_tickets_ticketId_participants_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"address","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/incidents":{"post":{"tags":["Tickets"],"summary":"Reference one of the project's incidents from a ticket.","description":"The ticket then shows the incident, the incident lists the ticket, and every status change of the incident is recorded on the ticket.","operationId":"api_projects_id_tickets_ticketId_incidents_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"incidentId":{"type":"string"}},"additionalProperties":false,"required":["incidentId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/incidents/{incidentId}":{"delete":{"tags":["Tickets"],"summary":"Remove an incident reference from a ticket.","operationId":"api_projects_id_tickets_ticketId_incidents_incidentId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/events/{eventId}/accept":{"post":{"tags":["Tickets"],"summary":"Accept a held message, adding its sender to the ticket.","operationId":"api_projects_id_tickets_ticketId_events_eventId_accept_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["customer","cc"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/events/{eventId}/raw":{"get":{"tags":["Tickets"],"summary":"Download a received message as it arrived (.eml).","operationId":"api_projects_id_tickets_ticketId_events_eventId_raw_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/events/{eventId}/attachments/{index}/preview":{"get":{"tags":["Tickets"],"summary":"Show one image attachment of a received message in the browser.","description":"Only PNG, JPEG, GIF and WebP, recognised by the file's bytes (never by what the sender called it); anything else, SVG included, is refused and has to be downloaded.","operationId":"api_projects_id_tickets_ticketId_events_eventId_attachments_index_preview_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/events/{eventId}/attachments/{index}":{"get":{"tags":["Tickets"],"summary":"Download one attachment of a received message.","operationId":"api_projects_id_tickets_ticketId_events_eventId_attachments_index_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/forgejo/issues":{"post":{"tags":["Tickets"],"summary":"Open a Forgejo issue for a ticket.","description":"The title and description are exactly what is sent, with a link back to the ticket appended. Nothing is copied from the ticket by the server.","operationId":"api_projects_id_tickets_ticketId_forgejo_issues_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}},"additionalProperties":false,"required":["repo","title","body"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string"},"number":{"type":"integer"},"title":{"type":"string"},"url":{"type":"string"},"isPull":{"type":"boolean"},"state":{"type":"string"},"createdHere":{"type":"boolean"},"linkedAt":{"type":"string"},"linkedBy":{"type":"string"}},"additionalProperties":false,"required":["repo","number","title","url","isPull","state","createdHere","linkedAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Tickets"],"summary":"Remove a Forgejo issue or pull request from a ticket.","description":"Only the link goes; the issue or pull request stays in Forgejo, and its events stop appearing on the ticket.","operationId":"api_projects_id_tickets_ticketId_forgejo_issues_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repo","in":"query","required":true,"schema":{"type":"string"}},{"name":"number","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tickets/{ticketId}/forgejo/link":{"post":{"tags":["Tickets"],"summary":"Link an existing Forgejo issue or pull request to a ticket.","description":"A linked pull request counts as done for the ticket once it is merged (one closed without merging does not), and its merge commit is what the deploy check looks for.","operationId":"api_projects_id_tickets_ticketId_forgejo_link_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ticketId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"string"}},"additionalProperties":false,"required":["reference"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string"},"number":{"type":"integer"},"title":{"type":"string"},"url":{"type":"string"},"isPull":{"type":"boolean"},"state":{"type":"string"},"createdHere":{"type":"boolean"},"linkedAt":{"type":"string"},"linkedBy":{"type":"string"}},"additionalProperties":false,"required":["repo","number","title","url","isPull","state","createdHere","linkedAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/forgejo":{"get":{"tags":["Tickets"],"summary":"The project's Forgejo connection.","description":"Never includes the access token or the webhook secret. Absent when the project is not connected.","operationId":"api_projects_id_forgejo_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"connection":{"type":"object","properties":{"baseUrl":{"type":"string"},"login":{"type":"string"},"defaultRepo":{"type":"string"},"webhookUrl":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"}},"additionalProperties":false,"required":["baseUrl","login","createdAt"]}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Tickets"],"summary":"Connect the project to a Forgejo, or change the connection.","description":"The token is tried against the instance first and nothing is saved when it is refused. The webhook secret is generated here and returned only the first time (or when rotated): copy it into Forgejo's webhook.","operationId":"api_projects_id_forgejo_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"baseUrl":{"type":"string"},"token":{"type":"string"},"defaultRepo":{"type":"string"},"rotateSecret":{"type":"boolean"}},"additionalProperties":false,"required":["baseUrl"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"webhookSecret":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Tickets"],"summary":"Disconnect the project from its Forgejo.","description":"Linked issues stay on their tickets, but Forgejo's events stop arriving.","operationId":"api_projects_id_forgejo_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/forgejo/repos":{"get":{"tags":["Tickets"],"summary":"Repositories the connected token can see.","operationId":"api_projects_id_forgejo_repos_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"repos":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["repos"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/imports":{"get":{"tags":["Tickets"],"summary":"The project's recent task imports and their progress.","operationId":"api_projects_id_imports_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"imports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string"},"sourceName":{"type":"string"},"state":{"type":"string","enum":["running","done","failed"]},"phase":{"type":"string"},"tasksFound":{"type":"integer"},"tasksCreated":{"type":"integer"},"tasksSkipped":{"type":"integer"},"listsCreated":{"type":"integer"},"commentsCreated":{"type":"integer"},"error":{"type":"string"},"startedBy":{"type":"string"},"startedAt":{"type":"string"},"finishedAt":{"type":"string"}},"additionalProperties":false,"required":["id","source","sourceName","state","tasksFound","tasksCreated","tasksSkipped","listsCreated","commentsCreated","startedBy","startedAt"]}}},"additionalProperties":false,"required":["imports"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/imports/clickup/browse":{"post":{"tags":["Tickets"],"summary":"What a ClickUp token can see: workspaces, spaces and members.","description":"The token is used for this request only and not stored. Each ClickUp member carries the project member they probably are (`suggested`), matched by username or the local part of their email.","operationId":"api_projects_id_imports_clickup_browse_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"additionalProperties":false,"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"spaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]}},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"email":{"type":"string"},"suggested":{"type":"string"}},"additionalProperties":false,"required":["id","username","email"]}}},"additionalProperties":false,"required":["id","name","spaces","members"]}},"members":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["workspaces","members"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/imports/clickup":{"post":{"tags":["Tickets"],"summary":"Import a ClickUp space into the project's tasks.","description":"Runs in the background; follow it with GET /imports. Each ClickUp list becomes a list, each task a task (subtasks under their parents), comments become internal notes. Tasks an earlier import already brought are skipped, not updated. The token is held in memory for the run and never stored.","operationId":"api_projects_id_imports_clickup_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"workspaceId":{"type":"string"},"spaceId":{"type":"string"},"userMap":{"type":"object","additionalProperties":{"type":"string"}},"includeClosed":{"type":"boolean"},"includeComments":{"type":"boolean"}},"additionalProperties":false,"required":["token","workspaceId","spaceId","userMap","includeClosed","includeComments"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/dmarc":{"get":{"tags":["Projects"],"summary":"DMARC aggregate-report summary for a project (and a domain).","operationId":"api_projects_id_dmarc_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","description":"How far back to aggregate (default 30d).","required":false,"schema":{"type":"string","enum":["7d","30d","90d"],"description":"How far back to aggregate (default 30d)."}},{"name":"domain","in":"query","description":"Domain to report on; omit to just list domains.","required":false,"schema":{"type":"string","description":"Domain to report on; omit to just list domains."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"string"},"description":"DMARC-enabled domains in this project."},"postures":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"spf":{"type":"boolean","description":"An SPF policy is published."},"dkim":{"type":"boolean","description":"A DKIM selector is published."},"dmarc":{"type":"string","enum":["reject","quarantine","none","absent"],"description":"Effective DMARC policy."},"mtaSts":{"type":"string","enum":["enforce","testing","none","absent"],"description":"Effective MTA-STS mode."}},"additionalProperties":false,"required":["domain","spf","dkim","dmarc","mtaSts"]},"description":"Mail-auth posture per domain, for the domain list."},"domain":{"type":"string","description":"The domain reported on."},"timeseries":{"type":"array","items":{"type":"object","properties":{"date":{"type":"number","description":"Day bucket, epoch ms (UTC)."},"total":{"type":"number"},"dkimPass":{"type":"number"},"spfPass":{"type":"number"},"dmarcPass":{"type":"number"}},"additionalProperties":false,"required":["date","total","dkimPass","spfPass","dmarcPass"]}},"services":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string","description":"Sending service — the source IP's reverse-DNS provider."},"total":{"type":"number"},"dmarcPass":{"type":"number"},"spfPass":{"type":"number"},"dkimPass":{"type":"number"},"ipCount":{"type":"number"},"sources":{"type":"array","items":{"type":"object","properties":{"sourceIp":{"type":"string"},"total":{"type":"number"},"dmarcPass":{"type":"number"},"dmarcFail":{"type":"number"},"dkimPass":{"type":"number"},"spfPass":{"type":"number"}},"additionalProperties":false,"required":["sourceIp","total","dmarcPass","dmarcFail","dkimPass","spfPass"]},"description":"Source IPs grouped under this sending service."}},"additionalProperties":false,"required":["service","total","dmarcPass","spfPass","dkimPass","ipCount","sources"]}}},"additionalProperties":false,"required":["domains","postures","timeseries","services"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/email-overview":{"get":{"tags":["Projects"],"summary":"Delivery, DMARC, Gmail and TLS-RPT overview of a project's mail.","operationId":"api_projects_id_email-overview_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","description":"How far back to report (default 30d).","required":false,"schema":{"type":"string","enum":["7d","30d","90d"],"description":"How far back to report (default 30d)."}},{"name":"domain","in":"query","description":"Limit everything to one domain of the project.","required":false,"schema":{"type":"string","description":"Limit everything to one domain of the project."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"postmasterConnected":{"type":"boolean"},"domain":{"type":"string","description":"The domain reported on; absent = all domains."},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"emailDomainId":{"type":"string","description":"Set when the domain is an email domain."},"outboundProvider":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["type","name"],"description":"The outbound account this domain sends through."},"delivery":{"type":"object","properties":{"recipients":{"type":"integer"},"delivered":{"type":"integer","description":"Accepted by the recipient's server, minus later bounces."},"bounced":{"type":"integer","description":"Hard bounces, at send time or reported afterwards."},"failed":{"type":"integer","description":"Given up on without a hard bounce (deferrals, errors)."},"pending":{"type":"integer","description":"Still being retried."},"complaints":{"type":"integer","description":"Marked as spam by the recipient."}},"additionalProperties":false,"required":["recipients","delivered","bounced","failed","pending","complaints"]},"dmarcTotal":{"type":"integer"},"dmarcPass":{"type":"integer"},"failingSenders":{"type":"integer","description":"DMARC sources failing for this domain."},"gmailSpamRate":{"type":"number","description":"Gmail's newest reported spam rate (fraction)."},"gmailDeliveryErrorRate":{"type":"number"},"gmailDay":{"type":"number","description":"Day of those, epoch ms."},"tlsSuccess":{"type":"integer"},"tlsFailure":{"type":"integer"}},"additionalProperties":false,"required":["domain","delivery","dmarcTotal","dmarcPass","failingSenders","tlsSuccess","tlsFailure"]},"description":"The project's domains that have any mail activity."},"delivery":{"type":"object","properties":{"totals":{"type":"object","properties":{"recipients":{"type":"integer"},"delivered":{"type":"integer","description":"Accepted by the recipient's server, minus later bounces."},"bounced":{"type":"integer","description":"Hard bounces, at send time or reported afterwards."},"failed":{"type":"integer","description":"Given up on without a hard bounce (deferrals, errors)."},"pending":{"type":"integer","description":"Still being retried."},"complaints":{"type":"integer","description":"Marked as spam by the recipient."}},"additionalProperties":false,"required":["recipients","delivered","bounced","failed","pending","complaints"]},"timeseries":{"type":"array","items":{"type":"object","properties":{"date":{"type":"number","description":"Day, epoch ms (UTC)."},"delivered":{"type":"integer"},"bounced":{"type":"integer"},"failed":{"type":"integer"},"pending":{"type":"integer"},"complaints":{"type":"integer"}},"additionalProperties":false,"required":["date","delivered","bounced","failed","pending","complaints"]}}},"additionalProperties":false,"required":["totals","timeseries"]},"dmarc":{"type":"object","properties":{"timeseries":{"type":"array","items":{"type":"object","properties":{"date":{"type":"number"},"total":{"type":"integer"},"dmarcPass":{"type":"integer"}},"additionalProperties":false,"required":["date","total","dmarcPass"]}},"senders":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string"},"domain":{"type":"string"},"kind":{"type":"string","enum":["outbound","authorized","failing"]},"total":{"type":"integer"},"dmarcPass":{"type":"integer"},"ipCount":{"type":"integer"}},"additionalProperties":false,"required":["service","domain","kind","total","dmarcPass","ipCount"]},"description":"DMARC sources per sending service and domain."}},"additionalProperties":false,"required":["timeseries","senders"]},"recentBounces":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"recipient":{"type":"string"},"sender":{"type":"string"},"source":{"type":"string"},"event":{"type":"string"},"diagnostic":{"type":"string"}},"additionalProperties":false,"required":["at","sender","source","event"]}},"checks":{"type":"object","properties":{"checked":{"type":"integer"},"withProblems":{"type":"integer"}},"additionalProperties":false,"required":["checked","withProblems"]}},"additionalProperties":false,"required":["postmasterConnected","domains","delivery","dmarc","recentBounces","checks"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/mail-checks":{"get":{"tags":["Projects"],"summary":"Sending checks on the mail a project's services sent.","operationId":"api_projects_id_mail-checks_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","description":"How far back to report (default 7d).","required":false,"schema":{"type":"string","enum":["24h","7d","30d"],"description":"How far back to report (default 7d)."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"checked":{"type":"integer","description":"Messages checked in the range."},"withProblems":{"type":"integer","description":"Checked messages with at least one warning or error."},"unreadable":{"type":"integer","description":"Messages the checks could not parse."},"rules":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"messages":{"type":"integer"},"lastSeen":{"type":"string","format":"date-time"},"senders":{"type":"array","items":{"type":"string"},"description":"Up to five sender addresses with this finding."},"example":{"type":"object","properties":{"id":{"type":"string"},"sender":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"details":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","sender","createdAt"]}},"additionalProperties":false,"required":["rule","messages","lastSeen","senders","example"]}},"senders":{"type":"array","items":{"type":"object","properties":{"sender":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"checked":{"type":"integer"},"withProblems":{"type":"integer"}},"additionalProperties":false,"required":["sender","checked","withProblems"]}},"latest":{"type":"object","properties":{"id":{"type":"string"},"sender":{"type":"string"},"serviceName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lint":{"type":"object","properties":{"v":{"type":"integer"},"findings":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["rule"]}},"error":{"type":"string","description":"Set when the message could not be checked."}},"additionalProperties":false,"required":["v","findings"]}},"additionalProperties":false,"required":["id","sender","createdAt","lint"],"description":"The newest checked message, for a one-message view."}},"additionalProperties":false,"required":["checked","withProblems","unreadable","rules","senders"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/postmaster":{"get":{"tags":["Projects"],"summary":"Gmail (Google Postmaster Tools) statistics for a project.","operationId":"api_projects_id_postmaster_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","description":"How far back to report (default 30d).","required":false,"schema":{"type":"string","enum":["7d","30d","90d"],"description":"How far back to report (default 30d)."}},{"name":"domain","in":"query","description":"Domain to report on; omit to just list domains.","required":false,"schema":{"type":"string","description":"Domain to report on; omit to just list domains."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"type":"boolean","description":"An admin has connected the cluster to Google Postmaster Tools."},"domains":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"enrolled":{"type":"boolean","description":"Added to Postmaster Tools (the domain needs an outbound account)."},"verified":{"type":"boolean"},"lastError":{"type":"string"},"statsFetchedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["domain","enrolled","verified"]},"description":"Sending email domains in this project."},"domain":{"type":"string"},"timeseries":{"type":"array","items":{"type":"object","properties":{"date":{"type":"number","description":"Day, epoch ms (UTC)."},"spamRate":{"type":"number"},"spfRate":{"type":"number"},"dkimRate":{"type":"number"},"dmarcRate":{"type":"number"},"tlsRate":{"type":"number"},"deliveryErrorRate":{"type":"number"}},"additionalProperties":false,"required":["date"]},"description":"Rates are fractions of the day's mail to Gmail."},"compliance":{"type":"object","properties":{"requirements":{"type":"array","items":{"type":"object","properties":{"requirement":{"type":"string"},"state":{"type":"string","enum":["compliant","needs_work","unknown"]}},"additionalProperties":false,"required":["requirement","state"]}},"oneClickUnsubscribe":{"type":"object","properties":{"state":{"type":"string","enum":["compliant","needs_work","unknown"]},"reason":{"type":"string"}},"additionalProperties":false,"required":["state"]},"honorUnsubscribe":{"type":"object","properties":{"state":{"type":"string","enum":["compliant","needs_work","unknown"]},"reason":{"type":"string"}},"additionalProperties":false,"required":["state"]},"deliverability":{"type":"object","properties":{"state":{"type":"string","enum":["compliant","needs_work","unknown"]},"reason":{"type":"string"}},"additionalProperties":false,"required":["state"]}},"additionalProperties":false,"required":["requirements"]}},"additionalProperties":false,"required":["connected","domains","timeseries"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/tlsrpt":{"get":{"tags":["Projects"],"summary":"TLS-RPT report summary for a project (and a domain).","operationId":"api_projects_id_tlsrpt_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","description":"How far back to aggregate (default 30d).","required":false,"schema":{"type":"string","enum":["7d","30d","90d"],"description":"How far back to aggregate (default 30d)."}},{"name":"domain","in":"query","description":"Domain to report on; omit to just list domains.","required":false,"schema":{"type":"string","description":"Domain to report on; omit to just list domains."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"string"},"description":"TLS-RPT-enabled domains in this project."},"postures":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"spf":{"type":"boolean","description":"An SPF policy is published."},"dkim":{"type":"boolean","description":"A DKIM selector is published."},"dmarc":{"type":"string","enum":["reject","quarantine","none","absent"],"description":"Effective DMARC policy."},"mtaSts":{"type":"string","enum":["enforce","testing","none","absent"],"description":"Effective MTA-STS mode."}},"additionalProperties":false,"required":["domain","spf","dkim","dmarc","mtaSts"]},"description":"Mail-auth posture per domain, for the domain list."},"domain":{"type":"string","description":"The domain reported on."},"timeseries":{"type":"array","items":{"type":"object","properties":{"date":{"type":"number","description":"Day bucket, epoch ms (UTC)."},"success":{"type":"number","description":"Successful TLS sessions."},"failure":{"type":"number","description":"Failed TLS sessions."}},"additionalProperties":false,"required":["date","success","failure"]}},"resultTypes":{"type":"array","items":{"type":"object","properties":{"resultType":{"type":"string","description":"TLS failure category, e.g. starttls-not-supported."},"count":{"type":"number","description":"Failed sessions of this type."},"ipCount":{"type":"number","description":"Distinct sending IPs seen."}},"additionalProperties":false,"required":["resultType","count","ipCount"]}},"sources":{"type":"array","items":{"type":"object","properties":{"sourceIp":{"type":"string","description":"Sending MTA IP."},"provider":{"type":"string","description":"Resolved sending service (reverse DNS)."},"failure":{"type":"number","description":"Failed sessions from this IP."}},"additionalProperties":false,"required":["sourceIp","provider","failure"]}}},"additionalProperties":false,"required":["domains","postures","timeseries","resultTypes","sources"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/query":{"post":{"tags":["Projects"],"summary":"Run ad-hoc PromQL for custom dashboard panels (project-scoped).","operationId":"api_projects_id_query_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"queries":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"expr":{"type":"string"},"instant":{"type":"boolean"},"datasource":{"type":"string","enum":["metrics","logs"]}},"additionalProperties":false,"required":["key","expr","instant"]}},"variables":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"backend":{"type":"string","enum":["mimir","openobserve"]}},"additionalProperties":false,"required":["range","queries"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"start":{"type":"number"},"end":{"type":"number"},"step":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"series":{"type":"array","items":{"type":"object","properties":{"labels":{"type":"object","additionalProperties":{"type":"string"}},"points":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["labels","points"]}},"error":{"type":"string"}},"additionalProperties":false,"required":["key","series"]}}},"additionalProperties":false,"required":["range","start","end","step","results"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/label-values":{"get":{"tags":["Projects"],"summary":"List values a metric label takes, for dashboard variable dropdowns.","operationId":"api_projects_id_label-values_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"label","in":"query","required":true,"schema":{"type":"string"}},{"name":"match","in":"query","required":false,"schema":{"type":"string"}},{"name":"backend","in":"query","required":false,"schema":{"type":"string","enum":["mimir","openobserve"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["values"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/dashboards":{"get":{"tags":["Projects"],"summary":"List custom dashboards in a project.","operationId":"api_projects_id_dashboards_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"dashboards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"panels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["timeseries","stat","pie","unsupported","row"]},"unit":{"type":"string"},"note":{"type":"string"},"collapsed":{"type":"boolean"},"gridPos":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"additionalProperties":false,"required":["x","y","w","h"]},"targets":{"type":"array","items":{"type":"object","properties":{"expr":{"type":"string"},"legend":{"type":"string"}},"additionalProperties":false,"required":["expr","legend"]}}},"additionalProperties":false,"required":["id","title","type","unit","gridPos","targets"]}},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["query","custom","constant","textbox"]},"metric":{"type":"string"},"labelName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"value":{"type":"string"},"multi":{"type":"boolean"},"includeAll":{"type":"boolean"},"defaults":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["name","type","value"]}},"createdBy":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"additionalProperties":false,"required":["id","name","panels","variables","createdAt","updatedAt"]}}},"additionalProperties":false,"required":["dashboards"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Projects"],"summary":"Create a custom dashboard (optionally pre-populated from import).","operationId":"api_projects_id_dashboards_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"panels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["timeseries","stat","pie","unsupported","row"]},"unit":{"type":"string"},"note":{"type":"string"},"collapsed":{"type":"boolean"},"gridPos":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"additionalProperties":false,"required":["x","y","w","h"]},"targets":{"type":"array","items":{"type":"object","properties":{"expr":{"type":"string"},"legend":{"type":"string"}},"additionalProperties":false,"required":["expr","legend"]}}},"additionalProperties":false,"required":["id","title","type","unit","gridPos","targets"]}},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["query","custom","constant","textbox"]},"metric":{"type":"string"},"labelName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"value":{"type":"string"},"multi":{"type":"boolean"},"includeAll":{"type":"boolean"},"defaults":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["name","type","value"]}}},"additionalProperties":false,"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"panels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["timeseries","stat","pie","unsupported","row"]},"unit":{"type":"string"},"note":{"type":"string"},"collapsed":{"type":"boolean"},"gridPos":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"additionalProperties":false,"required":["x","y","w","h"]},"targets":{"type":"array","items":{"type":"object","properties":{"expr":{"type":"string"},"legend":{"type":"string"}},"additionalProperties":false,"required":["expr","legend"]}}},"additionalProperties":false,"required":["id","title","type","unit","gridPos","targets"]}},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["query","custom","constant","textbox"]},"metric":{"type":"string"},"labelName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"value":{"type":"string"},"multi":{"type":"boolean"},"includeAll":{"type":"boolean"},"defaults":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["name","type","value"]}},"createdBy":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"additionalProperties":false,"required":["id","name","panels","variables","createdAt","updatedAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/dashboards/{dashboardId}":{"get":{"tags":["Projects"],"summary":"Fetch a single custom dashboard.","operationId":"api_projects_id_dashboards_dashboardId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dashboardId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"panels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["timeseries","stat","pie","unsupported","row"]},"unit":{"type":"string"},"note":{"type":"string"},"collapsed":{"type":"boolean"},"gridPos":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"additionalProperties":false,"required":["x","y","w","h"]},"targets":{"type":"array","items":{"type":"object","properties":{"expr":{"type":"string"},"legend":{"type":"string"}},"additionalProperties":false,"required":["expr","legend"]}}},"additionalProperties":false,"required":["id","title","type","unit","gridPos","targets"]}},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["query","custom","constant","textbox"]},"metric":{"type":"string"},"labelName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"value":{"type":"string"},"multi":{"type":"boolean"},"includeAll":{"type":"boolean"},"defaults":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["name","type","value"]}},"createdBy":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"additionalProperties":false,"required":["id","name","panels","variables","createdAt","updatedAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Projects"],"summary":"Rename a custom dashboard and/or replace its panels and variables.","operationId":"api_projects_id_dashboards_dashboardId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dashboardId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"panels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["timeseries","stat","pie","unsupported","row"]},"unit":{"type":"string"},"note":{"type":"string"},"collapsed":{"type":"boolean"},"gridPos":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"additionalProperties":false,"required":["x","y","w","h"]},"targets":{"type":"array","items":{"type":"object","properties":{"expr":{"type":"string"},"legend":{"type":"string"}},"additionalProperties":false,"required":["expr","legend"]}}},"additionalProperties":false,"required":["id","title","type","unit","gridPos","targets"]}},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["query","custom","constant","textbox"]},"metric":{"type":"string"},"labelName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"value":{"type":"string"},"multi":{"type":"boolean"},"includeAll":{"type":"boolean"},"defaults":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["name","type","value"]}}},"additionalProperties":false,"required":["name","panels","variables"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"panels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["timeseries","stat","pie","unsupported","row"]},"unit":{"type":"string"},"note":{"type":"string"},"collapsed":{"type":"boolean"},"gridPos":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"additionalProperties":false,"required":["x","y","w","h"]},"targets":{"type":"array","items":{"type":"object","properties":{"expr":{"type":"string"},"legend":{"type":"string"}},"additionalProperties":false,"required":["expr","legend"]}}},"additionalProperties":false,"required":["id","title","type","unit","gridPos","targets"]}},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["query","custom","constant","textbox"]},"metric":{"type":"string"},"labelName":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"value":{"type":"string"},"multi":{"type":"boolean"},"includeAll":{"type":"boolean"},"defaults":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["name","type","value"]}},"createdBy":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"additionalProperties":false,"required":["id","name","panels","variables","createdAt","updatedAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Projects"],"summary":"Delete a custom dashboard.","operationId":"api_projects_id_dashboards_dashboardId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"dashboardId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/alert-rules":{"get":{"tags":["Projects"],"summary":"List alert rules in a project (built-in and custom).","operationId":"api_projects_id_alert-rules_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"datasource":{"type":"string","enum":["metrics","logs"]},"expr":{"type":"string"},"comparator":{"type":"string","enum":[">",">=","<","<="]},"tiers":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["warning","critical"]},"threshold":{"type":"number"}},"additionalProperties":false,"required":["severity"]}},"forSeconds":{"type":"number"},"summary":{"type":"string"},"labels":{"type":"object","additionalProperties":{"type":"string"}},"enabled":{"type":"boolean"},"notifyMode":{"type":"string","enum":["escalation","webhook"]},"webhookUrl":{"type":"string"},"repeatSeconds":{"type":"number"},"webhookSecret":{"type":"string"},"builtin":{"type":"boolean"},"createdBy":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"additionalProperties":false,"required":["id","name","datasource","expr","tiers","forSeconds","summary","labels","enabled","notifyMode","builtin","createdAt","updatedAt"]}}},"additionalProperties":false,"required":["rules"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Projects"],"summary":"Create a custom alert rule.","operationId":"api_projects_id_alert-rules_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"datasource":{"type":"string","enum":["metrics","logs"]},"expr":{"type":"string"},"comparator":{"type":"string","enum":[">",">=","<","<="]},"tiers":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["warning","critical"]},"threshold":{"type":"number"}},"additionalProperties":false,"required":["severity"]}},"forSeconds":{"type":"number"},"summary":{"type":"string"},"labels":{"type":"object","additionalProperties":{"type":"string"}},"enabled":{"type":"boolean"},"notifyMode":{"type":"string","enum":["escalation","webhook"]},"webhookUrl":{"type":"string"},"repeatSeconds":{"type":"number"}},"additionalProperties":false,"required":["name","expr","tiers"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"datasource":{"type":"string","enum":["metrics","logs"]},"expr":{"type":"string"},"comparator":{"type":"string","enum":[">",">=","<","<="]},"tiers":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["warning","critical"]},"threshold":{"type":"number"}},"additionalProperties":false,"required":["severity"]}},"forSeconds":{"type":"number"},"summary":{"type":"string"},"labels":{"type":"object","additionalProperties":{"type":"string"}},"enabled":{"type":"boolean"},"notifyMode":{"type":"string","enum":["escalation","webhook"]},"webhookUrl":{"type":"string"},"repeatSeconds":{"type":"number"},"webhookSecret":{"type":"string"},"builtin":{"type":"boolean"},"createdBy":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"additionalProperties":false,"required":["id","name","datasource","expr","tiers","forSeconds","summary","labels","enabled","notifyMode","builtin","createdAt","updatedAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/alert-rules/{ruleId}":{"get":{"tags":["Projects"],"summary":"Fetch a single custom alert rule.","operationId":"api_projects_id_alert-rules_ruleId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ruleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"datasource":{"type":"string","enum":["metrics","logs"]},"expr":{"type":"string"},"comparator":{"type":"string","enum":[">",">=","<","<="]},"tiers":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["warning","critical"]},"threshold":{"type":"number"}},"additionalProperties":false,"required":["severity"]}},"forSeconds":{"type":"number"},"summary":{"type":"string"},"labels":{"type":"object","additionalProperties":{"type":"string"}},"enabled":{"type":"boolean"},"notifyMode":{"type":"string","enum":["escalation","webhook"]},"webhookUrl":{"type":"string"},"repeatSeconds":{"type":"number"},"webhookSecret":{"type":"string"},"builtin":{"type":"boolean"},"createdBy":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"additionalProperties":false,"required":["id","name","datasource","expr","tiers","forSeconds","summary","labels","enabled","notifyMode","builtin","createdAt","updatedAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Projects"],"summary":"Update a custom alert rule.","operationId":"api_projects_id_alert-rules_ruleId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ruleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"datasource":{"type":"string","enum":["metrics","logs"]},"expr":{"type":"string"},"comparator":{"type":"string","enum":[">",">=","<","<="]},"tiers":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["warning","critical"]},"threshold":{"type":"number"}},"additionalProperties":false,"required":["severity"]}},"forSeconds":{"type":"number"},"summary":{"type":"string"},"labels":{"type":"object","additionalProperties":{"type":"string"}},"enabled":{"type":"boolean"},"notifyMode":{"type":"string","enum":["escalation","webhook"]},"webhookUrl":{"type":"string"},"repeatSeconds":{"type":"number"}},"additionalProperties":false,"required":["name","expr","tiers"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"datasource":{"type":"string","enum":["metrics","logs"]},"expr":{"type":"string"},"comparator":{"type":"string","enum":[">",">=","<","<="]},"tiers":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["warning","critical"]},"threshold":{"type":"number"}},"additionalProperties":false,"required":["severity"]}},"forSeconds":{"type":"number"},"summary":{"type":"string"},"labels":{"type":"object","additionalProperties":{"type":"string"}},"enabled":{"type":"boolean"},"notifyMode":{"type":"string","enum":["escalation","webhook"]},"webhookUrl":{"type":"string"},"repeatSeconds":{"type":"number"},"webhookSecret":{"type":"string"},"builtin":{"type":"boolean"},"createdBy":{"type":"string"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"additionalProperties":false,"required":["id","name","datasource","expr","tiers","forSeconds","summary","labels","enabled","notifyMode","builtin","createdAt","updatedAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Projects"],"summary":"Delete a custom alert rule.","operationId":"api_projects_id_alert-rules_ruleId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ruleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/traces":{"get":{"tags":["Projects"],"summary":"Search recent traces across a project.","operationId":"api_projects_id_traces_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d"]}},{"name":"errorsOnly","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"filters","in":"query","required":false,"schema":{"type":"string"}},{"name":"service","in":"query","required":false,"schema":{"type":"string"}},{"name":"ingress","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d"]},"start":{"type":"number"},"end":{"type":"number"},"traces":{"type":"array","items":{"type":"object","properties":{"traceId":{"type":"string"},"rootService":{"type":"string"},"rootName":{"type":"string"},"startUnixMs":{"type":"number"},"durationMs":{"type":"number"},"error":{"type":"boolean"}},"additionalProperties":false,"required":["traceId","rootService","rootName","startUnixMs","durationMs","error"]}}},"additionalProperties":false,"required":["range","start","end","traces"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/trace-scopes":{"get":{"tags":["Projects"],"summary":"List services and ingresses seen in a project's traces.","operationId":"api_projects_id_trace-scopes_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]}},"ingresses":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["services","ingresses"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/trace-tags":{"get":{"tags":["Projects"],"summary":"List filterable trace labels (resource/span/intrinsic tags).","operationId":"api_projects_id_trace-tags_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","enum":["resource","span","intrinsic"]},"name":{"type":"string"}},"additionalProperties":false,"required":["scope","name"]}}},"additionalProperties":false,"required":["tags"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/trace-tag-values":{"get":{"tags":["Projects"],"summary":"List observed values for one trace label.","operationId":"api_projects_id_trace-tag-values_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"scope","in":"query","required":true,"schema":{"type":"string","enum":["resource","span","intrinsic"]}},{"name":"name","in":"query","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d"]}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["values"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/traces/{traceId}":{"get":{"tags":["Projects"],"summary":"Full span tree for a single trace.","operationId":"api_projects_id_traces_traceId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"traceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","required":false,"schema":{"type":"number"}},{"name":"end","in":"query","required":false,"schema":{"type":"number"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"traceId":{"type":"string"},"startUnixMs":{"type":"number"},"durationMs":{"type":"number"},"spans":{"type":"array","items":{"type":"object","properties":{"spanId":{"type":"string"},"parentSpanId":{"type":"string"},"name":{"type":"string"},"service":{"type":"string"},"kind":{"type":"string","enum":["internal","server","client","producer","consumer"]},"startUnixMs":{"type":"number"},"durationMs":{"type":"number"},"status":{"type":"string","enum":["unset","ok","error"]},"statusMessage":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"}},"events":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"relativeMs":{"type":"number"},"attributes":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false,"required":["name","relativeMs","attributes"]}},"links":{"type":"array","items":{"type":"object","properties":{"traceId":{"type":"string"},"spanId":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false,"required":["traceId","spanId","attributes"]}}},"additionalProperties":false,"required":["spanId","name","service","kind","startUnixMs","durationMs","status","attributes","events","links"]}}},"additionalProperties":false,"required":["traceId","startUnixMs","durationMs","spans"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/dns-api-keys":{"get":{"tags":["DNS API Keys"],"summary":"List a project's DNS API keys (the secret is never returned).","operationId":"api_projects_id_dns-api-keys_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"apiKey":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","name","apiKey","scopes","createdAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["DNS API Keys"],"summary":"Create a DNS API key. The secret is returned ONCE.","description":"Each scope is a domain name (that name only) or `*.` plus a domain name (every name below it), and must lie in one of this project's DNS zones.","operationId":"api_projects_id_dns-api-keys_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["name","scopes"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"apiKey":{"type":"string"},"secretApiKey":{"type":"string"}},"additionalProperties":false,"required":["id","apiKey","secretApiKey"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/dns-api-keys/{keyId}":{"delete":{"tags":["DNS API Keys"],"summary":"Revoke a DNS API key.","operationId":"api_projects_id_dns-api-keys_keyId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/observability-tokens":{"get":{"tags":["Observability Tokens"],"summary":"List a project's observability API tokens (metadata only).","operationId":"api_projects_id_observability-tokens_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","label","createdAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Observability Tokens"],"summary":"Create an observability API token. The token is returned ONCE.","description":"The token authenticates the read-only `/api/observe/*` endpoints for this project only. Omit `expiresInDays` for a token that does not expire.","operationId":"api_projects_id_observability-tokens_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":100},"expiresInDays":{"type":"integer","minimum":1,"maximum":365}},"additionalProperties":false,"required":["label"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"token":{"type":"string"}},"additionalProperties":false,"required":["id","token"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/observability-tokens/{tokenId}":{"delete":{"tags":["Observability Tokens"],"summary":"Revoke an observability API token.","operationId":"api_projects_id_observability-tokens_tokenId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tokenId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/projects/{id}/canvas-status":{"get":{"tags":["Projects"],"summary":"Aggregated counts for the project canvas toolbar.","operationId":"api_projects_id_canvas-status_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"incidents":{"type":"object","properties":{"open":{"type":"integer"},"latestName":{"type":"string"}},"additionalProperties":false,"required":["open"]},"alerts":{"type":"object","properties":{"pending":{"type":"integer"},"highestSeverity":{"type":"string","enum":["critical","high","medium","low","info"]}},"additionalProperties":false,"required":["pending"]},"oncall":{"type":"object","properties":{"name":{"type":"string"},"hasGaps":{"type":"boolean"}},"additionalProperties":false,"required":["hasGaps"]},"kbCount":{"type":"integer"},"assetCount":{"type":"integer"},"vaultCount":{"type":"integer"},"securityReportsNew":{"type":"integer"},"tickets":{"type":"object","properties":{"new":{"type":"integer"},"open":{"type":"integer"}},"additionalProperties":false,"required":["new","open"]},"loadTestCount":{"type":"integer"},"groupCount":{"type":"integer"},"usage":{"type":"object","properties":{"cpuPercent":{"type":"integer"},"memoryPercent":{"type":"integer"}},"additionalProperties":false,"required":["cpuPercent","memoryPercent"]},"monthlyCost":{"type":"number"},"vulns":{"type":"object","properties":{"critical":{"type":"integer"},"high":{"type":"integer"}},"additionalProperties":false,"required":["critical","high"]}},"additionalProperties":false,"required":["incidents","alerts","oncall","kbCount","assetCount","vaultCount","tickets","loadTestCount","groupCount","usage","monthlyCost","vulns"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/tickets/mine":{"get":{"tags":["Tickets"],"summary":"Tickets assigned to the caller that still need someone, across projects.","description":"Every project the caller is a full member of, most urgent first.","operationId":"api_tickets_mine_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"hasCustomer":{"type":"boolean"},"replyOwed":{"type":"boolean"},"lastActivityAt":{"type":"string"},"delivery":{"type":"array","items":{"type":"object","properties":{"environment":{"type":"string","enum":["development","staging","production"]},"state":{"type":"string","enum":["none","partial","reached","unknown"]},"servicesWithFix":{"type":"integer"},"servicesTotal":{"type":"integer"},"reachedAt":{"type":"string"}},"additionalProperties":false,"required":["environment","state","servicesWithFix","servicesTotal"]}}},"additionalProperties":false,"required":["id","projectId","projectName","number","subject","status","priority","labels","hasCustomer","replyOwed","lastActivityAt","delivery"]}}},"additionalProperties":false,"required":["tickets"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/registries":{"post":{"tags":["Registries"],"summary":"Add registry.","operationId":"api_registries_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string","pattern":"^[a-zA-Z0-9]([a-zA-Z0-9.-]*[a-zA-Z0-9])?(:[0-9]{1,5})?$","description":"The registry hostname, e.g. ghcr.io or registry.example.com:5000"},"username":{"type":"string","pattern":"^[a-zA-Z0-9._-]*$"},"password":{"type":"string"},"projectId":{"type":"string"}},"additionalProperties":false,"required":["name","address","username","password","projectId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"get":{"tags":["Registries"],"summary":"List Docker registries.","operationId":"api_registries_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"username":{"type":"string"},"canvasX":{"type":"number"},"canvasY":{"type":"number"},"canvasGroupId":{"type":"string"},"validationStatus":{"type":"string","enum":["valid","invalid","error","pending"]}},"additionalProperties":false,"required":["id","name","address","username"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/registries/{id}":{"delete":{"tags":["Registries"],"summary":"Delete registry.","operationId":"api_registries_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"get":{"tags":["Registries"],"summary":"Get registry.","operationId":"api_registries_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"validationStatus":{"type":"string","enum":["valid","invalid","error","pending"]},"validationError":{"type":"string"},"lastChecked":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["name","address","username","password","validationStatus"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Registries"],"summary":"Update registry.","operationId":"api_registries_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string","pattern":"^[a-zA-Z0-9]([a-zA-Z0-9.-]*[a-zA-Z0-9])?(:[0-9]{1,5})?$","description":"The registry hostname, e.g. ghcr.io or registry.example.com:5000"},"username":{"type":"string","pattern":"^[a-zA-Z0-9._-]*$"},"password":{"type":"string"}},"additionalProperties":false,"required":["name","address","username","password"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/registries/validate-anonymous":{"post":{"tags":["Registries"],"summary":"Validate if an image exists in a public registry.","operationId":"api_registries_validate-anonymous_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"image":{"type":"string"}},"additionalProperties":false,"required":["address","image"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean"},"digest":{"type":"string"},"errorMessage":{"type":"string"},"volumes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["exists"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/registries/{id}/validate-image":{"post":{"tags":["Registries"],"summary":"Validate if an image exists in a registry.","operationId":"api_registries_id_validate-image_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","description":"Image name with optional tag, e.g. library/nginx:latest"}},"additionalProperties":false,"required":["image"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean"},"digest":{"type":"string"},"errorMessage":{"type":"string"},"volumes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["exists"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services":{"post":{"tags":["Services"],"summary":"Add one or more services.","operationId":"api_services_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","description":"The project ID this service belongs to."},"services":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Symbolic key for cross-referencing within a batch."},"name":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9-]*$","description":"The service name (alphanumeric and hyphens)."},"description":{"type":"string"},"registry":{"type":"string","description":"The container registry the image is hosted on."},"registryUrl":{"type":"string"},"image":{"type":"string","pattern":"^[a-z0-9._-]+(\\/[a-z0-9._-]+)?(:[a-zA-Z0-9._-]+)?$","description":"The Docker image that should be used."},"privileged":{"type":"boolean","description":"Run the container in privileged mode (disables security restrictions)."},"user":{"type":"string","pattern":"^[a-zA-Z0-9_-]+(:[a-zA-Z0-9_-]+)?$","description":"Run the container as this user (e.g. 'valkey', '1000')."},"command":{"type":"string","description":"The command that will be executed inside the container."},"defaultVolumes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]*$","description":"Stable volume name used as the LVM LV identifier and for backup tagging, e.g. 'data'."},"mountPath":{"type":"string","pattern":"^(\\/[a-zA-Z0-9_.-]+)+$"},"storage":{"type":"integer","minimum":0,"description":"Volume size in MiB."},"diskType":{"type":"string","description":"Disk type (LVM volume group)."},"filesystem":{"type":"string","enum":["ext4","xfs"],"description":"Filesystem of the volume: `ext4` (default when absent) or `xfs`. Fixed once the volume exists; an XFS volume can grow but not shrink."},"layout":{"type":"string","enum":["mirrored","striped"],"description":"How the volume is laid out over the node's disks: `mirrored` (default when absent) keeps two copies on separate disks and takes twice its size from node capacity and project quota; `striped` spreads it over every disk with no redundancy, so a failed disk loses it and it comes back from backup. Where a node has one disk, both are a plain volume of their own size. Fixed once the volume exists."},"encrypted":{"type":"boolean","description":"Encrypt the volume at rest (LUKS2 on the node, under a key kept wrapped under the cluster's root key and fetched by the node when the container starts). Absent = not encrypted. Fixed once the volume exists unless the volume is temporary; an encrypted volume can grow but not shrink, needs at least 64 MiB, and gives the filesystem 16 MiB less than its size."},"temporary":{"type":"boolean","description":"A cache whose contents may be thrown away: never backed up, not copied when the container moves to another node (it starts empty there), left empty by a restore, and made again empty instead of refused when it shrinks or changes filesystem or layout. Changing it redeploys nothing."}},"additionalProperties":false,"required":["name","mountPath","storage","diskType"]},"description":"Default volume definitions for new containers."},"metrics":{"type":"string","pattern":"^[0-9]+\\/[^,]*(,[0-9]+\\/[^,]*)*$","description":"The ports and paths to use for Prometheus monitoring.","examples":["8000/metrics"]},"accesses":{"type":"array","items":{"type":"object","properties":{"serviceId":{"type":"string","minLength":1},"proto":{"type":"string","enum":["tcp","udp"]},"port":{"type":"integer","minimum":1,"maximum":65535}},"additionalProperties":false,"required":["serviceId","proto"]}},"env":{"type":"object","additionalProperties":{"type":"string"},"description":"Environment variables for this service."},"files":{"type":"object","additionalProperties":{"type":"object","properties":{"content":{"type":"string"},"mode":{"type":"string"},"owner":{"type":"integer"}},"additionalProperties":false,"required":["content"]},"description":"Files mounted for this service. `mode` defaults to 0444; set `owner` (container-side uid) and `mode` when a process needs tight perms on its config, e.g. TLS private keys."},"addHook":{"type":"string"},"deleteHook":{"type":"string"},"defaultCpu":{"type":"integer","minimum":1,"description":"Default CPU reservation for new containers, in deci-ECUs (1 ECU = throughput of one reference core; 10 = 1 ECU). Stored as a normalized unit, converted to a raw cgroup quota at deploy time using the target node's perf_score."},"defaultMemory":{"type":"integer","minimum":1,"description":"Default memory for new containers in MiB."},"shmSize":{"type":"integer","minimum":1,"description":"Size of /dev/shm inside each container, in MiB. Defaults to 64. Bounded by the container's memory limit at the cgroup level; setting it higher than the memory limit just makes OOM more likely."},"dockerStorage":{"type":"integer","minimum":1,"description":"Max size of the container's writable (overlay2) layer, in MiB. Defaults to 1024. Only enforced on nodes whose /var/lib/docker is on XFS+pquota (docker_xfs); ignored elsewhere. The layer is ephemeral (wiped on redeploy) — use a data volume for anything that must persist."},"defaultMinPerfScore":{"type":"number","minimum":0,"description":"Minimum node perf_score required to schedule containers of this service. 0 means no minimum — schedules anywhere. Copied to each new container at creation; later changes here only affect new containers, not existing ones (so the operator doesn't accidentally invalidate the placement of running containers)."},"regionAffinity":{"type":"integer","minimum":-10,"maximum":10,"description":"Region placement preference: -10 (spread across regions) to 10 (cluster in same region). Default: -5."},"requiredTags":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"description":"Container will only schedule on nodes that carry every tag listed here. Absolute hard constraint."},"tolerations":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"description":"Node taints this service is allowed to schedule onto. Tainted nodes are off-limits unless every taint appears here."},"replicas":{"type":"integer","minimum":0,"maximum":20},"udpPort":{"type":"boolean","description":"Expose a UDP port directly on the worker node. Each container replica gets its own auto-allocated port from 10000-19999."},"tcpPorts":{"type":"array","items":{"type":"object","properties":{"containerPort":{"type":"integer","minimum":1,"maximum":65535}},"additionalProperties":false,"required":["containerPort"]},"description":"TCP ports to expose on gateway nodes. Each port gets an auto-allocated external port from 10000-19999."},"sidecars":{"type":"array","items":{"type":"object","properties":{"targetServiceKey":{"type":"string"},"listenPort":{"type":"integer","minimum":1,"maximum":65535},"targetPort":{"type":"integer","minimum":1,"maximum":65535},"protocol":{"type":"string","enum":["tcp","http"]},"stickyHeader":{"type":"string","description":"Best-effort sticky routing: requests carrying this header are consistent-hashed to a backend so the same value sticks to one container (http protocol only)."}},"additionalProperties":false,"required":["targetServiceKey","listenPort","targetPort"]},"description":"Envoy load-balancing sidecars to create. targetServiceKey references another service's key in this batch. protocol `tcp` (default) load-balances connections (correct for Postgres etc.); `http` load-balances per request (use for HTTP services)."},"placeNear":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string","description":"Another service's key in this batch, or the id of a service already in the project."},"level":{"type":"string","enum":["node","region"]}},"additionalProperties":false,"required":["service","level"]},"description":"Services this one should be scheduled near: `node` prefers the same node as one of the target's containers, `region` the same region. A preference, never a rule — a container still deploys when no such node has room. Use it for an app and the database it queries one round trip at a time."},"runtime":{"type":"string","enum":["gvisor","kata"],"description":"Container runtime. Only `kata` is accepted, and it is the default: each container runs inside a lightweight VM (Kata Containers) and schedules onto nodes with VM isolation enabled. The VM's own kernel and networking take 512 MiB and 1 ECU of `defaultMemory`/`defaultCpu`, so the minimum is 768 MiB and 1.1 ECU. `gvisor` is being retired and is refused for new services."},"gpuCount":{"type":"integer","minimum":0,"description":"Number of whole GPUs to pass through to each container of this service. Defaults to 0. At most 1 today. The card is handed to the guest over VFIO, so the container owns it outright — it runs its own NVIDIA driver, `nvidia-smi` and MIG partitioning. Requires the `kata` runtime — the guest driver ships with VM isolation. Containers only schedule onto nodes with a free GPU."},"blockEgress":{"type":"boolean","description":"Block outbound internet access: the container can reach the Nebula mesh (other services it's granted access to) but nothing on the public internet. Cannot be combined with `udpPort`."},"customDomainsEnabled":{"type":"boolean","description":"Allow this service's OWN containers to manage its custom domains over the Nebula mesh (api.internal.<platform-zone>), authenticated by their mesh address with no token. Defaults to false: every domain attached lands on the cluster's shared custom-domain gateway IPs, and it is those IPs that collect abuse complaints, so which services may do this unattended is an operator decision. Leaving it off does not prevent custom domains — they can still be managed from the dashboard."},"readOnly":{"type":"boolean","description":"Run the container with a read-only root filesystem (`docker run --read-only`): the image layers are immutable and writes only land on mapped data volumes and any declared tmpfs mounts. Defaults to false."},"tmpfsMounts":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^(\\/[a-zA-Z0-9_.-]+)+$","description":"Absolute container-internal path."},"sizeMib":{"type":"integer","minimum":1,"description":"Optional size cap in MiB. Omit to bound only by the container's memory limit."}},"additionalProperties":false,"required":["path"]},"description":"Writable RAM-backed tmpfs scratch mounts (`docker run --tmpfs`). Charged to the container's memory limit, never to node disk. Mainly used to give a read-only-rootfs container writable scratch (e.g. /tmp, /run) without a persistent volume."}},"additionalProperties":false,"required":["name","description","image","privileged","command","defaultVolumes","accesses","env","files","defaultCpu","defaultMemory","defaultMinPerfScore"]},"description":"Services to create atomically."},"groupName":{"type":"string","description":"If provided, creates a canvas group with this name and assigns all services to it."},"senders":{"type":"array","items":{"type":"object","properties":{"serviceKey":{"type":"string","description":"Batch key of the service this sender belongs to."},"emailDomainId":{"type":"string"},"localPart":{"type":"string","pattern":"^[a-z0-9]([a-z0-9._-]*[a-z0-9])?$"}},"additionalProperties":false,"required":["serviceKey","emailDomainId","localPart"]},"description":"Service senders to register atomically with the new services. Each entry writes a `service_senders` row so the target service is immediately allowed to relay mail AS `<localPart>@<domain>`. The domain must be a project-owned email_domain in the same project (the platform domain is rejected)."}},"additionalProperties":false,"required":["project","services"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The IDs of the created services."}},"additionalProperties":false,"required":["ids"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"get":{"tags":["Services"],"summary":"List services.","operationId":"api_services_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}},{"name":"includeDeleted","in":"query","description":"Set to 'true' to include soft-deleted services in the response. Each row carries a `deleted` flag; for deleted rows `scale` is the count of containers that will be restored alongside.","required":false,"schema":{"type":"string","description":"Set to 'true' to include soft-deleted services in the response. Each row carries a `deleted` flag; for deleted rows `scale` is the count of containers that will be restored alongside."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The service identifier."},"name":{"type":"string","description":"The service name."},"lastUpdate":{"type":"string","format":"date-time","description":"How long since the last image update."},"scale":{"type":"number","description":"The number of containers for this service."},"ready":{"type":"number","description":"The number of containers for this service that are on the most recent version."},"backupsEnabled":{"type":"boolean","description":"Whether backups are enabled for this service."},"upgradeAvailable":{"type":"boolean","description":"Whether an upgrade is available for this service."},"tagUpgradeAvailable":{"type":"boolean","description":"Whether a newer image tag (within the same major) is available for this service."},"canvasX":{"type":"number","description":"Canvas X position."},"canvasY":{"type":"number","description":"Canvas Y position."},"canvasGroupId":{"type":"string","description":"Canvas group ID."},"autoscaling":{"type":"boolean","description":"Whether autoscaling is enabled for this service."},"accesses":{"type":"array","items":{"type":"object","properties":{"serviceId":{"type":"string"},"proto":{"type":"string","enum":["tcp","udp"]},"port":{"type":"number"}},"additionalProperties":false,"required":["serviceId","proto"]},"description":"Service access rules. Omit `port` for an all-ports rule."},"sidecars":{"type":"array","items":{"type":"object","properties":{"targetServiceId":{"type":"string"}},"additionalProperties":false,"required":["targetServiceId"]},"description":"Sidecar proxy targets for this service."},"registryId":{"type":"string","description":"Registry the service pulls its image from."},"image":{"type":"string","description":"The image, without its registry."},"dnsZones":{"type":"array","items":{"type":"string"},"description":"Zones the service has a DNS record on."},"ingressHosts":{"type":"array","items":{"type":"string"},"description":"Hostnames of the service's HTTP INGRESS records (TCP-mode ones left out), sorted. What a template deployed against this service uses for `{{ingress(key)}}`."},"senderEmailDomainIds":{"type":"array","items":{"type":"string"},"description":"Email domains this service is permitted to send AS, derived from service_senders → inboxes.email_domain_id."},"deletedAt":{"type":"string","description":"ISO timestamp of soft-deletion. Present only on soft-deleted rows (and only when includeDeleted=true)."},"hasVolumesWithoutBackups":{"type":"boolean","description":"For deleted services: true if any container that will be restored has volumes but the service had no backups. Always false for live services."},"runtime":{"type":"string","enum":["gvisor","kata"],"description":"Container runtime for this service."}},"additionalProperties":false,"required":["id","name","lastUpdate","scale","ready","backupsEnabled","upgradeAvailable","tagUpgradeAvailable","autoscaling","accesses","sidecars","dnsZones","senderEmailDomainIds","hasVolumesWithoutBackups"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}":{"delete":{"tags":["Services"],"summary":"Delete service.","operationId":"api_services_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"get":{"tags":["Services"],"summary":"Get service.","operationId":"api_services_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"projectId":{"type":"string","description":"The project this service belongs to."},"projectName":{"type":"string","description":"The project name."},"registryId":{"type":"string","description":"The container registry ID the image is hosted on."},"registryUrl":{"type":"string"},"image":{"type":"string","description":"The Docker image that should be used."},"latest":{"type":"string","description":"The digest of the latest image version."},"availableVersion":{"type":"string","description":"The digest of an available upgrade, if any."},"availableTag":{"type":"string","description":"A newer tag available in the registry within the same major version, if any. Only set for services pinned to a parseable version tag."},"privileged":{"type":"boolean","description":"Whether the container runs in privileged mode."},"runtime":{"type":"string","enum":["gvisor","kata"],"description":"The OCI runtime each container runs under: `kata` (lightweight VM isolation, the runtime of every new service) or `gvisor` (runsc application-kernel sandbox, being retired; only services created on it still have it)."},"gpuCount":{"type":"integer","description":"Whole GPUs passed through to each container of this service, 0 for almost every service. Requires the `kata` runtime and no proxy sidecars."},"blockEgress":{"type":"boolean","description":"Whether outbound internet access is blocked (mesh-only). Requires the gvisor or kata runtime."},"customDomainsEnabled":{"type":"boolean","description":"Allow this service's OWN containers to manage its custom domains over the Nebula mesh (api.internal.<platform-zone>), authenticated by their mesh address with no token. Off by default: every domain attached lands on the cluster's shared custom-domain gateway IPs, and it is those IPs that collect abuse complaints, so which services may do this unattended is an operator decision. Leaving it off does not prevent custom domains — they can still be managed here in the dashboard."},"readOnly":{"type":"boolean","description":"Whether the container runs with a read-only root filesystem (writes only to mapped data volumes)."},"tmpfsMounts":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"sizeMib":{"type":"integer"}},"additionalProperties":false,"required":["path"]},"description":"Writable RAM-backed tmpfs scratch mounts (path + optional size cap in MiB)."},"user":{"type":"string","description":"The user the container runs as."},"command":{"type":"string","description":"The command that will be executed inside the container."},"disk":{"type":"string","description":"The container path where the disk will be mounted.","examples":["/mnt/disk"]},"metrics":{"type":"string","pattern":"^[0-9]+\\/[^,]*(,[0-9]+\\/[^,]*)*$","description":"The ports and paths to use for Prometheus monitoring.","examples":["8000/metrics"]},"accesses":{"type":"array","items":{"type":"object","properties":{"serviceId":{"type":"string"},"proto":{"type":"string","enum":["tcp","udp"]},"port":{"type":"number"}},"additionalProperties":false,"required":["serviceId","proto"]},"description":"Service access rules. Omit `port` for an all-ports rule."},"env":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":"string","description":"The value, with every secret-shaped token masked (`•`)."},"redacted":{"type":"boolean","description":"Whether anything was masked. A redacted value's plaintext is only available from the matching `reveal` endpoint, which is audited."}},"additionalProperties":false,"required":["value","redacted"]},"description":"The environment variables of this service, redacted: secret-shaped values are masked. Reveal a value with POST /api/services/{id}/env/reveal (audited); write it back unchanged with `{ stored: <key> }`."},"files":{"type":"object","additionalProperties":{"type":"object","properties":{"content":{"type":"string","description":"The file's contents, with every secret-shaped token masked (`•`)."},"redacted":{"type":"boolean","description":"Whether anything was masked. A redacted value's plaintext is only available from the matching `reveal` endpoint, which is audited."},"mode":{"type":"string"},"owner":{"type":"integer"}},"additionalProperties":false,"required":["content","redacted"]},"description":"The files mounted for this service, with secret-shaped content masked. Reveal a file with POST /api/services/{id}/files/reveal (audited); write it back unchanged with `{ stored: <path> }`."},"autoDeploy":{"type":"boolean","description":"Whether automatic deployment via webhook is enabled."},"webhookUrl":{"type":"string","description":"The webhook URL for triggering deployments (only present when autoDeploy is true). Never returned to an API token."},"addHook":{"type":"string","description":"JavaScript workflow code for container add hook."},"deleteHook":{"type":"string","description":"JavaScript workflow code for container delete hook."},"defaultCpu":{"type":"integer","description":"Default CPU reservation for new containers, in deci-ECUs (10 = 1 ECU = throughput of one reference core)."},"defaultMemory":{"type":"integer","description":"Default memory for new containers in MiB."},"shmSize":{"type":"integer","description":"Size of /dev/shm inside each container, in MiB."},"dockerStorage":{"type":"integer","description":"Max size of the container's writable overlay2 layer, in MiB (only enforced on docker_xfs nodes)."},"defaultMinPerfScore":{"type":"number","description":"Minimum node perf_score required to schedule containers of this service. 0 means no minimum."},"defaultStorage":{"type":"integer","description":"Default storage for new containers in MiB."},"defaultDiskType":{"type":"string","description":"Default disk type for new containers."},"defaultVolumes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Stable volume name used as the LVM LV identifier and for backup tagging."},"mountPath":{"type":"string","description":"Container-internal mount path."},"storage":{"type":"integer","description":"Volume size in MiB."},"diskType":{"type":"string","description":"Disk type (LVM volume group)."},"filesystem":{"type":"string","enum":["ext4","xfs"],"description":"Filesystem of the volume: `ext4` (default when absent) or `xfs`. Fixed once the volume exists; an XFS volume can grow but not shrink."},"layout":{"type":"string","enum":["mirrored","striped"],"description":"How the volume is laid out over the node's disks: `mirrored` (default when absent) keeps two copies on separate disks and takes twice its size from node capacity and project quota; `striped` spreads it over every disk with no redundancy, so a failed disk loses it and it comes back from backup. Where a node has one disk, both are a plain volume of their own size. Fixed once the volume exists."},"encrypted":{"type":"boolean","description":"Encrypt the volume at rest (LUKS2 on the node, under a key kept wrapped under the cluster's root key and fetched by the node when the container starts). Absent = not encrypted. Fixed once the volume exists unless the volume is temporary; an encrypted volume can grow but not shrink, needs at least 64 MiB, and gives the filesystem 16 MiB less than its size."},"temporary":{"type":"boolean","description":"A cache whose contents may be thrown away: never backed up, not copied when the container moves to another node (it starts empty there), left empty by a restore, and made again empty instead of refused when it shrinks or changes filesystem or layout. Changing it redeploys nothing."}},"additionalProperties":false,"required":["name","mountPath","storage","diskType"]},"description":"Default volume definitions for new containers."},"regionAffinity":{"type":"integer","description":"Region placement preference: -10 (spread across regions) to 10 (cluster in same region)."},"requiredTags":{"type":"array","items":{"type":"string"},"description":"Tags every candidate node must carry for this service's containers to schedule. Absolute hard constraint."},"tolerations":{"type":"array","items":{"type":"string"},"description":"Node taints this service is allowed to schedule onto. Tainted nodes are off-limits unless every taint appears here."},"placeNear":{"type":"array","items":{"type":"object","properties":{"serviceId":{"type":"string"},"serviceName":{"type":"string"},"level":{"type":"string","enum":["node","region"]}},"additionalProperties":false,"required":["serviceId","serviceName","level"]},"description":"Services this one prefers to be scheduled near (same node or same region). Entries whose target no longer exists are left out."},"udpPort":{"type":"boolean","description":"Whether a UDP port is exposed directly on the worker node for each container."},"tcpPorts":{"type":"array","items":{"type":"object","properties":{"containerPort":{"type":"integer","description":"Port inside the container."},"externalPort":{"type":"integer","description":"Auto-allocated external port on gateway nodes (10000-19999)."}},"additionalProperties":false,"required":["containerPort","externalPort"]},"description":"TCP ports exposed on gateway nodes, load balanced across all replicas."},"autoscaleMin":{"type":"integer","description":"Minimum replica count for autoscaling. Absent when autoscaling is disabled."},"autoscaleMax":{"type":"integer","description":"Maximum replica count for autoscaling."},"autoscaleCpuTarget":{"type":"integer","description":"Target CPU utilization percentage for autoscaling (1-100)."},"shouldBackup":{"type":"boolean","description":"Whether backups are enabled for this service."},"tailSampling":{"type":"object","properties":{"policies":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["alwaysSample","errors","latency","probabilistic","and"]},"thresholdMs":{"type":"integer","minimum":0,"maximum":3600000},"percent":{"type":"number","minimum":0,"maximum":100},"policies":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["alwaysSample","errors","latency","probabilistic"]},"thresholdMs":{"type":"integer","minimum":0,"maximum":3600000},"percent":{"type":"number","minimum":0,"maximum":100}},"additionalProperties":false,"required":["kind"]}}},"additionalProperties":false,"required":["kind"]}}},"additionalProperties":false,"required":["policies"],"description":"Per-service OTLP trace tail-sampling rules. Omitted/empty means the service falls through to the cluster default (sample all)."},"tcpAccess":{"type":"array","items":{"type":"object","properties":{"port":{"type":"integer","minimum":1,"maximum":65535},"users":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["port","users"]},"description":"Per-port Nebula access grants, independent of full project-level mesh access."},"previewsEnabled":{"type":"boolean","description":"Whether PR preview deployments are enabled."},"previewPrefix":{"type":"string","description":"Hostname prefix of the main preview port (the first entry of previewPorts). Kept for older clients."},"previewPort":{"type":"integer","description":"The main preview port (the first entry of previewPorts). Kept for older clients."},"previewPorts":{"type":"array","items":{"type":"object","properties":{"prefix":{"type":"string","description":"Hostname prefix: this port's preview hostnames are <prefix>-<slug>.<preview-domain>."},"port":{"type":"integer","description":"Container port it routes to."}},"additionalProperties":false,"required":["prefix","port"]},"description":"The ports a preview exposes, one hostname each. The first is the main one (links, the waiting page, $preview.host); the others are reachable as $preview.host[<prefix>]. Empty when previews are off."},"previewEnv":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":"string","description":"The value, with every secret-shaped token masked (`•`)."},"redacted":{"type":"boolean","description":"Whether anything was masked. A redacted value's plaintext is only available from the matching `reveal` endpoint, which is audited."}},"additionalProperties":false,"required":["value","redacted"]},"description":"Environment variables applied over `env` in every preview container, redacted. Reveal a value with POST /api/services/{id}/preview-env/reveal (audited)."},"previewTeardownCommand":{"type":"string","description":"Command run as a one-shot container when a preview is deleted."},"previewPublic":{"type":"boolean","description":"Whether this service's previews are served without authentication."},"previewFirewall":{"type":"array","items":{"type":"string"},"description":"Usernames, @groups and external email addresses allowed to reach this service's previews. Only consulted when previewPublic is false; an empty list then denies everyone."},"previewExceptions":{"type":"string","description":"Comma-separated paths on preview hostnames served without authentication. A trailing `/*` matches the whole subtree. Only consulted when previewPublic is false."},"previewCsrfRelaxed":{"type":"boolean","description":"Whether cross-site deep-link navigations to previews skip the strict CSRF bounce to the app root."},"previewMaxActive":{"type":"integer","description":"Most previews of this service allowed to hold a container at once; absent means no service-level cap."},"previewIdleTimeout":{"type":"integer","description":"Seconds without a request before a preview's container is released; absent means never."},"previewWebhookUrl":{"type":"string","description":"Webhook URL for PR previews — present only when a token has been issued. Absence means no token exists yet. Never returned to an API token."},"pendingWorkflows":{"type":"integer","description":"Number of containers waiting for add workflow execution."},"workflowHistory":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"containerId":{"type":"string"},"hookType":{"type":"string"},"replayLog":{"type":"array","items":{}},"error":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","hookType","replayLog","timestamp"]},"description":"History of completed workflows."},"workflow":{"type":"object","properties":{"status":{"type":"string","enum":["pending","finished"]},"hookType":{"type":"string","enum":["add","delete"]},"replayLog":{"type":"array","items":{}},"command":{},"unlocksAt":{"type":"number"},"error":{"type":"string"}},"additionalProperties":false,"required":["status","replayLog"],"description":"Active workflow state for this service."},"sidecars":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"targetServiceId":{"type":"string"},"targetServiceName":{"type":"string"},"listenPort":{"type":"integer"},"targetPort":{"type":"integer"},"protocol":{"type":"string","enum":["tcp","http"]},"stickyHeader":{"type":"string"}},"additionalProperties":false,"required":["id","targetServiceId","targetServiceName","listenPort","targetPort","protocol"]},"description":"Envoy load-balancing sidecars for this service."},"containers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The ID of this container."},"address":{"type":"string","description":"The Nebula IP of this container."},"node":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"region":{"type":"string"}},"additionalProperties":false,"required":["id","address","region"]},"state":{"type":"string","enum":["pending","setup","running","stopped","upgrade","destroy","deploying","restore","reload-nebula","backup","migrate"],"description":"The current status of the container."},"failure":{"type":"object","properties":{"count":{"type":"integer","description":"Consecutive failed deployment attempts since the last successful one."},"since":{"type":"string","description":"When the most recent attempt failed."},"retryAt":{"type":"string","description":"When the deployment loop is next allowed to retry. May be in the past when the container is simply awaiting the next tick."},"message":{"type":"string","description":"The most recent deployment error, truncated."}},"additionalProperties":false,"required":["count","since","retryAt"],"description":"Set while this container's pending operation is failing and being retried. Absent when the last deployment succeeded — `state` alone cannot express this, because the operation timestamp stays set on failure so the loop retries it."},"hasLogs":{"type":"boolean","description":"Whether deployment logs are available for this container."},"cpu":{"type":"integer","description":"The amount of CPU available to this container in millicores."},"memory":{"type":"integer","description":"The amount of memory available to this container in bytes."},"disk":{"type":"string","description":"The device path of the disk attached to this container."},"storage":{"type":"integer","description":"The amount of storage available to this container in bytes."},"diskType":{"type":"string","description":"The disk type (LVM volume group) for this container."},"volumes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"storage":{"type":"integer"},"diskType":{"type":"string"},"filesystem":{"type":"string","enum":["ext4","xfs"]},"layout":{"type":"string","enum":["mirrored","striped"]},"redundancy":{"type":"string","enum":["mirrored","striped","raid","declared","single"],"description":"What the volume actually is on its node: `mirrored` (LVM raid1, two copies on separate disks), `striped` (spread over the node's disks, no redundancy), `raid` (a plain volume on an md array that survives a failed disk), `declared` (a plain volume on storage declared redundant, e.g. a cloud VM's replicated block storage) or `single` (one copy on a disk nothing makes redundant)."},"encrypted":{"type":"boolean"}},"additionalProperties":false,"required":["name","storage","diskType"]},"description":"Volumes attached to this container."},"udpPort":{"type":"integer","description":"Allocated external UDP port on the worker node (10000-19999)."},"health":{"type":"string","enum":["running","down"],"description":"Whether the container is running or down."},"waitingForRootKey":{"type":"boolean","description":"True when this container needs the cluster's root key to start (an encrypted volume or a secret file, fetched from a control plane at every start) and no control plane holds it right now. A running container keeps running, and a restart reuses what its node fetched since it booted; a container that is down stays down until a control plane is unsealed. Absent otherwise."},"imageDigest":{"type":"string","description":"The image digest this container is actually running. May lag services.latest during a rolling upgrade; absent until the container's first deploy after digest tracking was introduced."},"preview":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false,"required":["id","slug"],"description":"PR preview metadata when this container belongs to a preview deployment."}},"additionalProperties":false,"required":["id","address","state","hasLogs","cpu","memory","storage","diskType","volumes","health"]}},"deletedContainers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"address":{"type":"string"},"deletedAt":{"type":"string"},"hasVolumes":{"type":"boolean"},"lossReason":{"type":"string","description":"Why the container was detached from its node: 'node_lost' when an admin marked its (unreachable) node lost; absent for an ordinary user delete."}},"additionalProperties":false,"required":["id","address","deletedAt","hasVolumes"]},"description":"Soft-deleted containers in the 30-day restore window. The 'no backups' warning is derived from the service-level shouldBackup flag."}},"additionalProperties":false,"required":["name","description","projectId","projectName","image","latest","privileged","runtime","gpuCount","blockEgress","customDomainsEnabled","readOnly","tmpfsMounts","command","disk","accesses","env","files","autoDeploy","defaultCpu","defaultMemory","shmSize","dockerStorage","defaultMinPerfScore","defaultStorage","defaultDiskType","defaultVolumes","regionAffinity","requiredTags","tolerations","placeNear","udpPort","tcpPorts","shouldBackup","tcpAccess","previewsEnabled","previewPorts","previewEnv","previewPublic","previewFirewall","previewExceptions","previewCsrfRelaxed","pendingWorkflows","workflowHistory","sidecars","containers","deletedContainers"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Services"],"summary":"Update service (unified endpoint).","operationId":"api_services_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9-]*$","description":"The service name (alphanumeric and hyphens)."},"description":{"type":"string"},"metrics":{"type":"string","pattern":"^[0-9]+\\/[^,]*(,[0-9]+\\/[^,]*)*$","description":"The ports and paths to use for Prometheus monitoring.","examples":["8000/metrics"]},"accesses":{"type":"array","items":{"type":"object","properties":{"serviceId":{"type":"string","minLength":1},"proto":{"type":"string","enum":["tcp","udp"]},"port":{"type":"integer","minimum":1,"maximum":65535}},"additionalProperties":false,"required":["serviceId","proto"]}},"registry":{"type":"string"},"registryUrl":{"type":"string"},"image":{"type":"string","pattern":"^[a-z0-9._-]+(\\/[a-z0-9._-]+)?(:[a-zA-Z0-9._-]+)?$"},"privileged":{"type":"boolean","description":"Run the container in privileged mode (disables security restrictions)."},"user":{"type":"string","pattern":"^[a-zA-Z0-9_-]+(:[a-zA-Z0-9_-]+)?$","description":"Run the container as this user (e.g. 'valkey', '1000')."},"runtime":{"type":"string","enum":["gvisor","kata"],"description":"Container runtime. `kata` runs each container inside a lightweight VM (Kata Containers) on nodes with VM isolation enabled; the VM's own kernel and networking take 512 MiB and 1 ECU of `defaultMemory`/`defaultCpu`, so the minimum is 768 MiB and 1.1 ECU. `gvisor` is being retired: a service already on it may keep it, but no service can move onto it. Omitted keeps the current runtime. Changing the runtime redeploys every container, migrating any whose node cannot run the new one."},"gpuCount":{"type":"integer","minimum":0,"description":"Number of whole GPUs passed through to each container of this service. Defaults to 0. At most 1 today. Requires the `kata` runtime. CHANGING THIS RECONCILES IN PLACE, never by migration: raising it claims a free card on each container's CURRENT node and the request is refused if one has none free, because a GPU is node-local hardware and a migration would need a second card to exist while the data copies."},"blockEgress":{"type":"boolean","description":"Block outbound internet access: the container can reach the Nebula mesh (other services it's granted access to) but nothing on the public internet. Cannot be combined with `udpPort`."},"customDomainsEnabled":{"type":"boolean","description":"Allow this service's OWN containers to manage its custom domains over the Nebula mesh (api.internal.<platform-zone>), authenticated by their mesh address with no token. Off by default: every domain attached lands on the cluster's shared custom-domain gateway IPs, and it is those IPs that collect abuse complaints, so which services may do this unattended is an operator decision. Leaving it off does not prevent custom domains — they can still be managed here in the dashboard."},"readOnly":{"type":"boolean","description":"Run the container with a read-only root filesystem (`docker run --read-only`): image layers are immutable and writes only land on mapped data volumes and any declared tmpfs mounts."},"tmpfsMounts":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^(\\/[a-zA-Z0-9_.-]+)+$","description":"Absolute container-internal path."},"sizeMib":{"type":"integer","minimum":1,"description":"Optional size cap in MiB."}},"additionalProperties":false,"required":["path"]},"description":"Writable RAM-backed tmpfs scratch mounts (`docker run --tmpfs`), charged to the container's memory limit rather than node disk."},"command":{"type":"string","description":"The command that will be executed inside the container."},"defaultVolumes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]*$","description":"Stable volume name used as the LVM LV identifier and for backup tagging, e.g. 'data'."},"mountPath":{"type":"string","pattern":"^(\\/[a-zA-Z0-9_.-]+)+$"},"storage":{"type":"integer","minimum":0,"description":"Volume size in MiB."},"diskType":{"type":"string","description":"Disk type (LVM volume group)."},"filesystem":{"type":"string","enum":["ext4","xfs"],"description":"Filesystem of the volume: `ext4` (default when absent) or `xfs`. Fixed once the volume exists; an XFS volume can grow but not shrink."},"layout":{"type":"string","enum":["mirrored","striped"],"description":"How the volume is laid out over the node's disks: `mirrored` (default when absent) keeps two copies on separate disks and takes twice its size from node capacity and project quota; `striped` spreads it over every disk with no redundancy, so a failed disk loses it and it comes back from backup. Where a node has one disk, both are a plain volume of their own size. Fixed once the volume exists."},"encrypted":{"type":"boolean","description":"Encrypt the volume at rest (LUKS2 on the node, under a key kept wrapped under the cluster's root key and fetched by the node when the container starts). Absent = not encrypted. Fixed once the volume exists unless the volume is temporary; an encrypted volume can grow but not shrink, needs at least 64 MiB, and gives the filesystem 16 MiB less than its size."},"temporary":{"type":"boolean","description":"A cache whose contents may be thrown away: never backed up, not copied when the container moves to another node (it starts empty there), left empty by a restore, and made again empty instead of refused when it shrinks or changes filesystem or layout. Changing it redeploys nothing."}},"additionalProperties":false,"required":["name","mountPath","storage","diskType"]},"description":"Default volume definitions for new containers."},"env":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"stored":{"type":"string","description":"Keep the value currently stored under this key (the same key to leave it untouched, another key to carry it across a rename)."}},"additionalProperties":false,"required":["stored"]}]},"description":"The new environment variables for this service. Each value is either plaintext or `{ stored: <key> }` to keep the value currently stored under that key — the GET returns secret values redacted, and a redacted value sent back as plaintext is refused."},"files":{"type":"object","additionalProperties":{"anyOf":[{"type":"object","properties":{"content":{"type":"string"},"mode":{"type":"string"},"owner":{"type":"integer"}},"additionalProperties":false,"required":["content"]},{"type":"object","properties":{"stored":{"type":"string","description":"Keep the value currently stored under this key (the same key to leave it untouched, another key to carry it across a rename)."},"mode":{"type":"string"},"owner":{"type":"integer"}},"additionalProperties":false,"required":["stored"]}]},"description":"Files mounted for this service. Each entry carries either `content` or `{ stored: <path> }` to keep the content currently stored under that path — the GET returns secret contents redacted, and redacted content sent back as plaintext is refused. `mode` defaults to 0444; set `owner` (container-side uid) and `mode` when a process needs tight perms on its config. Both are sent as they are either way."},"applyUpgrade":{"type":"boolean","description":"If true and an upgrade is available, apply it during this update."},"addHook":{"type":"string","description":"JavaScript workflow code for container add hook. Set to empty string to clear."},"deleteHook":{"type":"string","description":"JavaScript workflow code for container delete hook. Set to empty string to clear."},"defaultCpu":{"type":"integer","minimum":1,"description":"Default CPU reservation for new containers, in deci-ECUs (10 = 1 ECU = throughput of one reference core). Converted to a raw cgroup quota at deploy time using the target node's perf_score."},"defaultMemory":{"type":"integer","minimum":6,"description":"Default memory for new containers in MiB."},"shmSize":{"type":"integer","minimum":1,"description":"Size of /dev/shm inside each container, in MiB. Bounded by the container's memory limit at the cgroup level; setting it higher than the memory limit just makes OOM more likely."},"dockerStorage":{"type":"integer","minimum":1,"description":"Max size of the container's writable overlay2 layer, in MiB. Only enforced on docker_xfs nodes; the layer is ephemeral (wiped on redeploy) — use a data volume for anything that must persist."},"defaultMinPerfScore":{"type":"number","minimum":0,"description":"Minimum node perf_score required to schedule containers of this service. 0 means no minimum."},"regionAffinity":{"type":"integer","minimum":-10,"maximum":10,"description":"Region placement preference: -10 (spread across regions) to 10 (cluster in same region)."},"requiredTags":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"description":"Container will only schedule on nodes that carry every tag listed here. Absolute hard constraint."},"tolerations":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"description":"Node taints this service is allowed to schedule onto. Tainted nodes are off-limits unless every taint appears here."},"placeNear":{"type":"array","items":{"type":"object","properties":{"serviceId":{"type":"string"},"level":{"type":"string","enum":["node","region"]}},"additionalProperties":false,"required":["serviceId","level"]},"description":"Services in the same project this one should be scheduled near: `node` prefers the same node as one of the target's containers, `region` the same region. A preference, never a rule. Omitted = unchanged. Existing containers move through the rebalancer, not on save."},"udpPort":{"type":"boolean","description":"Expose a UDP port directly on the worker node. Each container replica gets its own auto-allocated port from 10000-19999."},"tcpPorts":{"type":"array","items":{"type":"object","properties":{"containerPort":{"type":"integer","minimum":1,"maximum":65535}},"additionalProperties":false,"required":["containerPort"]},"description":"TCP ports to expose on gateway nodes. External ports are auto-allocated from 10000-19999."},"autoscaleMin":{"type":"integer","minimum":1,"maximum":20,"description":"Minimum replica count for autoscaling. Omit or set to null to disable autoscaling."},"autoscaleMax":{"type":"integer","minimum":1,"maximum":20,"description":"Maximum replica count for autoscaling."},"autoscaleCpuTarget":{"type":"integer","minimum":1,"maximum":100,"description":"Target CPU utilization percentage for autoscaling (1-100)."},"sidecars":{"type":"array","items":{"type":"object","properties":{"targetServiceId":{"type":"string","format":"uuid"},"listenPort":{"type":"integer","minimum":1,"maximum":65535},"targetPort":{"type":"integer","minimum":1,"maximum":65535},"protocol":{"type":"string","enum":["tcp","http"]},"stickyHeader":{"type":"string","description":"Best-effort sticky routing: requests carrying this header are consistent-hashed to a backend so the same value sticks to one container (http protocol only)."}},"additionalProperties":false,"required":["targetServiceId","listenPort","targetPort"]},"description":"Envoy load-balancing sidecars for this service. protocol `tcp` (default) balances connections; `http` balances per request."},"previewsEnabled":{"type":"boolean","description":"Whether PR preview deployments are enabled."},"previewPrefix":{"type":"string","pattern":"^[a-z0-9]{1,31}$","description":"Older form of previewPorts with one entry: the hostname prefix. Ignored when previewPorts is sent."},"previewPort":{"type":"integer","minimum":1,"maximum":65535,"description":"Older form of previewPorts with one entry: the port. Ignored when previewPorts is sent."},"previewPorts":{"type":"array","items":{"type":"object","properties":{"prefix":{"type":"string","pattern":"^[a-z0-9]{1,31}$","description":"Hostname prefix: this port's preview hostnames are <prefix>-<slug>.<preview-domain>. 1-31 lowercase letters or digits, no hyphens, unique across the cluster."},"port":{"type":"integer","minimum":1,"maximum":65535}},"additionalProperties":false,"required":["prefix","port"]},"description":"The ports a preview exposes, one hostname each; the first is the main one. Required (or previewPrefix + previewPort) when previews are enabled."},"previewEnv":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"stored":{"type":"string","description":"Keep the value currently stored under this key (the same key to leave it untouched, another key to carry it across a rename)."}},"additionalProperties":false,"required":["stored"]}]},"description":"Environment variables applied over `env` in every preview container. Values as in `env` (plaintext, or `{ stored: <key> }` to keep a stored value). Omit to keep the stored block."},"previewTeardownCommand":{"type":"string","description":"Command run as a one-shot container when a preview is deleted, to clean up external resources."},"previewPublic":{"type":"boolean","description":"Serve this service's previews without authentication. Off by default: a preview hostname is guessable (the slug is a PR number or branch name), so previews are firewalled unless a service opts out. Turning it on also lets anyone who finds the URL trigger a cold start, which spends the project's quota."},"previewFirewall":{"type":"array","items":{"type":"string"},"description":"Usernames, @groups and external email addresses allowed to reach this service's previews. Only consulted when previewPublic is false, and an empty list then denies everyone. Defaults to ['@members'] — the project's current membership."},"previewExceptions":{"type":"string","description":"Comma-separated paths on preview hostnames served without authentication. A trailing `/*` matches the whole subtree. Only consulted when previewPublic is false. An excepted request can also start a stopped preview, so it spends the project's quota exactly as a public preview does — but for the named paths only."},"previewCsrfRelaxed":{"type":"boolean","description":"Allow cross-site deep-link navigations to previews, disabling the strict CSRF bounce to the app root. Off by default. Worth turning on for previews specifically: the link CI posts on a pull request is cross-site on every click, so with the bounce on, a deep link always lands on `/`."},"previewMaxActive":{"type":"integer","minimum":1,"description":"Most previews of this service allowed to hold a container at once. Activating another releases the least recently used one. Omit for no service-level cap — the project quota still applies."},"previewIdleTimeout":{"type":"integer","minimum":60,"description":"Seconds without a request before a preview's container is released. It starts again on the next request. Omit to keep previews running until they are evicted or deleted."},"tailSampling":{"type":"object","properties":{"policies":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["alwaysSample","errors","latency","probabilistic","and"]},"thresholdMs":{"type":"integer","minimum":0,"maximum":3600000},"percent":{"type":"number","minimum":0,"maximum":100},"policies":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["alwaysSample","errors","latency","probabilistic"]},"thresholdMs":{"type":"integer","minimum":0,"maximum":3600000},"percent":{"type":"number","minimum":0,"maximum":100}},"additionalProperties":false,"required":["kind"]}}},"additionalProperties":false,"required":["kind"]}}},"additionalProperties":false,"required":["policies"],"description":"Per-service OTLP trace tail-sampling rules. Each entry is OR'd at the sampler — a trace is kept if any policy fires. Omit (or send an empty `policies` array) to fall back to the cluster default (sample all)."},"tcpAccess":{"type":"array","items":{"type":"object","properties":{"port":{"type":"integer","minimum":1,"maximum":65535},"users":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["port","users"]},"description":"Per-port Nebula access grants, independent of full project-level mesh access. Each entry's `users` is a bare username or `@group` reference, same shape as a DNS record's `firewall` field."}},"additionalProperties":false,"required":["name","description","accesses","image","privileged","blockEgress","customDomainsEnabled","readOnly","tmpfsMounts","command","defaultVolumes","env","files","defaultCpu","defaultMemory","shmSize","dockerStorage","defaultMinPerfScore","regionAffinity","requiredTags","tolerations","udpPort","tcpPorts","sidecars","previewsEnabled"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/duplicate":{"post":{"tags":["Services"],"summary":"Duplicate service.","operationId":"api_services_id_duplicate_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","description":"The service ID.","required":true,"schema":{"type":"string","format":"uuid","description":"The service ID."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the new service."}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/env/reveal":{"post":{"tags":["Services"],"summary":"Reveal environment variable values.","description":"Returns the stored plaintext of the named environment variables and records a `reveal` audit entry. Every other response returns env values redacted.","operationId":"api_services_id_env_reveal_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"The environment variables to reveal."}},"additionalProperties":false,"required":["keys"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"object","additionalProperties":{"type":"string"},"description":"The stored (unredacted) values, by key."}},"additionalProperties":false,"required":["values"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/files/reveal":{"post":{"tags":["Services"],"summary":"Reveal file contents.","description":"Returns the stored contents of the named mounted files and records a `reveal` audit entry. Every other response returns file contents redacted.","operationId":"api_services_id_files_reveal_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"The paths of the files to reveal."}},"additionalProperties":false,"required":["keys"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"object","additionalProperties":{"type":"string"},"description":"The stored (unredacted) values, by key."}},"additionalProperties":false,"required":["values"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/preview-env/reveal":{"post":{"tags":["Services"],"summary":"Reveal preview environment variable values.","description":"Returns the stored plaintext of the named variables of the service's preview env block and records a `reveal` audit entry.","operationId":"api_services_id_preview-env_reveal_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"The environment variables to reveal."}},"additionalProperties":false,"required":["keys"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"object","additionalProperties":{"type":"string"},"description":"The stored (unredacted) values, by key."}},"additionalProperties":false,"required":["values"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/clone":{"post":{"tags":["Services"],"summary":"Clone a service into another project.","operationId":"api_services_id_clone_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","description":"The source service ID.","required":true,"schema":{"type":"string","format":"uuid","description":"The source service ID."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","description":"The target project ID to clone the service into."},"name":{"type":"string","description":"Name for the cloned service. Defaults to the source name; must be free in the target project."},"includeData":{"type":"boolean","description":"Recreate the source's live containers in the target project and restore each from its latest backup. When false, only the service config is cloned (no containers)."},"acknowledgeNoBackups":{"type":"boolean","description":"Required when includeData is set and a source container has disks but no backup to restore — confirms those disks come back empty."}},"additionalProperties":false,"required":["project","includeData"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the cloned service."}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/check-upgrade":{"post":{"tags":["Services"],"summary":"Check for available upgrades.","operationId":"api_services_id_check-upgrade_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","description":"The service ID.","required":true,"schema":{"type":"string","format":"uuid","description":"The service ID."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean","description":"Whether an upgrade is available."},"version":{"type":"string","description":"The available version digest, if any."},"tag":{"type":"string","description":"A newer tag within the same major version, if any. Independent of the digest check."}},"additionalProperties":false,"required":["available"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/updates":{"get":{"tags":["Services"],"summary":"List services with an available image update.","description":"Cross-project summary of services whose available_version and/or available_tag is set by the daily image-update check, for the dashboard home 'outstanding updates' panel. Scoped to the caller's own project memberships — admins are not implicitly members, so a project's outstanding updates only surface for its actual members.","operationId":"api_services_updates_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"serviceId":{"type":"string"},"serviceName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"image":{"type":"string","description":"The currently pinned image ref."},"availableVersion":{"type":"string","description":"A newer digest for the pinned tag, if any."},"availableTag":{"type":"string","description":"A newer tag within the same major version, if any."}},"additionalProperties":false,"required":["serviceId","serviceName","projectId","projectName","image"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/redeploy":{"post":{"tags":["Services"],"summary":"Redeploy all containers for a service.","operationId":"api_services_id_redeploy_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","description":"The service ID.","required":true,"schema":{"type":"string","format":"uuid","description":"The service ID."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/restore":{"post":{"tags":["Services"],"summary":"Restore a soft-deleted service.","operationId":"api_services_id_restore_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledgeNoBackups":{"type":"boolean","description":"Required when the service has volumes on any container but no backups configured — confirms disks will come back empty."}},"additionalProperties":false,"required":["acknowledgeNoBackups"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/restore-version/{auditId}":{"post":{"tags":["Services"],"summary":"Restore service to a previous audit log version.","operationId":"api_services_id_restore-version_auditId_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"auditId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{serviceId}/backups/enable":{"post":{"tags":["Services"],"summary":"Enable backups for a service","operationId":"api_services_serviceId_backups_enable_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"serviceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{serviceId}/backups/start":{"post":{"tags":["Services"],"summary":"Start service backup","operationId":"api_services_serviceId_backups_start_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"serviceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{serviceId}/backups/stats":{"get":{"tags":["Services"],"summary":"Get backup statistics for a service","operationId":"api_services_serviceId_backups_stats_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"serviceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"totalSize":{"type":"number","description":"Bytes the service's backup repository occupies in the backup bucket (0 before the first backup)."}},"additionalProperties":false,"required":["totalSize"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{serviceId}/backups":{"get":{"tags":["Services"],"summary":"List all backup snapshots for a service","description":"Admins may pass the id of a service this cluster has no record of, to list a backup repository left in the bucket by a previous cluster.","operationId":"api_services_serviceId_backups_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"serviceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"repoExists":{"type":"boolean","description":"Whether the restic repository for this service exists on the configured S3 backend yet. False means backups are enabled but no backup has run against the current backend yet — the repo will be created on the next scheduled backup."},"snapshots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The snapshot ID."},"runId":{"type":"string","description":"The backup run ID shared by all volumes in the same backup. Absent for legacy snapshots."},"time":{"type":"string","format":"date-time","description":"The time the backup was created."},"size":{"type":"integer","description":"The size of the backup in bytes."},"container":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The container ID."},"address":{"type":"string","description":"The Nebula address of the container, if it exists."}},"additionalProperties":false,"required":["id"],"description":"The container this backup was taken from."}},"additionalProperties":false,"required":["id","time","size","container"]},"description":"List of all snapshots for this service."}},"additionalProperties":false,"required":["repoExists","snapshots"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{serviceId}/backups/{snapshotId}/delete":{"delete":{"tags":["Services"],"summary":"Delete a single backup snapshot","operationId":"api_services_serviceId_backups_snapshotId_delete_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"serviceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"snapshotId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{serviceId}/backups/container/{containerId}/delete":{"delete":{"tags":["Services"],"summary":"Delete all backups for a specific container","operationId":"api_services_serviceId_backups_container_containerId_delete_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"serviceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"containerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"additionalProperties":false,"required":["success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{serviceId}/backups/{snapshotId}/download":{"get":{"tags":["Services"],"summary":"Download service backup as ZIP","operationId":"api_services_serviceId_backups_snapshotId_download_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"serviceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"snapshotId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/webhook":{"post":{"tags":["Services"],"summary":"Enable webhook-based auto-deploy for a service.","operationId":"api_services_id_webhook_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"webhookUrl":{"type":"string"}},"additionalProperties":false,"required":["webhookUrl"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Services"],"summary":"Disable webhook-based auto-deploy for a service.","operationId":"api_services_id_webhook_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/preview/token":{"post":{"tags":["Services"],"summary":"Rotate the PR-preview webhook token.","operationId":"api_services_id_preview_token_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"webhookUrl":{"type":"string"}},"additionalProperties":false,"required":["webhookUrl"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/preview":{"get":{"tags":["Services"],"summary":"List PR previews for a service.","operationId":"api_services_id_preview_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"previews":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"imageTag":{"type":"string"},"imageDigest":{"type":"string"},"hostname":{"type":"string","description":"The main hostname (the first preview port)."},"hostnames":{"type":"array","items":{"type":"object","properties":{"prefix":{"type":"string"},"port":{"type":"integer"},"hostname":{"type":"string"}},"additionalProperties":false,"required":["prefix","port","hostname"]},"description":"One hostname per preview port, main first."},"env":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":"string","description":"The value, with every secret-shaped token masked (`•`)."},"redacted":{"type":"boolean","description":"Whether anything was masked. A redacted value's plaintext is only available from the matching `reveal` endpoint, which is audited."}},"additionalProperties":false,"required":["value","redacted"]},"description":"This preview's own environment overrides, redacted. Reveal with POST /api/services/{id}/preview/{previewId}/env/reveal (audited)."},"createdAt":{"type":"string"},"lastSeenAt":{"type":"string"},"teardownState":{"type":"string"},"teardownOutput":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false,"required":["id","slug","imageTag","imageDigest","hostname","hostnames","env","createdAt","lastSeenAt","teardownState"]}}},"additionalProperties":false,"required":["previews"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/preview/{previewId}":{"delete":{"tags":["Services"],"summary":"Delete a PR preview (runs teardown command first, if configured).","operationId":"api_services_id_preview_previewId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"previewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/preview/{previewId}/refresh-image":{"post":{"tags":["Services"],"summary":"Re-resolve a PR preview's image tag to its current digest, redeploying it if the tag has moved.","description":"The CI webhook is normally the only thing that updates a preview's digest. This does the same resolution on demand, for a push whose webhook call never landed. It is a no-op for a tag qualified by commit, which can never resolve to a new digest.","operationId":"api_services_id_preview_previewId_refresh-image_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"previewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"boolean"},"imageTag":{"type":"string"},"imageDigest":{"type":"string"}},"additionalProperties":false,"required":["updated","imageTag","imageDigest"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/preview/{previewId}/env":{"put":{"tags":["Services"],"summary":"Set a PR preview's own environment overrides.","description":"Replaces the preview's overrides and redeploys its container if it is running; a cold preview picks them up when it is next opened. Applied over the service's env and its preview env block, key by key.","operationId":"api_services_id_preview_previewId_env_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"previewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"env":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"stored":{"type":"string","description":"Keep the value currently stored under this key (the same key to leave it untouched, another key to carry it across a rename)."}},"additionalProperties":false,"required":["stored"]}]},"description":"The overrides. Values as in a service's `env`: plaintext, or `{ stored: <key> }` to keep a stored value."}},"additionalProperties":false,"required":["env"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/preview/{previewId}/env/reveal":{"post":{"tags":["Services"],"summary":"Reveal a PR preview's environment override values.","description":"Returns the stored plaintext of the named overrides and records a `reveal` audit entry. Every other response returns them redacted.","operationId":"api_services_id_preview_previewId_env_reveal_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"previewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"The environment variables to reveal."}},"additionalProperties":false,"required":["keys"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"object","additionalProperties":{"type":"string"},"description":"The stored (unredacted) values, by key."}},"additionalProperties":false,"required":["values"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/preview/{previewId}/retry-teardown":{"post":{"tags":["Services"],"summary":"Retry a failed teardown for a PR preview.","operationId":"api_services_id_preview_previewId_retry-teardown_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"previewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/preview/{previewId}/force-delete":{"post":{"tags":["Services"],"summary":"Force-delete a PR preview, skipping the teardown command. External resources will NOT be cleaned up.","operationId":"api_services_id_preview_previewId_force-delete_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"previewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/set-replicas":{"post":{"tags":["Services"],"summary":"Set the desired replica count for a service.","operationId":"api_services_id_set-replicas_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"replicas":{"type":"integer","minimum":0,"maximum":20,"description":"Desired number of containers (0-20)."}},"additionalProperties":false,"required":["replicas"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"array","items":{"type":"string"}},"removed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["added","removed"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/workflow/retry":{"post":{"tags":["Services"],"summary":"Retry a failed workflow from the last successful step.","operationId":"api_services_id_workflow_retry_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","finished"]},"hookType":{"type":"string","enum":["add","delete"]},"replayLog":{"type":"array","items":{}},"command":{},"unlocksAt":{"type":"number"},"error":{"type":"string"}},"additionalProperties":false,"required":["status","hookType","replayLog"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/workflow":{"delete":{"tags":["Services"],"summary":"Cancel an active workflow.","operationId":"api_services_id_workflow_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"destroy","in":"query","description":"For delete workflows: whether to destroy the container. Defaults to false (keep).","required":false,"schema":{"type":"boolean","description":"For delete workflows: whether to destroy the container. Defaults to false (keep)."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/placement-scores":{"get":{"tags":["Services"],"summary":"Get placement scores for all containers in a service.","description":"Returns per-container placement scores showing current score, best alternative, threshold, and potential improvement. Useful for debugging the rebalancer.","operationId":"api_services_id_placement-scores_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"regionAffinity":{"type":"integer"},"scores":{"type":"array","items":{"type":"object","properties":{"containerId":{"type":"string"},"containerAddress":{"type":"string"},"currentScore":{"type":"number"},"bestScore":{"type":"number"},"bestNodeId":{"type":"string"},"bestNodeAddress":{"type":"string"},"threshold":{"type":"number"},"improvement":{"type":"number"}},"additionalProperties":false,"required":["containerId","containerAddress","currentScore","bestScore","threshold","improvement"]}}},"additionalProperties":false,"required":["regionAffinity","scores"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/logs":{"get":{"tags":["Services"],"summary":"Query service logs.","operationId":"api_services_id_logs_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"start","in":"query","description":"Start time (RFC3339 or Unix nanoseconds).","required":true,"schema":{"type":"string","description":"Start time (RFC3339 or Unix nanoseconds)."}},{"name":"end","in":"query","description":"End time (RFC3339 or Unix nanoseconds).","required":true,"schema":{"type":"string","description":"End time (RFC3339 or Unix nanoseconds)."}},{"name":"limit","in":"query","description":"Maximum number of log lines to return.","required":false,"schema":{"type":"string","description":"Maximum number of log lines to return."}},{"name":"container","in":"query","description":"Filter by container ID.","required":false,"schema":{"type":"string","format":"uuid","description":"Filter by container ID."}},{"name":"search","in":"query","description":"Filter by log line content.","required":false,"schema":{"type":"string","description":"Filter by log line content."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"streams":{"type":"array","items":{"type":"object","properties":{"stream":{"type":"object","additionalProperties":{"type":"string"}},"values":{"type":"array","items":{"type":"array","items":{"type":"string"}}}},"additionalProperties":false,"required":["stream","values"]}}},"additionalProperties":false,"required":["streams"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/metrics":{"get":{"tags":["Services"],"summary":"Resource metrics for every container in a service over a selectable time window.","operationId":"api_services_id_metrics_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"start":{"type":"number"},"end":{"type":"number"},"step":{"type":"number"},"series":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"cpu":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cpuThrottled":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"memory":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"networkRx":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"networkTx":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"diskRead":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"diskWrite":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cpuLimit":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"memoryLimit":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","cpu","cpuThrottled","memory","networkRx","networkTx","diskRead","diskWrite","cpuLimit","memoryLimit"]}},"volumes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"seriesKey":{"type":"string"},"volume":{"type":"string"},"usage":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"fraction":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","seriesKey","volume","usage","fraction"]}},"ingress":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"requestsPerSec":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"errorRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"avgLatencyMs":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","requestsPerSec","errorRate","avgLatencyMs"]}},"errors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["key","message"]}}},"additionalProperties":false,"required":["range","start","end","step","series","volumes","ingress","errors"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/visitor-geography":{"get":{"tags":["Services"],"summary":"Ingress request counts for this service by visitor country.","operationId":"api_services_id_visitor-geography_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"countries":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2, or `unknown` for a request whose address the database could not place."},"requests":{"type":"number"}},"additionalProperties":false,"required":["country","requests"]},"description":"Descending by request count."}},"additionalProperties":false,"required":["total","countries"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/rum-metrics":{"get":{"tags":["Services"],"summary":"Web Vitals (TTFB / FCP / LCP / CLS / INP) p75 per ingress domain.","operationId":"api_services_id_rum-metrics_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"start":{"type":"number"},"end":{"type":"number"},"step":{"type":"number"},"domains":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"ttfb":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"fcp":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"lcp":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cls":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"inp":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"exceptionRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"pageViewRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","ttfb","fcp","lcp","cls","inp","exceptionRate","pageViewRate"]}},"errors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["key","message"]}}},"additionalProperties":false,"required":["range","start","end","step","domains","errors"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/rum-exceptions":{"get":{"tags":["Services"],"summary":"Recent uncaught JavaScript exceptions reported by Faro, with stack traces.","operationId":"api_services_id_rum-exceptions_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"range","in":"query","description":"How far back to look.","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d"],"description":"How far back to look."}},{"name":"limit","in":"query","description":"Max rows (default 100).","required":false,"schema":{"type":"string","description":"Max rows (default 100)."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"exceptions":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"number"},"type":{"type":"string"},"value":{"type":"string"},"stacktrace":{"type":"string"},"pageUrl":{"type":"string"},"browser":{"type":"string"},"sessionId":{"type":"string"},"userId":{"type":"string"},"traceId":{"type":"string"}},"additionalProperties":false,"required":["timestamp","type","value","stacktrace","pageUrl","browser","sessionId","userId","traceId"]}}},"additionalProperties":false,"required":["exceptions"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/profile":{"get":{"tags":["Services"],"summary":"CPU / memory / goroutine flame graph for a service over a time window.","operationId":"api_services_id_profile_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"range":{"type":"string","enum":["15m","1h","6h","24h","7d"]},"start":{"type":"number"},"end":{"type":"number"},"units":{"type":"string"},"sampleRate":{"type":"number"},"flamebearer":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"}},"levels":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"numTicks":{"type":"number"},"maxSelf":{"type":"number"}},"additionalProperties":false,"required":["names","levels","numTicks","maxSelf"]}},"additionalProperties":false,"required":["type","range","start","end","units","sampleRate","flamebearer"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/profile-types":{"get":{"tags":["Services"],"summary":"Available Pyroscope profile types in the service's project.","operationId":"api_services_id_profile-types_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"profileTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sampleType":{"type":"string"},"sampleUnit":{"type":"string"},"periodType":{"type":"string"},"periodUnit":{"type":"string"}},"additionalProperties":false,"required":["id","name","sampleType","sampleUnit","periodType","periodUnit"]}}},"additionalProperties":false,"required":["profileTypes"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/autoscale-status":{"get":{"tags":["Services"],"summary":"Get autoscaling status for a service.","operationId":"api_services_id_autoscale-status_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"totalCpuCores":{"type":"number"},"totalAllocatedCores":{"type":"number"},"cpuPercent":{"type":"number"},"currentCount":{"type":"integer"},"requiredCapacity":{"type":"number"},"deficit":{"type":"number"},"additionalNeeded":{"type":"integer"},"excess":{"type":"integer"},"rawDesired":{"type":"integer"},"desired":{"type":"integer"},"scaleUpIn":{"type":"integer"},"scaleDownIn":{"type":"integer"},"lastError":{"type":"object","properties":{"message":{"type":"string"},"timestamp":{"type":"number"}},"additionalProperties":false,"required":["message","timestamp"]}},"additionalProperties":false,"required":["enabled"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/ca":{"get":{"tags":["Services"],"summary":"Get the CA certificate for a service.","description":"Returns the PEM-encoded CA certificate users should trust when connecting to the service's TLS endpoint. The leaf cert and key are never returned via this endpoint — only containers need those, and they get them via runtime placeholders.","operationId":"api_services_id_ca_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"caCert":{"type":"string","description":"PEM-encoded CA certificate."}},"additionalProperties":false,"required":["caCert"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/rotate-ca":{"post":{"tags":["Services"],"summary":"Rotate the CA for a service.","description":"Destructive: generates a fresh CA and leaf cert for the service and redeploys its containers. Any client that pinned the old CA must be updated to trust the new one.","operationId":"api_services_id_rotate-ca_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/custom-domains":{"get":{"tags":["Services"],"summary":"List custom domains attached to a service.","description":"Returns every custom domain attached to this service, together with the DNS records the domain's owner has to publish: the verification TXT, and the A/AAAA targets of this cluster's custom-domain gateways.","operationId":"api_services_id_custom-domains_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"port":{"type":"number"},"verified":{"type":"boolean"},"lastCheckedAt":{"type":"string"},"lastError":{"type":"string"}},"additionalProperties":false,"required":["id","domain","port","verified"]}},"verifyRecordSuffix":{"type":"string","description":"Label the verification TXT is published at, prefixed to the domain."},"verifyRecordValue":{"type":"string","description":"Value the verification TXT must START with. oneDeploy reads only the first \";\"-separated segment, so the record may carry a second token after it — e.g. `<value>; myapp=abc123` — letting the domain owner publish ONE TXT that both oneDeploy and the tenant application can verify against."},"gatewayIpv4":{"type":"array","items":{"type":"string"}},"gatewayIpv6":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["domains","verifyRecordSuffix","verifyRecordValue","gatewayIpv4","gatewayIpv6"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Services"],"summary":"Attach a custom domain to a service.","description":"Registers the domain against this service. It is NOT served yet: the owner must publish the verification TXT (value beginning with this service id; anything after a \";\" is ignored by oneDeploy and free for the caller's own token) and point A/AAAA at the custom-domain gateways, then call the verify endpoint, which issues the certificate.","operationId":"api_services_id_custom-domains_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253},"port":{"type":"number","minimum":1,"maximum":65535}},"additionalProperties":false,"required":["domain","port"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/custom-domains/{domainId}":{"delete":{"tags":["Services"],"summary":"Detach a custom domain from a service.","description":"Stops serving the domain. Its certificate is reaped by the next renewal sweep rather than deleted here, so a re-attach within the window does not need a fresh issuance.","operationId":"api_services_id_custom-domains_domainId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/custom-domains/{domainId}/verify":{"post":{"tags":["Services"],"summary":"Verify a custom domain and issue its certificate.","description":"Checks the ownership TXT record, then (on success) runs the DNS and CAA pre-checks and orders a certificate. Safe to call repeatedly — an already-issued domain returns its current state without re-ordering.","operationId":"api_services_id_custom-domains_domainId_verify_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"verified":{"type":"boolean"},"certificateIssued":{"type":"boolean"},"error":{"type":"string"}},"additionalProperties":false,"required":["verified","certificateIssued"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/senders":{"get":{"tags":["Services"],"summary":"List allowed sender inboxes for a service.","operationId":"api_services_id_senders_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"senders":{"type":"array","items":{"type":"object","properties":{"inboxId":{"type":"string"},"emailDomainId":{"type":"string"},"domain":{"type":"string"},"localPart":{"type":"string"},"address":{"type":"string"},"kind":{"type":"string","enum":["mailbox","mailing_list"]}},"additionalProperties":false,"required":["inboxId","emailDomainId","domain","localPart","address","kind"]}}},"additionalProperties":false,"required":["senders"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Services"],"summary":"Allow a service to send AS this address.","operationId":"api_services_id_senders_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inboxId":{"type":"string"},"emailDomainId":{"type":"string"},"localPart":{"type":"string","pattern":"^[a-z0-9]([a-z0-9._-]*[a-z0-9])?$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"inboxId":{"type":"string"}},"additionalProperties":false,"required":["inboxId"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/senders/{inboxId}":{"delete":{"tags":["Services"],"summary":"Revoke a service's permission to send AS this address.","operationId":"api_services_id_senders_inboxId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/ingress-grants":{"get":{"tags":["Services"],"summary":"List the ports a service shares with other projects.","description":"The service's ingress grants (another project may point INGRESS records at that port), and the records in other projects' zones that point at the service and whether each routes.","operationId":"api_services_id_ingress-grants_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"projectName":{"type":"string"},"port":{"type":"integer"},"grantedBy":{"type":"string"},"grantedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["projectId","projectName","port","grantedBy","grantedAt"]}},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fqdn":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"port":{"type":"integer"},"routable":{"type":"boolean"}},"additionalProperties":false,"required":["id","fqdn","projectId","projectName","port","routable"]}}},"additionalProperties":false,"required":["grants","records"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Services"],"summary":"Set the ports a service shares with other projects.","description":"Replaces the service's ingress grants. A grant lets another project point INGRESS records at that one port; that project's records decide who may reach it under their hostnames. Any project may be named. Needs a recent passkey confirmation.","operationId":"api_services_id_ingress-grants_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"port":{"type":"integer","minimum":1,"maximum":65535}},"additionalProperties":false,"required":["projectId","port"]},"maxItems":100}},"additionalProperties":false,"required":["grants"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"projectName":{"type":"string"},"port":{"type":"integer"},"grantedBy":{"type":"string"},"grantedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["projectId","projectName","port","grantedBy","grantedAt"]}}},"additionalProperties":false,"required":["grants"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/{id}/secret-files":{"get":{"tags":["Services"],"summary":"List a service's secret files (never their contents).","operationId":"api_services_id_secret-files_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"},"mode":{"type":"string"},"owner":{"type":"integer"},"size":{"type":"integer"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"}},"additionalProperties":false,"required":["id","path","mode","owner","size","updatedAt","updatedBy"]}},"limits":{"type":"object","properties":{"maxFiles":{"type":"integer"},"maxFileBytes":{"type":"integer"},"maxTotalBytes":{"type":"integer"}},"additionalProperties":false,"required":["maxFiles","maxFileBytes","maxTotalBytes"]}},"additionalProperties":false,"required":["files","limits"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Services"],"summary":"Replace a service's secret files. Redeploys the service's containers.","description":"Each entry carries either `content` (new content, UTF-8 or `encoding: base64`) or `keep` (the id of a stored file whose content stays; its path, mode and owner may change). Files not listed are deleted. Stored wrapped under the cluster's root key, so a control plane that does not hold it refuses with 409.","operationId":"api_services_id_secret-files_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"mode":{"type":"string","description":"Octal permission bits, e.g. `0440`. Default `0444`."},"owner":{"type":"integer","description":"The owning uid inside the container. Default 0."},"content":{"type":"string"},"encoding":{"type":"string","enum":["utf8","base64"]},"keep":{"type":"string"}},"additionalProperties":false,"required":["path"]}}},"additionalProperties":false,"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"},"mode":{"type":"string"},"owner":{"type":"integer"},"size":{"type":"integer"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"}},"additionalProperties":false,"required":["id","path","mode","owner","size","updatedAt","updatedBy"]}},"limits":{"type":"object","properties":{"maxFiles":{"type":"integer"},"maxFileBytes":{"type":"integer"},"maxTotalBytes":{"type":"integer"}},"additionalProperties":false,"required":["maxFiles","maxFileBytes","maxTotalBytes"]}},"additionalProperties":false,"required":["files","limits"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/services/placeholders":{"post":{"tags":["Services"],"summary":"Evaluate placeholders.","description":"Evaluate placeholders in the specified string, which is useful for getting actual environment variables or files provided to services.","operationId":"api_services_placeholders_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"string","description":"The input data in which placeholders will be replaced."},"project":{"type":"string","minLength":1,"description":"The project to evaluate in — the one owning the service being edited. $hosts() references resolve within it, exactly as they will at deploy time."},"localhost":{"type":"string","description":"IPv6 address to use for $localhost. Defaults to ::1 when not provided."}},"additionalProperties":false,"required":["input","project"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"type":"string","description":"The input data with replaced placeholders."}},"additionalProperties":false,"required":["output"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/node-unlock":{"post":{"tags":["Nodes"],"summary":"Fetch a node's volume keys (called by the node).","operationId":"api_node-unlock_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"sealed":{"type":"string"}},"additionalProperties":false,"required":["sealed"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kms":{"get":{"tags":["Cluster"],"summary":"The cluster's root key: which control planes hold it","description":"Whether each control plane is sealed or unsealed, how it was last unsealed, which admins hold a sealed copy of the root key, the caller's own copy (ciphertext only their passkey opens), the latest seal and unseal events, and insights over the last `days` days (default 7): how much of the time each control plane held the key, how it got it back, nightly reboots that waited for a peer, and every period in which no control plane held it. Nothing is encrypted under the root key yet.","operationId":"api_kms_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rootKey":{"type":["object","null"],"properties":{"createdAt":{"type":"string"},"createdByNode":{"type":["string","null"]}},"additionalProperties":false,"required":["createdAt","createdByNode"]},"controlPlanes":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"address":{"type":"string"},"reporting":{"type":"boolean"},"stale":{"type":"boolean"},"sealed":{"type":"boolean"},"sealedSince":{"type":["string","null"]},"unsealedAt":{"type":["string","null"]},"unsealMethod":{"type":["string","null"]},"unsealedBy":{"type":["string","null"]},"lastError":{"type":["string","null"]},"lastSeenAt":{"type":["string","null"]},"sealRequested":{"type":"boolean"},"adminUnsealKey":{"type":["string","null"]},"credentialEnrolled":{"type":"boolean"}},"additionalProperties":false,"required":["nodeId","address","reporting","stale","sealed","sealedSince","unsealedAt","unsealMethod","unsealedBy","lastError","lastSeenAt","sealRequested","adminUnsealKey","credentialEnrolled"]}},"admins":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"hasIdentityKey":{"type":"boolean"},"hasCopy":{"type":"boolean"}},"additionalProperties":false,"required":["username","hasIdentityKey","hasCopy"]}},"myCopy":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"nodeId":{"type":"string"},"address":{"type":["string","null"]},"at":{"type":"string"},"since":{"type":["string","null"]},"kind":{"type":"string"},"method":{"type":["string","null"]},"peerAddress":{"type":["string","null"]},"username":{"type":["string","null"]},"sealedSeconds":{"type":["number","null"]},"detail":{"type":["string","null"]}},"additionalProperties":false,"required":["id","nodeId","address","at","since","kind","method","peerAddress","username","sealedSeconds","detail"]}},"insights":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"controlPlanes":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"address":{"type":"string"},"heldShare":{"type":"number"},"starts":{"type":"integer"},"unsealedByPeer":{"type":"integer"},"unsealedByAdmin":{"type":"integer"},"unsealFailures":{"type":"integer"},"unsealSecondsMedian":{"type":["number","null"]},"unsealSecondsMax":{"type":["number","null"]},"rebootsHeld":{"type":"integer"},"rebootsTimedOut":{"type":"integer"}},"additionalProperties":false,"required":["nodeId","address","heldShare","starts","unsealedByPeer","unsealedByAdmin","unsealFailures","unsealSecondsMedian","unsealSecondsMax","rebootsHeld","rebootsTimedOut"]}},"noHolderSeconds":{"type":"number"},"noHolderPeriods":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":["number","null"]},"seconds":{"type":"number"}},"additionalProperties":false,"required":["from","to","seconds"]}},"adminUnseals":{"type":"integer"}},"additionalProperties":false,"required":["from","to","controlPlanes","noHolderSeconds","noHolderPeriods","adminUnseals"]}},"additionalProperties":false,"required":["rootKey","controlPlanes","admins","myCopy","events","insights"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kms/summary":{"get":{"tags":["Cluster"],"summary":"Whether any control plane holds the root key","description":"For the admin home page's notice: whether the root key exists, how many live control planes there are, how many hold the key right now, and how many live containers need it to start (encrypted volumes or secret files).","operationId":"api_kms_summary_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rootKey":{"type":"boolean"},"controlPlanes":{"type":"integer"},"holders":{"type":"integer"},"dependentContainers":{"type":"integer"}},"additionalProperties":false,"required":["rootKey","controlPlanes","holders","dependentContainers"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kms/unseal":{"post":{"tags":["Cluster"],"summary":"Unseal control planes with the caller's copy of the root key","description":"The admin's browser opens their sealed copy of the root key with a passkey and seals it to each sealed control plane's one-time key; this leaves it for that control plane to pick up. The server never sees the root key in the clear on this path.","operationId":"api_kms_unseal_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"unseals":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"adminUnsealKey":{"type":"string"},"sealed":{"type":"string","maxLength":4096}},"additionalProperties":false,"required":["nodeId","adminUnsealKey","sealed"]},"maxItems":32}},"additionalProperties":false,"required":["unseals"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["accepted"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kms/seal":{"post":{"tags":["Cluster"],"summary":"Seal control planes (a drill)","description":"Ask control planes to drop the root key from memory. With some named, a sealed one unseals again from a peer within seconds, which is how the peer path is practised; with none named, every control plane seals and an admin must unseal one. Nothing is encrypted under the root key yet, so this costs nothing.","operationId":"api_kms_seal_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nodeIds":{"type":"array","items":{"type":"string"},"maxItems":32}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"requested":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["requested"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/keys":{"get":{"tags":["Signing"],"summary":"List your signing keys.","operationId":"api_signing_keys_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"keyId":{"type":"string"},"model":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"},"revokedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","name","keyId","model","createdAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/keys/{id}":{"delete":{"tags":["Signing"],"summary":"Revoke one of your signing keys. It leaves every signing group; signatures it already made stay valid.","operationId":"api_signing_keys_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/enrollments":{"post":{"tags":["Signing"],"summary":"Create a single-use link to enroll a signing key with the CLI. Needs a recent passkey tap.","description":"A stolen session must not be able to enroll an attacker's security key: attestation proves a key is a YubiKey, not whose.","operationId":"api_signing_enrollments_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"additionalProperties":false,"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["command","expiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/enroll/start":{"post":{"tags":["Signing"],"summary":"Begin an enrollment (called by the CLI with its token).","operationId":"api_signing_enroll_start_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","maxLength":200}},"additionalProperties":false,"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rpId":{"type":"string"},"challenge":{"type":"string"},"username":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"excludeCredentials":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["rpId","challenge","username","userId","name","excludeCredentials"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/enroll/finish":{"post":{"tags":["Signing"],"summary":"Finish an enrollment (called by the CLI with its token).","operationId":"api_signing_enroll_finish_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","maxLength":200},"credentialId":{"type":"string","maxLength":2000},"clientDataJson":{"type":"string","maxLength":2000},"attestationObject":{"type":"string","maxLength":20000},"mlDsaPublicKey":{"type":"string","maxLength":4000},"proof":{"type":"object","properties":{"authenticatorData":{"type":"string","maxLength":2000},"ed25519":{"type":"string","maxLength":200},"mlDsa65":{"type":"string","maxLength":8000}},"additionalProperties":false,"required":["authenticatorData","ed25519","mlDsa65"]}},"additionalProperties":false,"required":["token","credentialId","clientDataJson","attestationObject","mlDsaPublicKey","proof"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string"},"model":{"type":"string"}},"additionalProperties":false,"required":["keyId","model"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/endorsement-key":{"get":{"tags":["Signing"],"summary":"The cluster's policy-endorsement public key, to pin. Unauthenticated.","operationId":"api_signing_endorsement-key_get","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string"},"ed25519":{"type":"string"},"mlDsa65":{"type":"string"}},"additionalProperties":false,"required":["keyId","ed25519","mlDsa65"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/sign/task":{"post":{"tags":["Signing"],"summary":"Fetch a task to sign (called by the CLI with its token).","operationId":"api_signing_sign_task_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","maxLength":200}},"additionalProperties":false,"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"string"},"status":{"type":"string"},"username":{"type":"string"},"header":{"type":"string"},"document":{"type":"string"},"threshold":{"type":"number"},"signers":{"type":"array","items":{"type":"string"}},"alreadySigned":{"type":"boolean"},"credentials":{"type":"array","items":{"type":"object","properties":{"keyId":{"type":"string"},"credentialId":{"type":"string"}},"additionalProperties":false,"required":["keyId","credentialId"]}}},"additionalProperties":false,"required":["taskId","status","username","header","document","threshold","signers","alreadySigned","credentials"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/sign/submit":{"post":{"tags":["Signing"],"summary":"Submit a signature (called by the CLI with its token).","operationId":"api_signing_sign_submit_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","maxLength":200},"signature":{"type":"object","properties":{"keyId":{"type":"string","maxLength":64},"authenticatorData":{"type":"string","maxLength":2000},"ed25519":{"type":"string","maxLength":200},"mlDsa65":{"type":"string","maxLength":8000}},"additionalProperties":false,"required":["keyId","authenticatorData","ed25519","mlDsa65"]}},"additionalProperties":false,"required":["token","signature"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"signers":{"type":"number"},"threshold":{"type":"number"}},"additionalProperties":false,"required":["status","signers","threshold"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/webhook/{id}":{"post":{"tags":["Signing"],"summary":"Create a signing task through a signing group's webhook URL. A retry with the same requestId returns the same task.","operationId":"api_signing_webhook_id_post","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","required":false,"schema":{"type":"string"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":4000},"contentType":{"type":"string","maxLength":200},"document":{"type":"string","description":"The document's exact bytes, base64url (or base64)."},"expiresInDays":{"type":"number"},"requestId":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false,"required":["title","document"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false,"required":["taskId","status","url"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/projects/{projectId}/keys":{"get":{"tags":["Signing"],"summary":"The signing keys a group or task in this project may name: live keys of full members.","operationId":"api_signing_projects_projectId_keys_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"name":{"type":"string"},"keyId":{"type":"string"},"model":{"type":"string"}},"additionalProperties":false,"required":["id","username","name","keyId","model"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/projects/{projectId}/groups":{"get":{"tags":["Signing"],"summary":"List a project's signing groups.","operationId":"api_signing_projects_projectId_groups_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"threshold":{"type":"number"},"keyIds":{"type":"array","items":{"type":"string"}},"webhooks":{"type":"number"}},"additionalProperties":false,"required":["id","name","threshold","keyIds","webhooks"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Signing"],"summary":"Create a signing group: named keys and a threshold.","operationId":"api_signing_projects_projectId_groups_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"threshold":{"type":"number","minimum":1,"maximum":100},"keyIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"maxItems":100}},"additionalProperties":false,"required":["name","threshold","keyIds"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"policyId":{"type":"string"}},"additionalProperties":false,"required":["id","policyId"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/projects/{projectId}/groups/{groupId}":{"put":{"tags":["Signing"],"summary":"Change a signing group. Its policy changes with it: apps that pinned the old policy file must pin the new one.","operationId":"api_signing_projects_projectId_groups_groupId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"threshold":{"type":"number","minimum":1,"maximum":100},"keyIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"maxItems":100}},"additionalProperties":false,"required":["name","threshold","keyIds"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"policyId":{"type":"string"}},"additionalProperties":false,"required":["policyId"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Signing"],"summary":"Delete a signing group and its webhooks. Its tasks keep their policy.","operationId":"api_signing_projects_projectId_groups_groupId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/projects/{projectId}/groups/{groupId}/policy":{"get":{"tags":["Signing"],"summary":"The policy file of a group as it is now: its keys and threshold, endorsed by the cluster. What an app pins.","operationId":"api_signing_projects_projectId_groups_groupId_policy_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"v":{"type":"number"},"policyId":{"type":"string"},"body":{"type":"string"},"endorsement":{"type":["object","null"],"properties":{"keyId":{"type":"string"},"ed25519":{"type":"string"},"mlDsa65":{"type":"string"}},"additionalProperties":false,"required":["keyId","ed25519","mlDsa65"]}},"additionalProperties":false,"required":["type","v","policyId","body","endorsement"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/projects/{projectId}/groups/{groupId}/webhooks":{"get":{"tags":["Signing"],"summary":"List a signing group's webhook URLs (secrets are never returned).","operationId":"api_signing_projects_projectId_groups_groupId_webhooks_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"callbackUrl":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","name","url","createdBy","createdAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Signing"],"summary":"Create a webhook URL for a signing group. The secret and the callback signing secret are returned ONCE.","operationId":"api_signing_projects_projectId_groups_groupId_webhooks_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"callbackUrl":{"type":"string","maxLength":2000}},"additionalProperties":false,"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"secret":{"type":"string"},"callbackSecret":{"type":"string"}},"additionalProperties":false,"required":["id","url","secret","callbackSecret"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/projects/{projectId}/groups/{groupId}/webhooks/{webhookId}":{"delete":{"tags":["Signing"],"summary":"Revoke a webhook URL.","operationId":"api_signing_projects_projectId_groups_groupId_webhooks_webhookId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/projects/{projectId}/tasks":{"get":{"tags":["Signing"],"summary":"List a project's signing tasks, newest first.","operationId":"api_signing_projects_projectId_tasks_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"groupId":{"type":"string"},"policyId":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time"},"signers":{"type":"array","items":{"type":"string"}},"threshold":{"type":"number"}},"additionalProperties":false,"required":["id","title","status","policyId","createdBy","createdAt","expiresAt","signers","threshold"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Signing"],"summary":"Create a signing task from a group, or from keys and a threshold. The signers are notified.","operationId":"api_signing_projects_projectId_tasks_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":4000},"contentType":{"type":"string","maxLength":200},"document":{"type":"string","description":"The document's exact bytes, base64url."},"groupId":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"keyIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"maxItems":100},"threshold":{"type":"number","minimum":1,"maximum":100},"expiresInDays":{"type":"number"}},"additionalProperties":false,"required":["title","document"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/projects/{projectId}/tasks/{taskId}":{"get":{"tags":["Signing"],"summary":"One signing task, with its document.","operationId":"api_signing_projects_projectId_tasks_taskId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"groupId":{"type":"string"},"policyId":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time"},"signers":{"type":"array","items":{"type":"string"}},"threshold":{"type":"number"},"description":{"type":"string"},"contentType":{"type":"string"},"header":{"type":"string"},"document":{"type":"string"},"policyKeys":{"type":"array","items":{"type":"object","properties":{"keyId":{"type":"string"},"signer":{"type":"string"},"model":{"type":"string"},"signed":{"type":"boolean"}},"additionalProperties":false,"required":["keyId","signer","model","signed"]}},"webhook":{"type":"string"},"callbackError":{"type":"string"},"callbackDeliveredAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","title","status","policyId","createdBy","createdAt","expiresAt","signers","threshold","description","contentType","header","document","policyKeys"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/projects/{projectId}/tasks/{taskId}/cancel":{"post":{"tags":["Signing"],"summary":"Cancel an open signing task.","operationId":"api_signing_projects_projectId_tasks_taskId_cancel_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/projects/{projectId}/tasks/{taskId}/sign-link":{"post":{"tags":["Signing"],"summary":"Get the CLI command to sign a task with your own security key (valid one hour).","operationId":"api_signing_projects_projectId_tasks_taskId_sign-link_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["command","expiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/projects/{projectId}/tasks/{taskId}/signature":{"get":{"tags":["Signing"],"summary":"The task's signature file, with the signatures it has so far. Complete once the task is.","operationId":"api_signing_projects_projectId_tasks_taskId_signature_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"v":{"type":"number"},"header":{"type":"string"},"document":{"type":"string"},"signatures":{"type":"array","items":{"type":"object","properties":{"keyId":{"type":"string"},"authenticatorData":{"type":"string"},"ed25519":{"type":"string"},"mlDsa65":{"type":"string"}},"additionalProperties":false,"required":["keyId","authenticatorData","ed25519","mlDsa65"]}}},"additionalProperties":false,"required":["type","v","header","document","signatures"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/signing/projects/{projectId}/tasks/{taskId}/policy":{"get":{"tags":["Signing"],"summary":"The policy file a task was created with.","operationId":"api_signing_projects_projectId_tasks_taskId_policy_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"v":{"type":"number"},"policyId":{"type":"string"},"body":{"type":"string"},"endorsement":{"type":["object","null"],"properties":{"keyId":{"type":"string"},"ed25519":{"type":"string"},"mlDsa65":{"type":"string"}},"additionalProperties":false,"required":["keyId","ed25519","mlDsa65"]}},"additionalProperties":false,"required":["type","v","policyId","body","endorsement"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/locations":{"get":{"tags":["Nodes"],"summary":"Look up the geographic location of every node via the DB-IP City Lite database.","operationId":"api_nodes_locations_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"region":{"type":"string"},"isControlPlane":{"type":"boolean"},"lat":{"type":"number","description":"Effective latitude used by the geo load-balancer: nodes.latitude when set, else DB-IP City Lite's lookup. Absent if neither resolves."},"lon":{"type":"number"},"manualOverride":{"type":"boolean","description":"True when the coordinates come from nodes.latitude/longitude rather than DB-IP. Used by the UI to badge operator-pinned nodes."},"country":{"type":"string"},"countryCode":{"type":"string"},"city":{"type":"string"}},"additionalProperties":false,"required":["id","address","region","isControlPlane","manualOverride"]}},"hasGeoipDb":{"type":"boolean","description":"Whether the DB-IP City Lite database is available on this node. False when no DB-IP license key is configured or the MMDB has not yet been downloaded."}},"additionalProperties":false,"required":["nodes","hasGeoipDb"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/fleet":{"get":{"tags":["Nodes"],"summary":"The cluster's node fleet as any signed-in member may see it: location, roles and health only.","operationId":"api_nodes_fleet_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string","description":"The node's canonical rDNS name (node<N>.<platform domain>), or a bare node<N> label when no platform domain is set. Members are not given raw node addresses."},"region":{"type":"string"},"isControlPlane":{"type":"boolean"},"runsEnvoy":{"type":"boolean","description":"Serves public HTTP/HTTPS ingress via Envoy."},"runsPowerdns":{"type":"boolean"},"runsMailRelay":{"type":"boolean"},"up":{"type":"boolean"},"disabled":{"type":"boolean"},"setupState":{"type":"string","enum":["ok","pending","failed","lost"]},"lat":{"type":"number","description":"Effective latitude used by the geo load-balancer. Absent when neither an operator override nor the geoip lookup resolves."},"lon":{"type":"number"},"country":{"type":"string"},"countryCode":{"type":"string"},"city":{"type":"string"}},"additionalProperties":false,"required":["id","hostname","region","isControlPlane","runsEnvoy","runsPowerdns","runsMailRelay","up","disabled","setupState"]}},"hasGeoipDb":{"type":"boolean","description":"Whether the DB-IP City Lite database is available on this node. False means unplaced nodes are unplaced because the lookup is missing, not because nobody set coordinates."}},"additionalProperties":false,"required":["nodes","hasGeoipDb"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/geocode":{"get":{"tags":["Nodes"],"summary":"Look up coordinates for a city or place name via OpenStreetMap Nominatim. Suggested as a fallback on the node edit page when DB-IP doesn't know the node's IP.","operationId":"api_nodes_geocode_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","description":"Place name to geocode (e.g. 'Falkenstein, Germany').","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Place name to geocode (e.g. 'Falkenstein, Germany')."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"},"displayName":{"type":"string"}},"additionalProperties":false,"required":["lat","lon","displayName"]}}},"additionalProperties":false,"required":["results"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/orders":{"get":{"tags":["Nodes"],"summary":"List pending node orders","description":"Hardware that has been ordered from a provider but has not become a node yet. Every provider that boots a VM answers the add request with a running machine, so nothing appears here for those — an entry means a provider sold a server that is still being delivered, which for bare metal takes minutes to hours. Each entry carries the id the node will be created with once the machine arrives, so its deployment log can be opened now and follows through to the joined node.","operationId":"api_nodes_orders_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"orders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","description":"`waiting` — the order is placed and delivery is being polled; there is no deadline, because the machine is already bought. `failed` — a step went wrong (delivery, rescue boot, install); the hardware still exists, so this is normally something to fix and retry rather than dismiss. `placing` — oneDeploy restarted while the order was being submitted and never learned the outcome; this is never retried automatically, because re-running it could buy a second machine, and always needs a human to reconcile."},"providerAccountId":{"type":"string"},"providerOrderId":{"type":"string"},"serverTypeId":{"type":"string"},"locationId":{"type":"string"},"region":{"type":"string"},"isControlPlane":{"type":"boolean"},"supportsKata":{"type":"boolean"},"autoProvisioned":{"type":"boolean"},"monthlyCost":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"error":{"type":"string"},"retryable":{"type":"boolean","description":"Whether `POST /api/nodes/orders/{id}/retry` will re-run this order. True for any failure after the order was placed; false for `placing`, where retrying could buy a second machine."}},"additionalProperties":false,"required":["id","state","providerAccountId","serverTypeId","locationId","region","isControlPlane","supportsKata","autoProvisioned","createdAt","retryable"]}}},"additionalProperties":false,"required":["orders"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/orders/{id}":{"delete":{"tags":["Nodes"],"summary":"Dismiss a node order","description":"Remove oneDeploy's record of an order. This does NOT cancel anything at the provider and cannot: for an order in this state either the provider has already said it will not be fulfilled, or oneDeploy never learned the order's id. Check the provider's console first — if the machine exists or is still coming, cancel it there, or add it as a manual node once it is delivered.","operationId":"api_nodes_orders_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/orders/{id}/retry":{"post":{"tags":["Nodes"],"summary":"Retry a failed node order","description":"Put a failed order back to waiting and resume watching it. The machine has already been bought, so a failure after the order was placed — a delivery step, a rescue boot, an install — is something to fix and re-run rather than a reason to discard the hardware. Refused for an order in the `placing` state, where oneDeploy never learned whether the order went through and re-running it could buy a second machine.","operationId":"api_nodes_orders_id_retry_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes":{"post":{"tags":["Nodes"],"summary":"Add a node.","operationId":"api_nodes_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"The address of this node (manual add)."},"ipv6Address":{"type":"string","description":"Optional public IPv6 of this node. Used purely for ingress / glue records when this node runs Envoy or PowerDNS — SSH and provisioning still use the IPv4 address."},"publicKey":{"type":"string","description":"The public SSH key of this node server (manual add)."},"isControlPlane":{"type":"boolean","description":"Whether this node should be a control plane member."},"runsEnvoy":{"type":"boolean","description":"Whether this node should serve public HTTP/HTTPS ingress via Envoy. Defaults to true for CP nodes, false otherwise."},"runsPowerdns":{"type":"boolean","description":"Whether this node should serve authoritative DNS via PowerDNS. Defaults to true for CP nodes, false otherwise."},"runsMailRelay":{"type":"boolean","description":"Whether this node should run the self-hosted outbound mail relay. Off by default — only flip on for nodes with outbound port-25 connectivity and stable rDNS. Orthogonal to runs_envoy / runs_powerdns."},"runsCustomDomains":{"type":"boolean","description":"Whether this node is a dedicated custom-domain gateway, serving only customer-supplied hostnames. Off by default and mutually exclusive with every other role (control plane, Envoy ingress, PowerDNS, mail relay) — these nodes are also excluded from container scheduling, so that an abuse complaint — which a hosting provider typically answers by suspending the whole server — costs only custom domains."},"supportsKata":{"type":"boolean","description":"Enable Kata VM isolation on this node. Any bare-metal node (manual or provider bare-metal type, worker or control-plane); for manual adds a synchronous KVM preflight runs before the node is created, for provider adds it runs once the VM is reachable. Off by default."},"region":{"type":"string","description":"The region this node joins: the id (slug) of a region listed by GET /api/regions. Required for a manual add or an adoption. When buying from a provider it may be omitted if the location is already mapped to a region (GET /api/regions lists the mapping); given, it also becomes that location's region for later purchases."},"providerAccountId":{"type":"string","format":"uuid","description":"Provider account ID for automated provisioning (admin-managed in Cluster Settings)."},"serverTypeId":{"type":"string","description":"Provider server type ID (required with providerAccountId)."},"locationId":{"type":"string","description":"Provider location ID (required with providerAccountId, unless adopting)."},"providerServerId":{"type":"string","description":"Adopt an EXISTING server at this provider account instead of buying one. Give it together with providerAccountId, address, publicKey and region; serverTypeId / locationId are then not used and nothing is ordered. The node is created disabled and un-bootstrapped — run Retry Setup if the machine is healthy, or Reinstall to wipe and rebuild it. Use this to bring a server back under management after its node was deleted. The id is looked up at the provider and stored in the driver's canonical form, so the one the provider's console shows is fine (a bare UUID for Scaleway); the request is refused if the account has no such server, or the server does not have `address`."}},"additionalProperties":false,"required":["runsCustomDomains"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"ordered":{"type":"boolean","description":"True when the provider sold hardware that has not been delivered yet. No node exists at this id — an order is being watched until the machine arrives, and only then is the node created (with this same id). The dashboard should show it under pending orders rather than navigating to a node page."}},"additionalProperties":false,"required":["id","ordered"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"get":{"tags":["Nodes"],"summary":"List nodes.","operationId":"api_nodes_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"ipv6Address":{"type":"string","description":"Optional public IPv6 used for ingress / glue."},"isControlPlane":{"type":"boolean"},"runsEnvoy":{"type":"boolean"},"runsPowerdns":{"type":"boolean"},"runsMailRelay":{"type":"boolean"},"runsCustomDomains":{"type":"boolean"},"supportsKata":{"type":"boolean"},"dockerXfs":{"type":"boolean"},"etcdLearner":{"type":"boolean","description":"Whether this node is still an etcd learner (not yet promoted to voter)."},"joined":{"type":"boolean","description":"Whether this node has fully joined the cluster. False means setup is pending or failed."},"setupState":{"type":"string","enum":["ok","pending","failed","lost"],"description":"Where this node stands in provisioning. `ok` means setup finished at least once, `pending` means it's running now, `failed` means it never completed and can be retried."},"disabled":{"type":"boolean"},"isPrimary":{"type":"boolean","description":"Whether this node is the primary control plane node."},"isLeader":{"type":"boolean","description":"Whether this node is the current leader."},"region":{"type":"string","description":"The region this node is in."},"providerAccountId":{"type":"string","description":"Provider account ID this node was provisioned through, if any."},"providerAccountName":{"type":"string","description":"Display name of the provider account, joined for convenience."},"providerType":{"type":"string","description":"Provider type (e.g. 'hetzner') of the linked account."},"autoProvisioned":{"type":"boolean","description":"Whether this node was created by the cluster autoscaler."},"containers":{"type":"number","description":"The number of containers running on this node."},"monthlyCost":{"type":"number","description":"Operator-set monthly cost for chargeback. Absent if the node is unpriced."},"tags":{"type":"array","items":{"type":"string"},"description":"Free-form labels on this node. Services that want this property add it to required_tags; others co-tenant freely."},"taints":{"type":"array","items":{"type":"string"},"description":"Default-deny labels on this node. A service only schedules here if every taint appears in its tolerations."},"up":{"type":"boolean"},"version":{"type":"string","description":"The oneDeploy version this CP node recorded on its last boot. A CP writes it once per boot and the value is baked into the image, so it cannot go stale while the process lives; for a CP that is down it is the last version it ran. Absent for a non-CP node, or a CP that has not booted since the column was added."},"geoipBuildEpoch":{"type":"string","format":"date-time","description":"Build date of the DB-IP City Lite database installed on this node. Absent if DB-IP is unconfigured or this node doesn't run authoritative DNS."},"geoipUpToDate":{"type":"boolean","description":"Whether this node's DB-IP database matches the latest available cluster-wide. Absent if DB-IP is unconfigured."}},"additionalProperties":false,"required":["id","address","isControlPlane","runsEnvoy","runsPowerdns","runsMailRelay","runsCustomDomains","supportsKata","dockerXfs","etcdLearner","joined","setupState","disabled","isPrimary","isLeader","region","autoProvisioned","containers","tags","taints","up"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}":{"get":{"tags":["Nodes"],"summary":"Get node.","operationId":"api_nodes_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"ipv6Address":{"type":"string","description":"Optional public IPv6. Used purely for ingress (glue / NS AAAA, ingress AAAA records) when this node runs Envoy or PowerDNS."},"publicKey":{"type":"string"},"isControlPlane":{"type":"boolean"},"runsEnvoy":{"type":"boolean","description":"Whether this node serves ingress via Envoy."},"runsPowerdns":{"type":"boolean","description":"Whether this node serves authoritative DNS."},"runsMailRelay":{"type":"boolean","description":"Whether this node runs the self-hosted outbound mail relay."},"runsCustomDomains":{"type":"boolean","description":"Whether this node is a dedicated custom-domain gateway. Mutually exclusive with every other role, and excluded from container scheduling."},"supportsKata":{"type":"boolean","description":"Whether this node can run VM-isolated (Kata) containers."},"dockerXfs":{"type":"boolean","description":"Whether /var/lib/docker is on an XFS+pquota LV, so per-container writable-layer disk caps (docker_storage) are enforced on this node. Detected, not operator-set."},"gpus":{"type":"array","items":{"type":"object","properties":{"gpuIndex":{"type":"integer"},"model":{"type":"string"},"pciAddress":{"type":"string"},"iommuGroup":{"type":"integer"},"vendorId":{"type":"string"},"deviceId":{"type":"string"},"containerId":{"type":"string"},"serviceName":{"type":"string"},"projectName":{"type":"string"},"projectId":{"type":"string"}},"additionalProperties":false,"required":["gpuIndex","model","pciAddress","iommuGroup","vendorId","deviceId"]},"description":"GPUs detected on this node, in the stable index order allocations use. `containerId` is set when a live container holds the card. Detected from PCI, not operator-set — a card reserved for passthrough is bound to vfio-pci, so the host has no driver for it and nvidia-smi reports nothing."},"etcdLearner":{"type":"boolean","description":"Whether this node is still an etcd learner (not yet promoted to voter)."},"joiningControlPlane":{"type":"boolean","description":"True for a control-plane node that finished setup but has not joined yet. Its progress is served separately, by GET /api/nodes/:id/join-status, because reading it means asking etcd and probing the node over the mesh — slow exactly when the join is in trouble, which is when this page gets opened."},"disabled":{"type":"boolean","description":"Whether scheduling is disabled on this node."},"cpu":{"type":"number","description":"Raw CPU capacity on this node, in deciseconds (10 = 1 physical core). Effective ECU capacity = (cpu - cpu_reserve) × perf_score."},"memory":{"type":"integer","description":"The amount of memory available on this node in bytes."},"perfScore":{"type":"number","description":"CPU performance multiplier on this node's raw cores. 1.0 = reference. Multiplied with raw CPU capacity to yield ECU capacity for the scheduler, and divides the deci-ECU reservation when generating cgroup CPUQuota."},"benchmarkScore":{"type":"number","description":"Raw sysbench-cpu events per second per core captured the last time the node was benchmarked. Absent until a benchmark has been run (legacy rows from before the auto-benchmark feature). Divided by REFERENCE_EVENTS_PER_SEC_PER_CORE to derive perf_score; persisted so the operator can see what the derived score came from and so perf_score can be recomputed if the reference is ever recalibrated."},"benchmarkedAt":{"type":"string","format":"date-time","description":"When the last benchmark was captured. Absent if never benchmarked."},"storage":{"type":"object","additionalProperties":{"type":"integer"},"description":"The raw size of this node's volume group per disk type in MiB. A mirrored volume takes twice its size from it when the disk type has two or more disks (`storageDisks`)."},"storageRedundancy":{"type":"object","additionalProperties":{"type":"object","properties":{"kind":{"type":"string","enum":["lvm","raid","declared","none"]},"disks":{"type":"integer"},"level":{"type":"string"}},"additionalProperties":false,"required":["kind"]},"description":"Whether each disk type survives a failed disk: `lvm` (two or more disks, mirrored volumes are LVM raid1 across them; `disks`), `raid` (an md array under the volume group; `level`), `declared` (`redundantDiskTypes`) or `none`. A mirrored volume is only placed on a disk type that is not `none`."},"redundantDiskTypes":{"type":"array","items":{"type":"string"},"description":"Disk types declared redundant where oneDeploy cannot see it (a provider VM's replicated storage, or set by an admin)."},"storageDisks":{"type":"object","additionalProperties":{"type":"integer"},"description":"Disks (LVM physical volumes) per disk type. With two or more, mirrored volumes are LVM raid1 across them and striped volumes are spread over all of them; with one, every volume is a plain linear volume."},"cpuReserve":{"type":"integer","description":"CPU reserved for the node's system processes (in deciseconds; 10 = 1 core)."},"memoryReserve":{"type":"integer","description":"Memory reserved for the node's system processes, in MiB."},"storageReserve":{"type":"integer","description":"Storage reserved per VG for LVM snapshots during backups, in MiB."},"monthlyCost":{"type":"number","description":"Operator-set monthly cost for chargeback. Absent means unpriced (excluded from cost pools)."},"cpuShare":{"type":"number"},"memoryShare":{"type":"number"},"storageShares":{"type":"object","additionalProperties":{"type":"number"}},"recommendedMonthlyCost":{"type":"number","description":"Suggested monthly cost at oneDeploy's standard rates × capacity. Matches invoice for dedicated nodes; overestimates for shared CPU."},"recommendedCpuShare":{"type":"number","description":"Suggested CPU share for this node's capacity at oneDeploy's hardcoded standard rates. The UI uses this for 'Reset to recommended'."},"recommendedMemoryShare":{"type":"number"},"recommendedStorageShares":{"type":"object","additionalProperties":{"type":"number"}},"tags":{"type":"array","items":{"type":"string"},"description":"Free-form labels on this node (e.g. 'pci-compliant'). Services that want this property add it to required_tags; others co-tenant freely."},"taints":{"type":"array","items":{"type":"string"},"description":"Default-deny labels on this node (e.g. 'shared-cpu', 'gpu-h100'). A service only schedules here if every taint appears in its tolerations."},"region":{"type":"string","description":"The region this node is in."},"latitude":{"type":"number","description":"Operator-set latitude (decimal degrees). When set, overrides DB-IP for the geo load-balancer. Absent means the LUA helper falls back to DB-IP's lookup of this node's address."},"longitude":{"type":"number"},"suggestedCity":{"type":"string","description":"DB-IP City Lite's city name for this node's address, when present. The UI prefills the Nominatim geocoder with this so the operator can convert it to lat/lon — DB-IP's own coordinates are deliberately not surfaced because they collapse to the country centroid when the city is unknown, which is the failure mode this feature exists to work around."},"suggestedCountry":{"type":"string"},"providerAccountId":{"type":"string","description":"Provider account this node was provisioned through, if any."},"providerAccountName":{"type":"string","description":"Display name of the provider account, joined for convenience."},"providerType":{"type":"string","description":"Provider type (e.g. 'hetzner') of the linked account."},"autoProvisioned":{"type":"boolean","description":"Whether this node was created by the cluster autoscaler."},"reinstallSupported":{"type":"boolean","description":"Whether this node can be reinstalled in place (provider-managed Scaleway Elastic Metal or Hetzner Robot server, other than the primary control plane). Drives the 'Reinstall' action in the UI."},"setupState":{"type":"string","enum":["ok","pending","failed","lost"],"description":"Where this node stands in provisioning. `ok` means setup finished at least once (the node may still be drained or unhealthy — that's `disabled` / `up`). `pending` means a setup is running right now. `failed` means setup never completed and nothing is in flight; only in that state can setup be retried."},"rdnsHostname":{"type":"string","description":"Canonical hostname for this node — `nodeN.<platform-domain>` where N is the Nebula address. Operators set the IP's PTR to this value (automated for managed providers, manual otherwise). Absent until a platform domain is configured."},"rdnsStatusV4":{"type":"string","description":"Last FCrDNS failure reason for the IPv4 address (e.g. `PTR returned X, expected Y`). Absent means the last check passed; `rdnsCheckedAt` distinguishes that from 'never checked'."},"rdnsStatusV6":{"type":"string","description":"Same as rdnsStatusV4 but for the IPv6 address."},"rdnsCheckedAt":{"type":"string","format":"date-time","description":"When the FCrDNS status was last refreshed."},"hasLogs":{"type":"boolean","description":"Whether upgrade logs are available for this node."},"containers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string","description":"The Nebula IP of this container."},"migrationPlaceholder":{"type":"boolean"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"state":{"type":"string"},"failure":{"type":"object","properties":{"count":{"type":"integer","description":"Consecutive failed deployment attempts since the last successful one."},"since":{"type":"string","description":"When the most recent attempt failed."},"retryAt":{"type":"string","description":"When the deployment loop is next allowed to retry. May be in the past when the container is simply awaiting the next tick."},"message":{"type":"string","description":"The most recent deployment error, truncated."}},"additionalProperties":false,"required":["count","since","retryAt"],"description":"Set while this container's pending operation is failing and being retried. Absent when the last deployment succeeded — `state` alone cannot express this, because the operation timestamp stays set on failure so the loop retries it."},"health":{"type":"string","enum":["running","down"]},"waitingForRootKey":{"type":"boolean","description":"True when this container needs the cluster's root key to start (an encrypted volume or a secret file, fetched from a control plane at every start) and no control plane holds it right now. A running container keeps running, and a restart reuses what its node fetched since it booted; a container that is down stays down until a control plane is unsealed. Absent otherwise."},"hasLogs":{"type":"boolean"},"cpu":{"type":"number"},"memory":{"type":"integer"},"storage":{"type":"integer"},"diskType":{"type":"string"},"volumes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"storage":{"type":"integer"},"diskType":{"type":"string"},"layout":{"type":"string","enum":["mirrored","striped"]},"redundancy":{"type":"string","enum":["mirrored","striped","raid","declared","single"],"description":"What the volume actually is on its node: `mirrored` (LVM raid1, two copies on separate disks), `striped` (spread over the node's disks, no redundancy), `raid` (a plain volume on an md array that survives a failed disk), `declared` (a plain volume on storage declared redundant, e.g. a cloud VM's replicated block storage) or `single` (one copy on a disk nothing makes redundant)."},"footprint":{"type":"integer","description":"Raw MiB this volume takes from the node's volume group: twice `storage` for a mirrored volume on a disk type with two or more disks."}},"additionalProperties":false,"required":["name","storage","diskType","layout","redundancy","footprint"]}},"udpPort":{"type":"integer"},"preview":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false,"required":["id","slug"],"description":"PR preview metadata when this container belongs to a preview deployment."}},"additionalProperties":false,"required":["id","address","migrationPlaceholder","state","health","hasLogs","cpu","memory","storage","diskType","volumes"]}}},"additionalProperties":false,"required":["address","publicKey","isControlPlane","runsEnvoy","runsPowerdns","runsMailRelay","runsCustomDomains","supportsKata","dockerXfs","gpus","etcdLearner","joiningControlPlane","disabled","cpu","memory","perfScore","storage","storageRedundancy","redundantDiskTypes","storageDisks","cpuReserve","memoryReserve","storageReserve","cpuShare","memoryShare","storageShares","recommendedMonthlyCost","recommendedCpuShare","recommendedMemoryShare","recommendedStorageShares","tags","taints","region","autoProvisioned","reinstallSupported","setupState","hasLogs","containers"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Nodes"],"summary":"Update node.","description":"Replaces every setting of the node: send them all, starting from GET /api/nodes/:id, or an omitted optional one (monthlyCost, ipv6Address, latitude, longitude) is cleared. With an API token this needs a grant on the Infrastructure project, and each call waits for the owner's approval.","operationId":"api_nodes_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"region":{"type":"string","description":"The region this node is in: the id (slug) of a region listed by GET /api/regions."},"cpuReserve":{"type":"integer","minimum":0,"description":"CPU reserved for the node's system processes (in deciseconds; 10 = 1 core)."},"memoryReserve":{"type":"integer","minimum":0,"description":"Memory reserved for the node's system processes, in MiB."},"storageReserve":{"type":"integer","minimum":0,"description":"Storage reserved per VG for LVM snapshots during backups, in MiB."},"monthlyCost":{"type":"number","minimum":0,"description":"Operator-set monthly cost for this node (used by chargeback). Omit to clear — billing is disabled for unpriced nodes."},"cpuShare":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of monthly_cost attributed to CPU."},"memoryShare":{"type":"number","minimum":0,"maximum":1,"description":"Fraction of monthly_cost attributed to memory."},"storageShares":{"type":"object","additionalProperties":{"type":"number","minimum":0,"maximum":1},"description":"Fraction of monthly_cost attributed per disk type. Keys should match the node's storage disk types."},"runsEnvoy":{"type":"boolean","description":"Whether this node serves public HTTP/HTTPS ingress via Envoy."},"runsPowerdns":{"type":"boolean","description":"Whether this node serves authoritative DNS via PowerDNS."},"runsCustomDomains":{"type":"boolean","description":"Whether this node is a dedicated custom-domain gateway. Mutually exclusive with every other role and excluded from container scheduling."},"runsMailRelay":{"type":"boolean","description":"Whether this node runs the self-hosted outbound mail relay (per-CP `runs_mail_relay` flag, orthogonal to runs_envoy / runs_powerdns)."},"supportsKata":{"type":"boolean","description":"Whether this node can run VM-isolated (Kata) containers. Bare-metal / KVM-capable nodes only (auto-provisioned nodes are rejected) — enabling installs the Kata runtime and briefly restarts Docker on the node; on a control plane that restarts the whole CP stack."},"ipv6Address":{"type":"string","description":"Optional public IPv6 used for ingress / glue. Empty / omitted clears it."},"tags":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"description":"Free-form labels (e.g. 'pci-compliant'). Services that want this property add it to required_tags; others co-tenant freely."},"taints":{"type":"array","items":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9._-]*$"},"description":"Default-deny labels (e.g. 'shared-cpu', 'gpu-h100'). A service only schedules here if every taint appears in its tolerations."},"redundantDiskTypes":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9]+$"},"description":"Disk types (e.g. `ssd`) whose storage is redundant where oneDeploy cannot see it, such as a cloud VM's replicated block storage. A mirrored volume is only placed where its disk type is redundant: LVM over two or more disks and md RAID that survives a failed disk are detected; anything else must be declared here. Omitted keeps the current list."},"perfScore":{"type":"number","minimum":0.01,"description":"CPU performance multiplier on this node's raw cores. 1.0 = reference. Used to convert deci-ECU reservations to raw cgroup quota and to filter against service min_perf_score. Operator-set in v1."},"latitude":{"type":"number","minimum":-90,"maximum":90,"description":"Operator-set latitude (decimal degrees). Overrides DB-IP for the geo load-balancer; clear by omitting."},"longitude":{"type":"number","minimum":-180,"maximum":180}},"additionalProperties":false,"required":["region","cpuReserve","memoryReserve","storageReserve","cpuShare","memoryShare","storageShares","runsEnvoy","runsPowerdns","runsCustomDomains","runsMailRelay","supportsKata","tags","taints","perfScore"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Nodes"],"summary":"Delete node.","description":"Remove a node and delete its server at the provider. Refused unless the node is disabled and has no containers on it — disable and drain it first, or, if it is unreachable, mark it lost (which empties and fences it while keeping the row). The provider deletion is strict: if it fails, the node row survives so the delete can be retried rather than silently orphaning the server. For a control-plane node that is still joined, it is torn down over SSH and evicted from etcd; one already marked lost has left etcd and skips that. With keepServer=true the provider server is left alone — only the oneDeploy record goes, which is the undo for adopting a server. Without it, the stored server id is first looked up at the provider, and the delete is refused (nothing touched) when the provider has no such server or the id is not the one it resolves to.","operationId":"api_nodes_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"keepServer","in":"query","description":"Set to 'true' to remove the node from oneDeploy WITHOUT deleting its server at the provider — the machine keeps running and billing, and oneDeploy forgets it. Every other guard and the control-plane teardown are unchanged.","required":false,"schema":{"type":"string","description":"Set to 'true' to remove the node from oneDeploy WITHOUT deleting its server at the provider — the machine keeps running and billing, and oneDeploy forgets it. Every other guard and the control-plane teardown are unchanged."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/agent-ssh":{"post":{"tags":["Nodes"],"summary":"Approve one SSH connection to a node's host for the calling API token.","description":"API tokens only; admin endpoint. The token's owner must be an administrator, the token must hold the Infrastructure project, and every call needs the owner's approval. Once approved, connect within 10 minutes with the token's own SSH key (registered with PUT /api/agent/ssh-key) using the returned command: it opens a root shell on the node's host (exec and sftp work too). One approval opens one connection; the connection is closed when the token expires or is revoked, when its Infrastructure access ends, when the node is marked lost, or when the owner terminates it.","operationId":"api_nodes_id_agent-ssh_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"sshUsername":{"type":"string"},"command":{"type":"string"},"hostKeyFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","description":"Connect before this, or ask again."}},"additionalProperties":false,"required":["host","port","sshUsername","command","hostKeyFingerprint","expiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/ssh-posture":{"get":{"tags":["Nodes"],"summary":"Get the last SSH posture check of this node.","operationId":"api_nodes_id_ssh-posture_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"object","properties":{"settings":{"type":"object","properties":{"passwordAuthentication":{"type":"boolean"},"kbdInteractiveAuthentication":{"type":"boolean"},"usePam":{"type":"boolean"},"permitEmptyPasswords":{"type":"boolean"},"permitRootLogin":{"type":"string"},"authorizedKeysFiles":{"type":"array","items":{"type":"string"}},"authorizedKeysCommand":{"type":["string","null"]},"trustedUserCaKeys":{"type":["string","null"]},"allowUsers":{"type":"array","items":{"type":"string"}},"denyUsers":{"type":"array","items":{"type":"string"}},"allowGroups":{"type":"array","items":{"type":"string"}},"denyGroups":{"type":"array","items":{"type":"string"}},"hostbasedAuthentication":{"type":"boolean"},"permitUserEnvironment":{"type":"string"},"strictModes":{"type":"boolean"}},"additionalProperties":false,"required":["passwordAuthentication","kbdInteractiveAuthentication","usePam","permitEmptyPasswords","permitRootLogin","authorizedKeysFiles","authorizedKeysCommand","trustedUserCaKeys","allowUsers","denyUsers","allowGroups","denyGroups"]},"accounts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"uid":{"type":"number"},"shell":{"type":"string"},"sudo":{"type":"boolean"},"passwordUsable":{"type":"boolean"},"passwordEmpty":{"type":"boolean"},"allowedBySshd":{"type":"boolean"},"canLogIn":{"type":"boolean"},"keys":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"fingerprint":{"type":"string"},"comment":{"type":"string"},"file":{"type":"string"},"recognized":{"type":"boolean"},"source":{"type":"string","enum":["cluster","summit","trusted"]},"label":{"type":"string"},"weakness":{"type":"string"},"forcedCommand":{"type":"boolean"}},"additionalProperties":false,"required":["type","fingerprint","comment","file","recognized","forcedCommand"]}}},"additionalProperties":false,"required":["name","uid","shell","sudo","passwordUsable","passwordEmpty","allowedBySshd","canLogIn","keys"]}},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"check":{"type":"string","enum":["password-login","empty-passwords","match-block","root-password-login","extra-account","second-root","unrecognized-key","authorized-keys-command","trusted-user-ca","weak-key","hostbased-auth","permit-user-environment","strict-modes","key-outside-scope","trusted-key-missing"]},"severity":{"type":"string","enum":["critical","warning"]},"title":{"type":"string"},"detail":{"type":"string"},"remedy":{"type":"string"},"fix":{"type":"string","enum":["harden-sshd","remove-key","deny-account","install-trusted-keys"]},"account":{"type":"string"},"fingerprint":{"type":"string"},"file":{"type":"string"}},"additionalProperties":false,"required":["id","check","severity","title","detail"]}}},"additionalProperties":false,"required":["settings","accounts","findings"]},"checkedAt":{"type":"string"},"checkedBy":{"type":"string"},"error":{"type":"string"},"errorAt":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Nodes"],"summary":"Check this node's SSH posture now.","operationId":"api_nodes_id_ssh-posture_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"object","properties":{"settings":{"type":"object","properties":{"passwordAuthentication":{"type":"boolean"},"kbdInteractiveAuthentication":{"type":"boolean"},"usePam":{"type":"boolean"},"permitEmptyPasswords":{"type":"boolean"},"permitRootLogin":{"type":"string"},"authorizedKeysFiles":{"type":"array","items":{"type":"string"}},"authorizedKeysCommand":{"type":["string","null"]},"trustedUserCaKeys":{"type":["string","null"]},"allowUsers":{"type":"array","items":{"type":"string"}},"denyUsers":{"type":"array","items":{"type":"string"}},"allowGroups":{"type":"array","items":{"type":"string"}},"denyGroups":{"type":"array","items":{"type":"string"}},"hostbasedAuthentication":{"type":"boolean"},"permitUserEnvironment":{"type":"string"},"strictModes":{"type":"boolean"}},"additionalProperties":false,"required":["passwordAuthentication","kbdInteractiveAuthentication","usePam","permitEmptyPasswords","permitRootLogin","authorizedKeysFiles","authorizedKeysCommand","trustedUserCaKeys","allowUsers","denyUsers","allowGroups","denyGroups"]},"accounts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"uid":{"type":"number"},"shell":{"type":"string"},"sudo":{"type":"boolean"},"passwordUsable":{"type":"boolean"},"passwordEmpty":{"type":"boolean"},"allowedBySshd":{"type":"boolean"},"canLogIn":{"type":"boolean"},"keys":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"fingerprint":{"type":"string"},"comment":{"type":"string"},"file":{"type":"string"},"recognized":{"type":"boolean"},"source":{"type":"string","enum":["cluster","summit","trusted"]},"label":{"type":"string"},"weakness":{"type":"string"},"forcedCommand":{"type":"boolean"}},"additionalProperties":false,"required":["type","fingerprint","comment","file","recognized","forcedCommand"]}}},"additionalProperties":false,"required":["name","uid","shell","sudo","passwordUsable","passwordEmpty","allowedBySshd","canLogIn","keys"]}},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"check":{"type":"string","enum":["password-login","empty-passwords","match-block","root-password-login","extra-account","second-root","unrecognized-key","authorized-keys-command","trusted-user-ca","weak-key","hostbased-auth","permit-user-environment","strict-modes","key-outside-scope","trusted-key-missing"]},"severity":{"type":"string","enum":["critical","warning"]},"title":{"type":"string"},"detail":{"type":"string"},"remedy":{"type":"string"},"fix":{"type":"string","enum":["harden-sshd","remove-key","deny-account","install-trusted-keys"]},"account":{"type":"string"},"fingerprint":{"type":"string"},"file":{"type":"string"}},"additionalProperties":false,"required":["id","check","severity","title","detail"]}}},"additionalProperties":false,"required":["settings","accounts","findings"]},"checkedAt":{"type":"string"},"checkedBy":{"type":"string"},"error":{"type":"string"},"errorAt":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/ssh-posture/fix":{"post":{"tags":["Nodes"],"summary":"Apply the fix an SSH posture finding proposes.","operationId":"api_nodes_id_ssh-posture_fix_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"finding":{"type":"string"}},"additionalProperties":false,"required":["finding"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"posture":{"type":"object","properties":{"report":{"type":"object","properties":{"settings":{"type":"object","properties":{"passwordAuthentication":{"type":"boolean"},"kbdInteractiveAuthentication":{"type":"boolean"},"usePam":{"type":"boolean"},"permitEmptyPasswords":{"type":"boolean"},"permitRootLogin":{"type":"string"},"authorizedKeysFiles":{"type":"array","items":{"type":"string"}},"authorizedKeysCommand":{"type":["string","null"]},"trustedUserCaKeys":{"type":["string","null"]},"allowUsers":{"type":"array","items":{"type":"string"}},"denyUsers":{"type":"array","items":{"type":"string"}},"allowGroups":{"type":"array","items":{"type":"string"}},"denyGroups":{"type":"array","items":{"type":"string"}},"hostbasedAuthentication":{"type":"boolean"},"permitUserEnvironment":{"type":"string"},"strictModes":{"type":"boolean"}},"additionalProperties":false,"required":["passwordAuthentication","kbdInteractiveAuthentication","usePam","permitEmptyPasswords","permitRootLogin","authorizedKeysFiles","authorizedKeysCommand","trustedUserCaKeys","allowUsers","denyUsers","allowGroups","denyGroups"]},"accounts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"uid":{"type":"number"},"shell":{"type":"string"},"sudo":{"type":"boolean"},"passwordUsable":{"type":"boolean"},"passwordEmpty":{"type":"boolean"},"allowedBySshd":{"type":"boolean"},"canLogIn":{"type":"boolean"},"keys":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"fingerprint":{"type":"string"},"comment":{"type":"string"},"file":{"type":"string"},"recognized":{"type":"boolean"},"source":{"type":"string","enum":["cluster","summit","trusted"]},"label":{"type":"string"},"weakness":{"type":"string"},"forcedCommand":{"type":"boolean"}},"additionalProperties":false,"required":["type","fingerprint","comment","file","recognized","forcedCommand"]}}},"additionalProperties":false,"required":["name","uid","shell","sudo","passwordUsable","passwordEmpty","allowedBySshd","canLogIn","keys"]}},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"check":{"type":"string","enum":["password-login","empty-passwords","match-block","root-password-login","extra-account","second-root","unrecognized-key","authorized-keys-command","trusted-user-ca","weak-key","hostbased-auth","permit-user-environment","strict-modes","key-outside-scope","trusted-key-missing"]},"severity":{"type":"string","enum":["critical","warning"]},"title":{"type":"string"},"detail":{"type":"string"},"remedy":{"type":"string"},"fix":{"type":"string","enum":["harden-sshd","remove-key","deny-account","install-trusted-keys"]},"account":{"type":"string"},"fingerprint":{"type":"string"},"file":{"type":"string"}},"additionalProperties":false,"required":["id","check","severity","title","detail"]}}},"additionalProperties":false,"required":["settings","accounts","findings"]},"checkedAt":{"type":"string"},"checkedBy":{"type":"string"},"error":{"type":"string"},"errorAt":{"type":"string"}},"additionalProperties":false},"applied":{"type":"string"}},"additionalProperties":false,"required":["posture","applied"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/patch-status":{"get":{"tags":["Nodes"],"summary":"Get the last recorded patch status of this node.","operationId":"api_nodes_id_patch-status_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"object","properties":{"runningKernel":{"type":"string"},"latestKernel":{"type":["string","null"]},"lastAttemptAt":{"type":["number","null"]},"lastAttemptExitCode":{"type":["number","null"]},"lastSuccessAt":{"type":["number","null"]},"lastAttemptLog":{"type":["string","null"]},"pendingPackages":{"type":["array","null"],"items":{"type":"string"}},"keptBackPackages":{"type":["array","null"],"items":{"type":"string"}},"heldPackages":{"type":"array","items":{"type":"string"}},"unattendedUpgrades":{"type":"string","enum":["absent","off","on","pending"]},"findings":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string","enum":["upgrade-stale","upgrade-failed","kernel-not-running","kernel-update-pending","packages-kept-back","packages-on-hold","unattended-upgrades-on","apt-unavailable"]},"severity":{"type":"string","enum":["critical","warning"]},"title":{"type":"string"},"detail":{"type":"string"},"remedy":{"type":"string"}},"additionalProperties":false,"required":["check","severity","title","detail"]}}},"additionalProperties":false,"required":["runningKernel","latestKernel","lastAttemptAt","lastAttemptExitCode","lastSuccessAt","lastAttemptLog","pendingPackages","findings"]},"checkedAt":{"type":"string"},"checkedBy":{"type":"string"},"error":{"type":"string"},"errorAt":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Nodes"],"summary":"Read this node's patch status now.","operationId":"api_nodes_id_patch-status_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"object","properties":{"runningKernel":{"type":"string"},"latestKernel":{"type":["string","null"]},"lastAttemptAt":{"type":["number","null"]},"lastAttemptExitCode":{"type":["number","null"]},"lastSuccessAt":{"type":["number","null"]},"lastAttemptLog":{"type":["string","null"]},"pendingPackages":{"type":["array","null"],"items":{"type":"string"}},"keptBackPackages":{"type":["array","null"],"items":{"type":"string"}},"heldPackages":{"type":"array","items":{"type":"string"}},"unattendedUpgrades":{"type":"string","enum":["absent","off","on","pending"]},"findings":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string","enum":["upgrade-stale","upgrade-failed","kernel-not-running","kernel-update-pending","packages-kept-back","packages-on-hold","unattended-upgrades-on","apt-unavailable"]},"severity":{"type":"string","enum":["critical","warning"]},"title":{"type":"string"},"detail":{"type":"string"},"remedy":{"type":"string"}},"additionalProperties":false,"required":["check","severity","title","detail"]}}},"additionalProperties":false,"required":["runningKernel","latestKernel","lastAttemptAt","lastAttemptExitCode","lastSuccessAt","lastAttemptLog","pendingPackages","findings"]},"checkedAt":{"type":"string"},"checkedBy":{"type":"string"},"error":{"type":"string"},"errorAt":{"type":"string"}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/unlock":{"get":{"tags":["Nodes"],"summary":"A node's volume-unlock credential","description":"Whether the node has an enrolled unlock secret (named by its key id, never shown), when it last fetched its volume keys, and the last time a request carrying its valid credential was refused (from another address, or while the node was marked lost). Nothing is encrypted with these keys yet.","operationId":"api_nodes_id_unlock_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":["object","null"],"properties":{"keyId":{"type":"string"},"enrolledAt":{"type":"string"},"enrolledBy":{"type":"string"},"lastUnlockedAt":{"type":["string","null"]},"lastUnlockIp":{"type":["string","null"]},"lastRefusal":{"type":["string","null"]},"lastRefusalAt":{"type":["string","null"]},"lastRefusalIp":{"type":["string","null"]}},"additionalProperties":false,"required":["keyId","enrolledAt","enrolledBy","lastUnlockedAt","lastUnlockIp","lastRefusal","lastRefusalAt","lastRefusalIp"]}},"additionalProperties":false,"required":["status"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/unlock/enroll":{"post":{"tags":["Nodes"],"summary":"Enroll a node's volume-unlock credential","description":"Install the node-side unlock client and give the node an unlock secret: generated by this control plane, written to the node over SSH and stored wrapped under the cluster's root key, so this control plane must be unsealed. A node that already holds the stored secret keeps it unless `rotate: true`, which refuses the old one from then on. Control planes are refused: they are enrolled automatically. Nothing is encrypted with the resulting keys yet.","operationId":"api_nodes_id_unlock_enroll_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rotate":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":["object","null"],"properties":{"keyId":{"type":"string"},"enrolledAt":{"type":"string"},"enrolledBy":{"type":"string"},"lastUnlockedAt":{"type":["string","null"]},"lastUnlockIp":{"type":["string","null"]},"lastRefusal":{"type":["string","null"]},"lastRefusalAt":{"type":["string","null"]},"lastRefusalIp":{"type":["string","null"]}},"additionalProperties":false,"required":["keyId","enrolledAt","enrolledBy","lastUnlockedAt","lastUnlockIp","lastRefusal","lastRefusalAt","lastRefusalIp"]}},"additionalProperties":false,"required":["status"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/refresh":{"post":{"tags":["Nodes"],"summary":"Recalculate available resources.","operationId":"api_nodes_id_refresh_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/orphan-volumes":{"get":{"tags":["Nodes"],"summary":"List LVM volumes on this node that no container accounts for.","operationId":"api_nodes_id_orphan-volumes_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"scannedAt":{"type":"string"},"orphans":{"type":"array","items":{"type":"object","properties":{"vg":{"type":"string"},"lv":{"type":"string"},"sizeBytes":{"type":"number"},"open":{"type":"boolean"},"reason":{"type":"string","enum":["removed-volume","wrong-disk-type","container-moved","container-deleted","snapshot","installer-placeholder","unrecognized"]},"containerId":{"type":"string"},"volumeName":{"type":"string"},"origin":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"currentNodeId":{"type":"string"},"currentNodeAddress":{"type":"string"},"deletedAt":{"type":"string"}},"additionalProperties":false,"required":["vg","lv","sizeBytes","open","reason"]}}},"additionalProperties":false,"required":["scannedAt","orphans"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/benchmark":{"post":{"tags":["Nodes"],"summary":"Re-run the CPU benchmark on a node and update perf_score.","operationId":"api_nodes_id_benchmark_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"force":{"type":"boolean","description":"Run the benchmark even though user containers, gateway sidecars, or CP services are currently using the CPU. The resulting perf_score will reflect available capacity under load rather than idle hardware — use this when you've intentionally swapped hardware on a running node and accept the contamination."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"perfScore":{"type":"number"},"benchmarkScore":{"type":"number","description":"Per-core sysbench events/sec (raw, unnormalized)."},"referenceEventsPerSecondPerCore":{"type":"number","description":"The reference per-core throughput that defines perf_score = 1.0. Returned so the UI can render '<benchmarkScore> ev/s/core / <reference> = <perfScore>' without hardcoding the constant."}},"additionalProperties":false,"required":["perfScore","benchmarkScore","referenceEventsPerSecondPerCore"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/rdns/validate":{"post":{"tags":["Nodes"],"summary":"Re-validate this node's reverse DNS (FCrDNS).","operationId":"api_nodes_id_rdns_validate_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/rdns/push":{"post":{"tags":["Nodes"],"summary":"Re-apply this node's PTR via the provider API.","operationId":"api_nodes_id_rdns_push_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{nodeId}/reset":{"post":{"tags":["Nodes"],"summary":"Reset node","description":"Reset the node. In `hard` mode, removes and recreates all containers (volumes stay unchanged), reinstalls Docker config, and bounces the daemon — use when the node is broken. In `soft` mode, only rewrites the systemd unit and restarts the service — use to pick up publish-list / unit changes without container churn.","operationId":"api_nodes_nodeId_reset_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"nodeId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["hard","soft"],"description":"Reset mode. Defaults to `hard`."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/lost":{"post":{"tags":["Nodes"],"summary":"Mark node lost.","description":"Mark an unreachable node as lost: its containers are soft-deleted (restorable for 30 days), the node is disabled, and every Nebula cert ever signed for it is blocklisted so a returning zombie cannot rejoin the mesh. The node row is KEPT — SSH still works, so data can be recovered from its disks — and the provider server is left completely alone. Because the node's mesh identity is revoked, the only route back into service is a reinstall; delete the node afterwards if it is not coming back. For a control-plane node this force-evicts it from etcd, and is refused when that would drop etcd below quorum (recover via emergency reset instead).","operationId":"api_nodes_id_lost_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{nodeId}/reinstall":{"post":{"tags":["Nodes"],"summary":"Reinstall node","description":"Reinstall the OS on an existing provider-managed bare-metal node in place — keeps the same server, IP, and (for committed offers like Scaleway Elastic Metal or Hetzner Robot) the subscription, so there's no delete/recreate billing churn. Wipes the OS and all data on the node, rotates its SSH host key, and re-runs the full bootstrap. Supported for Scaleway Elastic Metal and Hetzner Robot servers. A control-plane node that is still joined is gracefully removed from the control plane first (refused if any other control plane is unhealthy or still joining) and rejoins it during bootstrap; the primary control plane cannot be reinstalled.","operationId":"api_nodes_nodeId_reinstall_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"nodeId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{nodeId}/retry":{"post":{"tags":["Nodes"],"summary":"Retry node setup","description":"Re-run provisioning for a node whose setup failed, reusing the existing row (same Nebula address, same provider server — no new VM is requested). Runs the full bootstrap the add flow runs: waits for the server to become reachable, installs Docker, probes capacity, benchmarks the CPU, and performs the role-specific setup, then clears the failure and enables scheduling. Rejected unless the node is in the `failed` setup state — a node that finished provisioning is repaired with Reset Node, not this.","operationId":"api_nodes_nodeId_retry_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"nodeId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{nodeId}/upgrade":{"post":{"tags":["Nodes"],"summary":"Upgrade node","description":"Upgrade a node. Rotates Nebula certificates, performs a system upgrade, and reboots.","operationId":"api_nodes_nodeId_upgrade_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"nodeId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{nodeId}/reload":{"post":{"tags":["Nodes"],"summary":"Reload a node's config","description":"Request a reload of a node's Nebula, Alloy, Envoy and PowerDNS config. Use this when a node looks stale — it's the same reload that container deploys and DNS changes trigger, without needing an unrelated change to piggyback on. Non-disruptive: configs are rewritten and the daemons are reloaded in place, no container churn and no reboot. Queued, not immediate: the node is picked up by the periodic reload sweep within ~10 seconds, and stays pending until a reload succeeds.","operationId":"api_nodes_nodeId_reload_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"nodeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{nodeId}/set-disabled":{"post":{"tags":["Nodes"],"summary":"Enable or disable node scheduling","description":"Enable or disable scheduling on a node. When disabled, no new containers will be placed on this node.","operationId":"api_nodes_nodeId_set-disabled_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"nodeId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"disabled":{"type":"boolean"}},"additionalProperties":false,"required":["disabled"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{nodeId}/drain":{"post":{"tags":["Nodes"],"summary":"Drain node","description":"Drain a node by migrating all containers to other nodes. The node must be disabled first. Fails if migration placeholders are targeting this node.","operationId":"api_nodes_nodeId_drain_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"nodeId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/join-status":{"get":{"tags":["Nodes"],"summary":"Live join progress of a control-plane node","operationId":"api_nodes_id_join-status_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"joined":{"type":"boolean","description":"Whether the node has joined. Once true the rest is moot, and the page should reload the node."},"stage":{"type":"string","enum":["not-member","etcd-not-started","catching-up","voter","unknown"],"description":"How far the join has got, read live from etcd's member list. `unknown` means the member list could not be read — see `error`."},"reachable":{"type":"boolean","description":"Whether the node's control plane answers its health check over the mesh right now."},"reachError":{"type":"string","description":"Why the health check failed, when it did."},"error":{"type":"string","description":"Why the etcd member list could not be read."}},"additionalProperties":false,"required":["joined","stage","reachable"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nodes/{id}/kernel-logs":{"get":{"tags":["Nodes"],"summary":"Query kernel journal logs for a node.","operationId":"api_nodes_id_kernel-logs_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start time (RFC3339 or Unix nanoseconds).","required":true,"schema":{"type":"string","description":"Start time (RFC3339 or Unix nanoseconds)."}},{"name":"end","in":"query","description":"End time (RFC3339 or Unix nanoseconds).","required":true,"schema":{"type":"string","description":"End time (RFC3339 or Unix nanoseconds)."}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"streams":{"type":"array","items":{"type":"object","properties":{"stream":{"type":"object","additionalProperties":{"type":"string"}},"values":{"type":"array","items":{"type":"array","items":{"type":"string"}}}},"additionalProperties":false,"required":["stream","values"]}}},"additionalProperties":false,"required":["streams"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ssh-posture":{"get":{"tags":["Nodes"],"summary":"The last SSH posture check of every node.","operationId":"api_ssh-posture_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"checking":{"type":"boolean"},"nodes":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"address":{"type":"string"},"isControlPlane":{"type":"boolean"},"disabled":{"type":"boolean"},"checkedAt":{"type":"string"},"checkedBy":{"type":"string"},"error":{"type":"string"},"errorAt":{"type":"string"},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"check":{"type":"string","enum":["password-login","empty-passwords","match-block","root-password-login","extra-account","second-root","unrecognized-key","authorized-keys-command","trusted-user-ca","weak-key","hostbased-auth","permit-user-environment","strict-modes","key-outside-scope","trusted-key-missing"]},"severity":{"type":"string","enum":["critical","warning"]},"title":{"type":"string"},"detail":{"type":"string"},"remedy":{"type":"string"},"fix":{"type":"string","enum":["harden-sshd","remove-key","deny-account","install-trusted-keys"]},"account":{"type":"string"},"fingerprint":{"type":"string"},"file":{"type":"string"}},"additionalProperties":false,"required":["id","check","severity","title","detail"]}}},"additionalProperties":false,"required":["nodeId","address","isControlPlane","disabled"]}}},"additionalProperties":false,"required":["checking","nodes"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ssh-posture/check":{"post":{"tags":["Nodes"],"summary":"Check the SSH posture of every node.","operationId":"api_ssh-posture_check_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ssh-posture/trusted-keys":{"get":{"tags":["Nodes"],"summary":"List the trusted SSH keys installed on every control plane.","operationId":"api_ssh-posture_trusted-keys_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"publicKey":{"type":"string"},"fingerprint":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string"}},"additionalProperties":false,"required":["id","label","publicKey","fingerprint","createdBy","createdAt"]}}},"additionalProperties":false,"required":["keys"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Nodes"],"summary":"Add a trusted SSH key; it is installed on every control plane.","operationId":"api_ssh-posture_trusted-keys_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"publicKey":{"type":"string"}},"additionalProperties":false,"required":["label","publicKey"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"publicKey":{"type":"string"},"fingerprint":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string"}},"additionalProperties":false,"required":["id","label","publicKey","fingerprint","createdBy","createdAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ssh-posture/trusted-keys/{id}":{"delete":{"tags":["Nodes"],"summary":"Remove a trusted SSH key from the list and the control planes.","operationId":"api_ssh-posture_trusted-keys_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/trust-store":{"get":{"tags":["Nodes"],"summary":"The trust store: the published version, each node's copy, and this control plane's.","operationId":"api_trust-store_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"sync":{"type":"object","properties":{"version":{"type":"string"},"builtAt":{"type":"string"},"checkedAt":{"type":"string"},"error":{"type":"string"},"errorAt":{"type":"string"},"nssTag":{"type":"string"},"collections":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"timestamp":{"type":"number"}},"additionalProperties":false,"required":["name","timestamp"]}}},"additionalProperties":false,"required":["collections"]},"nodes":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"address":{"type":"string"},"isControlPlane":{"type":"boolean"},"version":{"type":"string"},"syncedAt":{"type":"string"},"checkedAt":{"type":"string"},"error":{"type":"string"},"errorAt":{"type":"string"}},"additionalProperties":false,"required":["nodeId","address","isControlPlane"]}},"local":{"type":"object","properties":{"unavailable":{"type":"string"},"version":{"type":"string"},"bundledNssTag":{"type":"string"},"roots":{"type":"number"},"withheldRoots":{"type":"array","items":{"type":"string"}},"ctLogs":{"type":"number"},"crliteFilters":{"type":"number"},"onecrlEntries":{"type":"number"},"newestDataMs":{"type":"number"},"loadError":{"type":"string"}},"additionalProperties":false,"required":["roots","withheldRoots","ctLogs","crliteFilters","onecrlEntries","newestDataMs"]},"ctAudit":{"type":"object","properties":{"pending":{"type":"number"},"included":{"type":"number"},"failed":{"type":"number"},"skipped":{"type":"number"},"oldestPending":{"type":"string"},"logs":{"type":"array","items":{"type":"object","properties":{"logId":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string"},"treeSize":{"type":"number"},"checkedAt":{"type":"string"},"error":{"type":"string"},"errorAt":{"type":"string"}},"additionalProperties":false,"required":["logId","description"]}},"violations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"logId":{"type":"string"},"log":{"type":"string"},"kind":{"type":"string","enum":["mismatch","missing","inconsistent"]},"detail":{"type":"string"},"evidence":{"type":"string"},"detectedAt":{"type":"string"},"acknowledgedAt":{"type":"string"},"acknowledgedBy":{"type":"string"}},"additionalProperties":false,"required":["id","logId","kind","detail","evidence","detectedAt"]}}},"additionalProperties":false,"required":["pending","included","failed","skipped","logs","violations"]}},"additionalProperties":false,"required":["sync","nodes","local","ctAudit"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/trust-store/view":{"get":{"tags":["Nodes"],"summary":"The trust store oneDeploy's own outbound TLS is checked against, as any user may see it.","operationId":"api_trust-store_view_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"},"builtAt":{"type":"string"},"nssTag":{"type":"string"},"newestDataMs":{"type":"number"},"roots":{"type":"number"},"ctLogs":{"type":"number"},"unavailable":{"type":"string"},"overrides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["add_root","remove_root","add_log","remove_log"]},"label":{"type":"string"},"spkiSha256":{"type":"string"},"logId":{"type":"string"},"reason":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string"}},"additionalProperties":false,"required":["id","kind","label","reason","createdBy","createdAt"]}},"ctAudit":{"type":"object","properties":{"pending":{"type":"number"},"included":{"type":"number"},"failed":{"type":"number"},"violations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"log":{"type":"string"},"kind":{"type":"string","enum":["mismatch","missing","inconsistent"]},"detectedAt":{"type":"string"},"acknowledgedAt":{"type":"string"}},"additionalProperties":false,"required":["id","kind","detectedAt"]}}},"additionalProperties":false,"required":["pending","included","failed","violations"]}},"additionalProperties":false,"required":["newestDataMs","roots","ctLogs","overrides","ctAudit"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/trust-store/contents":{"get":{"tags":["Nodes"],"summary":"Every root certificate and CT log the trust store trusts.","description":"From this control plane's onedeploy-native: the store it checks connections against right now, administrators' changes included.","operationId":"api_trust-store_contents_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"store":{"type":"string"},"roots":{"type":"array","items":{"type":"object","properties":{"subject":{"type":"string"},"spkiSha256":{"type":"string"},"distrustAfter":{"type":["number","null"]},"addedByAdmin":{"type":"boolean"},"distrustedByAdmin":{"type":"boolean"}},"additionalProperties":false,"required":["subject","spkiSha256","distrustAfter","addedByAdmin","distrustedByAdmin"]}},"logs":{"type":"array","items":{"type":"object","properties":{"logId":{"type":"string"},"description":{"type":"string"},"operator":{"type":["string","null"]},"url":{"type":["string","null"]},"tiled":{"type":"boolean"},"admissible":{"type":"boolean"},"mmdSecs":{"type":"number"},"addedByAdmin":{"type":"boolean"}},"additionalProperties":false,"required":["logId","description","operator","url","tiled","admissible","mmdSecs","addedByAdmin"]}}},"additionalProperties":false,"required":["store","roots","logs"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/trust-store/roots":{"post":{"tags":["Nodes"],"summary":"Trust an additional root certificate.","description":"Trusts a CA certificate for oneDeploy's own outbound TLS on every node, beside Mozilla's roots and past the bundled ceiling. Whoever holds its private key can then impersonate any server to oneDeploy. Meant for testing and for private CAs; audited and shown to every user.","operationId":"api_trust-store_roots_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"certificate":{"type":"string","maxLength":65536},"reason":{"type":"string","maxLength":1000}},"additionalProperties":false,"required":["certificate","reason"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/trust-store/roots/distrust":{"post":{"tags":["Nodes"],"summary":"Distrust a root certificate.","description":"Distrusts a root's key on every node, ahead of Mozilla: the root no longer anchors a chain, and a certificate with that key is refused wherever it appears in one, so a cross-signed copy is refused too. Name it by the SHA-256 of its key (as `GET /api/trust-store/contents` lists it) or paste its certificate.","operationId":"api_trust-store_roots_distrust_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spkiSha256":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":1000},"certificate":{"type":"string","maxLength":65536},"reason":{"type":"string","maxLength":1000}},"additionalProperties":false,"required":["reason"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/trust-store/logs":{"post":{"tags":["Nodes"],"summary":"Trust an additional Certificate Transparency log.","description":"Counts a CT log's SCTs like a log on Mozilla's list, on every node. A tiled log is also audited. Its operator name counts towards the two-operator rule, so a log added under a made-up operator name weakens that rule.","operationId":"api_trust-store_logs_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","maxLength":16384},"url":{"type":"string","maxLength":2048},"mmdSecs":{"type":"integer"},"operator":{"type":"string","maxLength":1000},"description":{"type":"string","maxLength":1000},"tiled":{"type":"boolean"},"reason":{"type":"string","maxLength":1000}},"additionalProperties":false,"required":["key","url","mmdSecs","operator","description","tiled","reason"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/trust-store/logs/remove":{"post":{"tags":["Nodes"],"summary":"Stop trusting a Certificate Transparency log.","description":"Its SCTs no longer count, on every node, whoever lists the log. A certificate that then has too few SCTs from other logs is refused.","operationId":"api_trust-store_logs_remove_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"logId":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":1000},"reason":{"type":"string","maxLength":1000}},"additionalProperties":false,"required":["logId","label","reason"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/trust-store/overrides/{id}":{"delete":{"tags":["Nodes"],"summary":"Undo an administrator's change to the trust store.","operationId":"api_trust-store_overrides_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/trust-store/ct-audit/violations/{id}/acknowledge":{"post":{"tags":["Nodes"],"summary":"Acknowledge evidence against a Certificate Transparency log.","description":"Marks one piece of the SCT auditor's evidence as seen, which ends the \"Certificate Transparency Log Misbehaving\" alert once none is left unacknowledged. The evidence is kept. Needs a recent passkey confirmation: acknowledging hides a security alert.","operationId":"api_trust-store_ct-audit_violations_id_acknowledge_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/orphaned-servers":{"get":{"tags":["Nodes"],"summary":"List orphaned provider servers","description":"Provider VMs left behind by a lost-node teardown whose deletion is still being retried. A non-empty list usually means the provider account was removed or the provider API keeps rejecting the delete — resolve it in the provider console and dismiss the entry.","operationId":"api_orphaned-servers_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"servers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"providerServerId":{"type":"string"},"hostname":{"type":"string"},"reason":{"type":"string"},"createdAt":{"type":"string"},"lastAttemptAt":{"type":"string"},"lastError":{"type":"string"}},"additionalProperties":false,"required":["id","providerServerId","createdAt"]}}},"additionalProperties":false,"required":["servers"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/orphaned-servers/{id}":{"delete":{"tags":["Nodes"],"summary":"Dismiss an orphaned provider server tombstone","description":"Stop tracking an orphaned provider server — use once you've confirmed the VM is deleted (or intend to delete it manually). Does not itself contact the provider; the leader task handles automatic retries.","operationId":"api_orphaned-servers_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-restore":{"get":{"tags":["Nodes"],"summary":"Get the last cluster restore","description":"After a restore from a backup the cluster is fresh: every old node is marked lost and every container soft-deleted for restore from backup. Returns null `restore` on a cluster that was never restored.","operationId":"api_cluster-restore_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"restore":{"type":["object","null"],"properties":{"restoredAt":{"type":"string"},"snapshotTime":{"type":"string"},"mail":{"type":"string","enum":["pending","done","failed"]},"mailError":{"type":"string"},"containersToRestore":{"type":"number","description":"Containers lost with their node since the restore that are still restorable and not yet restored."},"standby":{"type":"object","properties":{"dns":{"type":"object","properties":{"done":{"type":"boolean"},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"verified":{"type":"boolean"},"exists":{"type":"boolean","description":"False when the account was deleted here since the restore; its old keys still have to be refused."},"zones":{"type":"array","items":{"type":"string"},"description":"The zones from before the restore that were linked to this account. They are held until its old keys are refused."}},"additionalProperties":false,"required":["id","name","type","verified","exists","zones"]}},"unlinkedZones":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"moved":{"type":"boolean"}},"additionalProperties":false,"required":["name","moved"]},"description":"Zones from before the restore with no registrar link, whose delegation the admin moves by hand and then releases."}},"additionalProperties":false,"required":["done","accounts","unlinkedZones"]},"backups":{"type":"object","properties":{"done":{"type":"boolean"},"sourceUrl":{"type":"string"}},"additionalProperties":false,"required":["done","sourceUrl"]}},"additionalProperties":false,"required":["dns","backups"],"description":"What the restore still holds back until the old cluster is shown to be fenced. Absent once there is nothing left to hold back."}},"additionalProperties":false,"required":["restoredAt","snapshotTime","mail","containersToRestore"]}},"additionalProperties":false,"required":["restore"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-restore/dns/accounts/{id}/verify":{"post":{"tags":["Nodes"],"summary":"Verify a registrar account after a restore","description":"Checks that the registrar refuses the keys this account had before the restore and, if the account still exists, accepts its keys now, optionally replacing them first. Passing releases the zones that were linked to this account at the restore and pushes their delegations; zones of other accounts stay held. Per-zone push failures come back in `syncErrors`.","operationId":"api_cluster-restore_dns_accounts_id_verify_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"credentials":{"type":"object","additionalProperties":{"type":"string"},"description":"New keys for the account, saved once they work."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"released":{"type":"array","items":{"type":"string"}},"syncErrors":{"type":"array","items":{"type":"object","properties":{"zone":{"type":"string"},"error":{"type":"string"}},"additionalProperties":false,"required":["zone","error"]}}},"additionalProperties":false,"required":["released","syncErrors"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-restore/dns/zones/{zone}/release":{"post":{"tags":["Nodes"],"summary":"Release a zone moved by hand after a restore","description":"For a zone from before the restore that had no registrar link: the admin has moved its delegation to this cluster themselves, which oneDeploy cannot check. Refused for a zone that was linked to a registrar account; that account's keys are checked instead.","operationId":"api_cluster-restore_dns_zones_zone_release_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"zone","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-restore/backups/verify":{"post":{"tags":["Nodes"],"summary":"Verify backup storage after a restore","description":"Checks that every bucket this cluster backs up to rejects the keys the old cluster had for it and accepts the keys configured here. On success, backups are writable again.","operationId":"api_cluster-restore_backups_verify_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cp-upgrade":{"get":{"tags":["Nodes"],"summary":"Get the control-plane upgrade state","description":"Whether a newer oneDeploy image is available for the tag this cluster runs, and the latest upgrade run: the primary's own steps and the rollout to every secondary control plane. Admin-only.","operationId":"api_cp-upgrade_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"refresh","in":"query","description":"Ask the registry now instead of using the last answer.","required":false,"schema":{"type":"boolean","description":"Ask the registry now instead of using the last answer."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":["object","null"],"properties":{"id":{"type":"string"},"requestedBy":{"type":["string","null"]},"startedAt":{"type":"number"},"updatedAt":{"type":"number"},"finishedAt":{"type":["number","null"]},"fromVersion":{"type":["string","null"]},"targetVersion":{"type":["string","null"]},"targetDigest":{"type":["string","null"]},"stage":{"type":"string","enum":["pulling","up-to-date","prepulling","handing-off","restarting","rolling-out","done","failed"]},"message":{"type":["string","null"]},"nodes":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"nebula":{"type":"number"},"primary":{"type":"boolean"},"phase":{"type":"string","enum":["pending","pulling","pulled","draining","restarting","starting","done","failed"]},"version":{"type":["string","null"]},"error":{"type":["string","null"]},"updatedAt":{"type":"number"}},"additionalProperties":false,"required":["address","nebula","primary","phase","version","error","updatedAt"]}}},"additionalProperties":false,"required":["id","requestedBy","startedAt","updatedAt","finishedAt","fromVersion","targetVersion","targetDigest","stage","message","nodes"]},"check":{"type":"object","properties":{"image":{"type":"string"},"currentVersion":{"type":"string"},"currentDigest":{"type":["string","null"]},"latestDigest":{"type":["string","null"]},"updateAvailable":{"type":"boolean"},"checkedAt":{"type":"number"},"error":{"type":["string","null"]}},"additionalProperties":false,"required":["image","currentVersion","currentDigest","latestDigest","updateAvailable","checkedAt","error"]}},"additionalProperties":false,"required":["status","check"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Nodes"],"summary":"Upgrade the control planes","description":"Pulls the newest image for this cluster's tag on the primary and on every secondary, then hands over to the upgrade helper on the primary's IP (port 2443), which restarts the primary and shows its progress, logs and a host shell. The returned link carries a one-time token for the caller only; open it to follow along. Admin-only.","operationId":"api_cp-upgrade_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"updaterUrl":{"type":"string","description":"The helper's page, with the caller's one-time token in the fragment. It answers once the image is pulled."},"status":{"type":"object","properties":{"id":{"type":"string"},"requestedBy":{"type":["string","null"]},"startedAt":{"type":"number"},"updatedAt":{"type":"number"},"finishedAt":{"type":["number","null"]},"fromVersion":{"type":["string","null"]},"targetVersion":{"type":["string","null"]},"targetDigest":{"type":["string","null"]},"stage":{"type":"string","enum":["pulling","up-to-date","prepulling","handing-off","restarting","rolling-out","done","failed"]},"message":{"type":["string","null"]},"nodes":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"nebula":{"type":"number"},"primary":{"type":"boolean"},"phase":{"type":"string","enum":["pending","pulling","pulled","draining","restarting","starting","done","failed"]},"version":{"type":["string","null"]},"error":{"type":["string","null"]},"updatedAt":{"type":"number"}},"additionalProperties":false,"required":["address","nebula","primary","phase","version","error","updatedAt"]}}},"additionalProperties":false,"required":["id","requestedBy","startedAt","updatedAt","finishedAt","fromVersion","targetVersion","targetDigest","stage","message","nodes"]}},"additionalProperties":false,"required":["updaterUrl","status"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers":{"post":{"tags":["Containers"],"summary":"Create a new container.","operationId":"api_containers_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"serviceId":{"type":"string","format":"uuid"},"command":{"type":"string","description":"Per-container command override."},"env":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"stored":{"type":"string","description":"Keep the value currently stored under this key (the same key to leave it untouched, another key to carry it across a rename)."}},"additionalProperties":false,"required":["stored"]}]},"description":"Per-container env override. Each value is plaintext or `{ stored: <key> }` to copy the service's stored value for that key."}},"additionalProperties":false,"required":["serviceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}":{"get":{"tags":["Containers"],"summary":"Get container details","operationId":"api_containers_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"The IP address of this container."},"service":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"command":{"type":"string"},"env":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":"string","description":"The value, with every secret-shaped token masked (`•`)."},"redacted":{"type":"boolean","description":"Whether anything was masked. A redacted value's plaintext is only available from the matching `reveal` endpoint, which is audited."}},"additionalProperties":false,"required":["value","redacted"]},"description":"The service's environment variables, redacted. Reveal via POST /api/services/{id}/env/reveal."},"files":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":"string","description":"The value, with every secret-shaped token masked (`•`)."},"redacted":{"type":"boolean","description":"Whether anything was masked. A redacted value's plaintext is only available from the matching `reveal` endpoint, which is audited."}},"additionalProperties":false,"required":["value","redacted"]},"description":"The service's file contents by path, redacted. Reveal via POST /api/services/{id}/files/reveal."},"defaultVolumes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"storage":{"type":"integer","description":"Target size in MiB the service wants every container's volume at. Compare against `volumes[*].storage` (actual on disk) to see what the next deploy will resize."},"diskType":{"type":"string"},"filesystem":{"type":"string","enum":["ext4","xfs"]},"layout":{"type":"string","enum":["mirrored","striped"]}},"additionalProperties":false,"required":["name","storage","diskType"]},"description":"The service's desired volume sizes — what containers' LVs converge to."}},"additionalProperties":false,"required":["id","name","command","env","files","defaultVolumes"],"description":"The service this container belongs to."},"node":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"}},"additionalProperties":false,"required":["id","address"],"description":"The node this container is running on."},"cpu":{"type":"integer","minimum":1,"description":"CPU reservation for the container in deci-ECUs (10 = 1 ECU)."},"memory":{"type":"integer","minimum":6,"description":"The amount of memory available to the container in MiB."},"minPerfScore":{"type":"number","minimum":0,"description":"Minimum node perf_score required to schedule this container. 0 means no minimum."},"storage":{"type":"integer","minimum":0,"description":"The storage that is available to the container in MiB."},"diskType":{"type":"string","description":"The disk type (LVM volume group) for this container."},"volumes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"storage":{"type":"integer","description":"Real on-disk size in MiB — what the LV is sized to right now. The desired size lives on `service.defaultVolumes`; the deploy reconciles toward it."},"diskType":{"type":"string"},"filesystem":{"type":"string","enum":["ext4","xfs"]},"layout":{"type":"string","enum":["mirrored","striped"]},"redundancy":{"type":"string","enum":["mirrored","striped","raid","declared","single"],"description":"What the volume actually is on its node: `mirrored` (LVM raid1, two copies on separate disks), `striped` (spread over the node's disks, no redundancy), `raid` (a plain volume on an md array that survives a failed disk), `declared` (a plain volume on storage declared redundant, e.g. a cloud VM's replicated block storage) or `single` (one copy on a disk nothing makes redundant)."}},"additionalProperties":false,"required":["name","storage","diskType"]},"description":"Volumes attached to this container, sized to their current on-disk state."},"shrinkBlockedVolumes":{"type":"array","items":{"type":"string"},"description":"Names of volumes whose most recent deploy attempted a shrink and was refused (filesystem still held more than the new target). Distinguishes 'shrink hasn't been deployed yet' (empty) from 'shrink failed' (non-empty); the dashboard surfaces a retry button when non-empty."},"migration":{"type":"object","properties":{"targetAssigned":{"type":"boolean","description":"Whether the migration's placeholder has been given a target node. False means the scheduler has found no node that fits it yet — the container stays in `migrate` state, doing nothing, until one appears or the migration is cancelled."}},"additionalProperties":false,"required":["targetAssigned"],"description":"Present only while this container is migrating. `targetAssigned: false` is cancellable via POST /api/containers/:id/cancel-migration."},"stopped":{"type":"boolean","description":"Whether the container is stopped."},"projectId":{"type":"string","format":"uuid","description":"The project this container belongs to."},"command":{"type":"string","description":"Per-container command override. Absent means using service default."},"env":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":"string","description":"The value, with every secret-shaped token masked (`•`)."},"redacted":{"type":"boolean","description":"Whether anything was masked. A redacted value's plaintext is only available from the matching `reveal` endpoint, which is audited."}},"additionalProperties":false,"required":["value","redacted"]},"description":"Per-container env override, redacted. Absent means using service default. Reveal via POST /api/containers/{id}/env/reveal."},"files":{"type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":"string","description":"The value, with every secret-shaped token masked (`•`)."},"redacted":{"type":"boolean","description":"Whether anything was masked. A redacted value's plaintext is only available from the matching `reveal` endpoint, which is audited."}},"additionalProperties":false,"required":["value","redacted"]},"description":"Per-container file contents override by path, redacted. Absent means using service default. Reveal via POST /api/containers/{id}/files/reveal."}},"additionalProperties":false,"required":["address","service","cpu","memory","minPerfScore","storage","diskType","volumes","shrinkBlockedVolumes","stopped","projectId"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Containers"],"summary":"Update container overrides.","operationId":"api_containers_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string","description":"Per-container command override. Omit to clear override and use service default."},"env":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"stored":{"type":"string","description":"Keep the value currently stored under this key (the same key to leave it untouched, another key to carry it across a rename)."}},"additionalProperties":false,"required":["stored"]}]},"description":"Per-container env override. Omit to clear override and use service default. Each value is plaintext or `{ stored: <key> }` to keep the value currently stored under that key in the env this container runs with (its override if set, else the service's)."},"files":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"stored":{"type":"string","description":"Keep the value currently stored under this key (the same key to leave it untouched, another key to carry it across a rename)."}},"additionalProperties":false,"required":["stored"]}]},"description":"Per-container file contents override by path. Omit to clear override and use service default. Each value is plaintext or `{ stored: <path> }` to keep the content currently stored under that path in the files this container runs with (its override if set, else the service's)."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Containers"],"summary":"Destroy container from node.","operationId":"api_containers_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/env/reveal":{"post":{"tags":["Containers"],"summary":"Reveal container environment variable values.","description":"Returns the stored plaintext of the named environment variables of this container (its override if set, otherwise the service's env) and records a `reveal` audit entry.","operationId":"api_containers_id_env_reveal_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"The environment variables to reveal."}},"additionalProperties":false,"required":["keys"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"object","additionalProperties":{"type":"string"},"description":"The stored (unredacted) values, by key."},"source":{"type":"string","enum":["container","service"],"description":"Whether the values came from the container's override or the service."}},"additionalProperties":false,"required":["values","source"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/files/reveal":{"post":{"tags":["Containers"],"summary":"Reveal container file contents.","description":"Returns the stored contents of the named files of this container (its override if set, otherwise the service's files) and records a `reveal` audit entry.","operationId":"api_containers_id_files_reveal_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"The paths of the files to reveal."}},"additionalProperties":false,"required":["keys"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"object","additionalProperties":{"type":"string"},"description":"The stored (unredacted) values, by key."},"source":{"type":"string","enum":["container","service"],"description":"Whether the values came from the container's override or the service."}},"additionalProperties":false,"required":["values","source"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/metrics":{"get":{"tags":["Containers"],"summary":"Resource metrics for a single container over a selectable time window.","operationId":"api_containers_id_metrics_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"start":{"type":"number"},"end":{"type":"number"},"step":{"type":"number"},"series":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"cpu":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cpuThrottled":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"memory":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"networkRx":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"networkTx":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"diskRead":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"diskWrite":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cpuLimit":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"memoryLimit":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","cpu","cpuThrottled","memory","networkRx","networkTx","diskRead","diskWrite","cpuLimit","memoryLimit"]}},"volumes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"seriesKey":{"type":"string"},"volume":{"type":"string"},"usage":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"fraction":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","seriesKey","volume","usage","fraction"]}},"ingress":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"requestsPerSec":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"errorRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"avgLatencyMs":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","requestsPerSec","errorRate","avgLatencyMs"]}},"errors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["key","message"]}}},"additionalProperties":false,"required":["range","start","end","step","series","volumes","ingress","errors"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/runtime":{"get":{"tags":["Containers"],"summary":"Live runtime state (uptime, restart count) for a container.","operationId":"api_containers_id_runtime_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"activeState":{"type":"string","description":"systemd ActiveState of the unit (active, inactive, failed, …)."},"subState":{"type":"string","description":"systemd SubState of the unit (running, exited, …)."},"unitStartedAt":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Unix seconds when the unit last entered the active state, or null if it has never started. Reflects nebula (or the netns holder), not the app — see summary."},"unitRestartCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Number of times systemd has restarted the unit since it was loaded, or null if unavailable. A rare, strong signal (nebula/holder OOM or crash, or a redeploy) — not app-level crashes."},"appRunning":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the app's own Docker container is currently running, or null if it doesn't exist (e.g. mid-deploy)."},"appStartedAt":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Unix seconds when the app's own Docker container last started, or null if unavailable."},"appRestartCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Docker's own restart-policy-triggered restart count for the app container. Resets to 0 on every redeploy (the container is recreated), so this counts restarts since the last redeploy, not over the container's lifetime."}},"additionalProperties":false,"required":["activeState","subState","unitStartedAt","unitRestartCount","appRunning","appStartedAt","appRestartCount"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/restore":{"post":{"tags":["Containers"],"summary":"Restore a backup to a container","operationId":"api_containers_id_restore_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","description":"The run ID of the backup to restore."},"serviceId":{"type":"string","format":"uuid","description":"The ID of the service to restore from. Admins may pass the id of a service this cluster has no record of, to restore from a backup repository left in the bucket by a previous cluster."}},"additionalProperties":false,"required":["runId","serviceId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/restore-deleted":{"post":{"tags":["Containers"],"summary":"Restore a soft-deleted container.","operationId":"api_containers_id_restore-deleted_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledgeNoBackups":{"type":"boolean","description":"Required when the container has volumes but the service has no backups — confirms the user understands disks will come back empty."}},"additionalProperties":false,"required":["acknowledgeNoBackups"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/redeploy":{"post":{"tags":["Containers"],"summary":"Redeploy a single container.","operationId":"api_containers_id_redeploy_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/retry-shrink":{"post":{"tags":["Containers"],"summary":"Retry a blocked storage shrink for this container.","operationId":"api_containers_id_retry-shrink_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/cancel-migration":{"post":{"tags":["Containers"],"summary":"Give up a migration that is still waiting for a target node.","description":"Clears the container's migration state and deletes its unassigned migration placeholder, leaving the container running on its current node. Refused when the migration has already been assigned a target node (the deployment loop owns it from that point) or when the container is not migrating. Does not revert a resource change that triggered the migration.","operationId":"api_containers_id_cancel-migration_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/migrate":{"post":{"tags":["Containers"],"summary":"Move a container to another node (admin).","description":"Starts a migration of the container to `nodeId`, or to the node the scheduler picks when it is omitted. Volumes are copied while the container runs; it stops only for the final sync. Refused when the node does not admit the service or has no room for the container, when the container is already moving, being set up, restored or backed up, or while a workflow runs on its service. A container holding a GPU can only be moved without naming a node.","operationId":"api_containers_id_migrate_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nodeId":{"type":"string","description":"Target node; omitted = let the scheduler choose."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/ssh-access":{"get":{"tags":["Containers"],"summary":"How to SSH into a container.","operationId":"api_containers_id_ssh-access_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"sshUsername":{"anyOf":[{"type":"string"},{"type":"null"}]},"serviceName":{"type":"string"},"command":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted":{"type":"boolean"},"hostKeyFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}]},"keysRegistered":{"type":"number"}},"additionalProperties":false,"required":["host","port","sshUsername","serviceName","command","deleted","hostKeyFingerprint","keysRegistered"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/agent-ssh":{"post":{"tags":["Containers"],"summary":"Approve one SSH connection to a container for the calling API token.","description":"API tokens only, and every call needs the token owner's approval. Once approved, connect within 10 minutes with the token's own SSH key (registered with PUT /api/agent/ssh-key) using the returned command. One approval opens one connection; the connection is closed when the token expires or is revoked, when its project access ends, or when the owner terminates it.","operationId":"api_containers_id_agent-ssh_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"sshUsername":{"type":"string"},"command":{"type":"string"},"hostKeyFingerprint":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","description":"Connect before this, or ask again."}},"additionalProperties":false,"required":["host","port","sshUsername","command","hostKeyFingerprint","expiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/files/download":{"get":{"tags":["Containers"],"summary":"Download a file (or a directory, as a tar) from a container.","operationId":"api_containers_id_files_download_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"path","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/files/upload":{"put":{"tags":["Containers"],"summary":"Upload a file into a container.","operationId":"api_containers_id_files_upload_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"path","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/stop":{"post":{"tags":["Containers"],"summary":"Stop a container","operationId":"api_containers_id_stop_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/containers/{id}/start":{"post":{"tags":["Containers"],"summary":"Start a stopped container","operationId":"api_containers_id_start_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/deployment-logs/{id}/sessions":{"get":{"tags":["Deployment Logs"],"summary":"List deployment log sessions for an entity.","operationId":"api_deployment-logs_id_sessions_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"finished":{"type":"boolean"},"success":{"type":"boolean"}},"additionalProperties":false,"required":["id","startedAt","finished"]}}},"additionalProperties":false,"required":["sessions"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/users":{"post":{"tags":["Users"],"summary":"Create new user account.","operationId":"api_users_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","pattern":"^[a-z][a-z0-9]+$"},"isAdmin":{"type":"boolean"},"phone":{"type":"string"},"timezone":{"type":"string","description":"IANA time zone used to compute the user's off-hours."}},"additionalProperties":false,"required":["username","isAdmin"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"additionalProperties":false,"required":["url"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"get":{"tags":["Users"],"summary":"List user accounts.","operationId":"api_users_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"isAdmin":{"type":"boolean"},"ntfyLastSeenAt":{"type":"string"}},"additionalProperties":false,"required":["username","isAdmin"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/users/me/pinned-projects":{"put":{"tags":["Users"],"summary":"Set the logged-in user's sidebar-pinned projects.","operationId":"api_users_me_pinned-projects_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["projectIds"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"pinnedProjects":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["pinnedProjects"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/users/{username}":{"delete":{"tags":["Users"],"summary":"Delete user account.","operationId":"api_users_username_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"get":{"tags":["Users"],"summary":"Get user account data.","operationId":"api_users_username_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"isAdmin":{"type":"boolean"},"phone":{"type":"string"},"timezone":{"type":"string"}},"additionalProperties":false,"required":["isAdmin"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Users"],"summary":"Modify user permissions.","operationId":"api_users_username_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"isAdmin":{"type":"boolean"},"phone":{"type":"string"},"timezone":{"type":"string","description":"IANA time zone used to compute the user's off-hours."}},"additionalProperties":false,"required":["isAdmin"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/users/{username}/reset":{"post":{"tags":["Users"],"summary":"Reset user password and TOTP.","operationId":"api_users_username_reset_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"additionalProperties":false,"required":["url"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/usernames":{"get":{"tags":["Users"],"summary":"List users visible to any authenticated user.","description":"The user directory behind the dashboard's user pickers. Every account, annotated with admin status, whether it is the caller, and the projects the caller shares with them.","operationId":"api_usernames_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"isAdmin":{"type":"boolean"},"isSelf":{"type":"boolean","description":"True for the requesting user."},"timezone":{"type":"string"},"gravatarHash":{"type":"string","description":"SHA-256 of the user's avatar address, for Gravatar lookups. Falls back to the hash of the username when the user has configured no address, which renders as a generated robot."},"sharedProjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"description":"Projects both the caller and this user are members of."}},"additionalProperties":false,"required":["username","isAdmin","isSelf","gravatarHash","sharedProjects"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/publickey":{"get":{"tags":["SSH"],"summary":"Get SSH public key.","operationId":"api_publickey_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"The SSH public key of the 0CodeKit Deploy service."}},"additionalProperties":false,"required":["key"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nebula/cert":{"post":{"tags":["Nebula"],"summary":"Get Nebula user configuration.","operationId":"api_nebula_cert_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectIds":{"type":"array","items":{"type":"string"},"description":"Projects to request full mesh access to, in addition to the always-present per-user identity and group grants. Empty for baseline-only access."}},"additionalProperties":false,"required":["projectIds"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"nebulaConfig":{"type":"string"}},"additionalProperties":false,"required":["nebulaConfig"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nebula/groups":{"get":{"tags":["Nebula"],"summary":"List user groups referenceable from a tunnel firewall.","operationId":"api_nebula_groups_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","description":"The firewall entry to store, as @<projectId>:<groupName>."},"name":{"type":"string","description":"Group name, unqualified."},"projectId":{"type":"string"},"projectName":{"type":"string"},"members":{"type":"array","items":{"type":"string"},"description":"Usernames this group currently resolves to."},"automatic":{"type":"boolean","description":"True for the built-in all-members group, which tracks project membership."}},"additionalProperties":false,"required":["ref","name","projectId","projectName","members","automatic"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nebula/projects":{"get":{"tags":["Nebula"],"summary":"List projects accessible to the authenticated Nebula user.","operationId":"api_nebula_projects_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/nebula/users":{"get":{"tags":["Nebula"],"summary":"List usernames (for tunnel firewall pickers).","operationId":"api_nebula_users_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"}},"additionalProperties":false,"required":["username"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/tunnels":{"post":{"tags":["Tunnels"],"summary":"Create or replace a tunnel.","operationId":"api_tunnels_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"port":{"type":"integer","minimum":1,"maximum":65535},"name":{"type":"string","pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"},"firewall":{"type":"array","items":{"type":"string"},"description":"Allowed usernames. Empty or omitted means the tunnel is public."}},"additionalProperties":false,"required":["port"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","hostname","expiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Tunnels"],"summary":"Delete all tunnels for the current user.","operationId":"api_tunnels_delete","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"number"}},"additionalProperties":false,"required":["deleted"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/tunnels/{id}":{"delete":{"tags":["Tunnels"],"summary":"Delete a tunnel.","operationId":"api_tunnels_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"additionalProperties":false,"required":["success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/tunnel-daemon/config":{"post":{"tags":["Tunnels"],"summary":"Fetch a tunnel daemon's Nebula configuration.","description":"Exchanges a tunnel daemon secret for a short-lived Nebula config pinned to the daemon's allocated mesh address, plus the fixed mesh port the daemon must bind on it (the same for every daemon — mesh addresses are unique, so the shared port can't collide). Called on startup and every ~10 minutes to refresh the certificate. Returns 401 once the secret has been revoked.","operationId":"api_tunnel-daemon_config_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string","description":"The tunnel daemon secret."}},"additionalProperties":false,"required":["secret"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"nebulaConfig":{"type":"string"},"port":{"type":"integer","description":"Port the daemon binds on its Nebula address."}},"additionalProperties":false,"required":["nebulaConfig","port"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/audit":{"get":{"tags":["Audit"],"summary":"List audit log entries.","operationId":"api_audit_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"action","in":"query","required":false,"schema":{"type":"string"}},{"name":"entityType","in":"query","required":false,"schema":{"type":"string"}},{"name":"username","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"username":{"type":"string"},"action":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"entityName":{"type":"string"},"before":{"type":"string"},"after":{"type":"string"},"apiToken":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"],"description":"The API token that performed the action, if one did."},"redactedEnv":{"type":"object","properties":{"before":{"type":"array","items":{"type":"string"}},"after":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["before","after"],"description":"Environment variables whose value was redacted in `before` / `after`. Their plaintext is only available from POST /api/audit/{id}/env/reveal, which is itself audited."},"redactedFiles":{"type":"object","properties":{"before":{"type":"array","items":{"type":"string"}},"after":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["before","after"],"description":"Files whose contents were redacted in `before` / `after`. Their plaintext is only available from POST /api/audit/{id}/files/reveal, which is itself audited."},"redactedPreviewEnv":{"type":"object","properties":{"before":{"type":"array","items":{"type":"string"}},"after":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["before","after"],"description":"Preview environment variables (a service's preview env block) whose value was redacted in `before` / `after`. Their plaintext is only available from POST /api/audit/{id}/preview-env/reveal, which is itself audited."}},"additionalProperties":false,"required":["id","timestamp","username","action","entityType","entityId","entityName","redactedEnv","redactedFiles","redactedPreviewEnv"]}},"total":{"type":"number"}},"additionalProperties":false,"required":["entries","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/audit/{id}/env/reveal":{"post":{"tags":["Audit"],"summary":"Reveal environment variable values recorded in an audit entry.","operationId":"api_audit_id_env_reveal_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"The environment variables to reveal, on both sides."}},"additionalProperties":false,"required":["keys"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"before":{"type":"object","additionalProperties":{"type":"string"},"description":"Plaintext values in the `before` snapshot, by key."},"after":{"type":"object","additionalProperties":{"type":"string"},"description":"Plaintext values in the `after` snapshot, by key."}},"additionalProperties":false,"required":["before","after"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/audit/{id}/files/reveal":{"post":{"tags":["Audit"],"summary":"Reveal file contents recorded in an audit entry.","operationId":"api_audit_id_files_reveal_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"The paths of the files to reveal, on both sides."}},"additionalProperties":false,"required":["keys"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"before":{"type":"object","additionalProperties":{"type":"string"},"description":"Plaintext values in the `before` snapshot, by key."},"after":{"type":"object","additionalProperties":{"type":"string"},"description":"Plaintext values in the `after` snapshot, by key."}},"additionalProperties":false,"required":["before","after"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/audit/{id}/preview-env/reveal":{"post":{"tags":["Audit"],"summary":"Reveal preview environment variable values recorded in an audit entry.","operationId":"api_audit_id_preview-env_reveal_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"description":"The environment variables to reveal, on both sides."}},"additionalProperties":false,"required":["keys"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"before":{"type":"object","additionalProperties":{"type":"string"},"description":"Plaintext values in the `before` snapshot, by key."},"after":{"type":"object","additionalProperties":{"type":"string"},"description":"Plaintext values in the `after` snapshot, by key."}},"additionalProperties":false,"required":["before","after"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/audit/{entityType}/{entityId}":{"get":{"tags":["Audit"],"summary":"List audit log entries for a specific entity.","operationId":"api_audit_entityType_entityId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"entityType","in":"path","required":true,"schema":{"type":"string"}},{"name":"entityId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"username":{"type":"string"},"action":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"entityName":{"type":"string"},"before":{"type":"string"},"after":{"type":"string"},"apiToken":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"],"description":"The API token that performed the action, if one did."},"redactedEnv":{"type":"object","properties":{"before":{"type":"array","items":{"type":"string"}},"after":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["before","after"],"description":"Environment variables whose value was redacted in `before` / `after`. Their plaintext is only available from POST /api/audit/{id}/env/reveal, which is itself audited."},"redactedFiles":{"type":"object","properties":{"before":{"type":"array","items":{"type":"string"}},"after":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["before","after"],"description":"Files whose contents were redacted in `before` / `after`. Their plaintext is only available from POST /api/audit/{id}/files/reveal, which is itself audited."},"redactedPreviewEnv":{"type":"object","properties":{"before":{"type":"array","items":{"type":"string"}},"after":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["before","after"],"description":"Preview environment variables (a service's preview env block) whose value was redacted in `before` / `after`. Their plaintext is only available from POST /api/audit/{id}/preview-env/reveal, which is itself audited."}},"additionalProperties":false,"required":["id","timestamp","username","action","entityType","entityId","entityName","redactedEnv","redactedFiles","redactedPreviewEnv"]}},"total":{"type":"number"}},"additionalProperties":false,"required":["entries","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/emails":{"get":{"tags":["Emails"],"summary":"List received emails.","operationId":"api_emails_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"address","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"receivedAt":{"type":"string","format":"date-time"},"mailFrom":{"type":"string"},"rcptTo":{"type":"string"},"subject":{"type":"string"},"source":{"type":"string"},"authSpf":{"type":"string"},"authDkim":{"type":"string"},"authDmarc":{"type":"string"}},"additionalProperties":false,"required":["id","receivedAt","mailFrom","rcptTo","subject","source","authSpf","authDkim","authDmarc"]}},"total":{"type":"number"}},"additionalProperties":false,"required":["emails","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/emails/outbound":{"get":{"tags":["Emails"],"summary":"List outbound mail sent through the user's inboxes.","operationId":"api_emails_outbound_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"address","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sender":{"type":"string"},"recipients":{"type":"array","items":{"type":"string"}},"delivery":{"type":"string","enum":["internal","external"]},"state":{"type":"string","enum":["pending","sent","failed"]},"attempts":{"type":"integer"},"receivedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"providerEvents":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"source":{"type":"string"},"event":{"type":"string"},"classified":{"type":"string"},"recipient":{"type":"string"},"diagnostic":{"type":"string"}},"additionalProperties":false,"required":["at","source","event"]}}},"additionalProperties":false,"required":["id","sender","recipients","delivery","state","attempts","receivedAt"]}},"total":{"type":"integer"}},"additionalProperties":false,"required":["rows","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/emails/sieve-log":{"get":{"tags":["Emails"],"summary":"List Sieve filter decisions for the user's inboxes.","operationId":"api_emails_sieve-log_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"address","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"receivedAt":{"type":"string","format":"date-time"},"mailFrom":{"type":"string"},"subject":{"type":"string"},"actions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["keep","fileinto","redirect"]},"folder":{"type":"string"},"address":{"type":"string"},"ok":{"type":"boolean"},"error":{"type":"string"}},"additionalProperties":false,"required":["kind"]}},"error":{"type":"string"}},"additionalProperties":false,"required":["id","address","receivedAt","mailFrom","subject","actions"]}},"total":{"type":"integer"}},"additionalProperties":false,"required":["rows","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/emails/{id}":{"get":{"tags":["Emails"],"summary":"Get a single email.","operationId":"api_emails_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"receivedAt":{"type":"string","format":"date-time"},"mailFrom":{"type":"string"},"rcptTo":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"html":{"type":"string"},"source":{"type":"string"},"authSpf":{"type":"string"},"authDkim":{"type":"string"},"authDmarc":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"filename":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"}},"additionalProperties":false,"required":["index","filename","contentType","size"]}}},"additionalProperties":false,"required":["id","receivedAt","mailFrom","rcptTo","subject","body","html","source","authSpf","authDkim","authDmarc","attachments"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Emails"],"summary":"Delete an email.","operationId":"api_emails_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/emails/{id}/attachments/{index}":{"get":{"tags":["Emails"],"summary":"Download an email attachment.","operationId":"api_emails_id_attachments_index_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/emails/{id}/attachments/{index}/view":{"get":{"tags":["Emails"],"summary":"View a decompressed email attachment.","operationId":"api_emails_id_attachments_index_view_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string"},"content":{"type":"string"}},"additionalProperties":false,"required":["filename","content"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains":{"get":{"tags":["Email Domains"],"summary":"List email domains in a project.","operationId":"api_email-domains_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"zone":{"type":"string"},"isPlatform":{"type":"boolean"},"providerConfigured":{"type":"boolean"},"providerVerified":{"type":"boolean"},"hourlyQuota":{"anyOf":[{"type":"integer"},{"type":"null"}]},"monthlyQuota":{"anyOf":[{"type":"integer"},{"type":"null"}]},"canvasX":{"type":"number"},"canvasY":{"type":"number"},"canvasGroupId":{"type":"string"},"inboxCount":{"type":"integer"},"sentToday":{"type":"integer"}},"additionalProperties":false,"required":["id","domain","zone","isPlatform","providerConfigured","providerVerified","hourlyQuota","monthlyQuota","inboxCount","sentToday"]}}},"additionalProperties":false,"required":["domains"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/all-outbound":{"get":{"tags":["Email Domains"],"summary":"List every email domain across all projects (admin only).","description":"Drives the cluster-wide outbound-domains admin page. Returns every email_domain (including the platform domain) with its current outbound-account binding, quotas, project owner, and current hour / 30-day usage counts. The platform domain is flagged via `isPlatform=true` and sorted to the top.","operationId":"api_email-domains_all-outbound_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"zone":{"type":"string"},"isPlatform":{"type":"boolean"},"projectId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Owning project of the domain's zone. Null for the platform domain when its zone belongs to no project."},"projectName":{"anyOf":[{"type":"string"},{"type":"null"}]},"outboundAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerVerified":{"type":"boolean"},"hourlyQuota":{"anyOf":[{"type":"integer"},{"type":"null"}]},"monthlyQuota":{"anyOf":[{"type":"integer"},{"type":"null"}]},"hourUsage":{"type":"integer"},"monthUsage":{"type":"integer"}},"additionalProperties":false,"required":["id","domain","zone","isPlatform","projectId","projectName","outboundAccountId","providerVerified","hourlyQuota","monthlyQuota","hourUsage","monthUsage"]}},"outboundAccountsAvailable":{"type":"integer","description":"Number of outbound accounts configured cluster-wide. Zero disables the assign dropdowns and links to Cluster Settings → Account Credentials."}},"additionalProperties":false,"required":["domains","outboundAccountsAvailable"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/outbound":{"post":{"tags":["Email Domains"],"summary":"Assign an outbound account to an email domain (admin only).","description":"Registers the email_domain with the chosen outbound account's provider so the domain's senders can deliver external mail. Pass `accountId` in the body; the FK to `accounts(id)` is recorded on the email_domain row. Re-assigning to a different account re-registers the domain at the new provider after tearing it down at the old.","operationId":"api_email-domains_id_outbound_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","description":"ID of an outbound account (accounts.kind='outbound'). Currently supported types: mailgun, mailjet, brevo, resend, lettermint, scaleway-tem, self-hosted."}},"additionalProperties":false,"required":["accountId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"verified":{"type":"boolean"}},"additionalProperties":false,"required":["verified"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Email Domains"],"summary":"Disable outbound sending on an email domain (admin only).","description":"Best-effort teardown at the assigned outbound account's provider followed by clearing the local binding and DNS-record cache. Inbound delivery and quotas are preserved.","operationId":"api_email-domains_id_outbound_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/quotas":{"put":{"tags":["Email Domains"],"summary":"Set outbound rate-limit quotas on an email domain (admin only).","description":"Hourly and monthly caps for external sends from this email_domain. Pass null on either field to clear that cap. Quotas persist across enable/disable cycles.","operationId":"api_email-domains_id_quotas_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hourlyQuota":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"monthlyQuota":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}},"additionalProperties":false,"required":["hourlyQuota","monthlyQuota"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes":{"get":{"tags":["Email Domains"],"summary":"List inboxes on an email domain.","operationId":"api_email-domains_id_inboxes_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"inboxes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"localPart":{"type":"string"},"address":{"type":"string"},"kind":{"type":"string"},"grantees":{"type":"array","items":{"type":"string"}},"appPasswordCount":{"type":"integer"},"ticketQueueProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"outboundInsights":{"type":"boolean","description":"Mail sent from this inbox over SMTP is checked and can be previewed by project members."}},"additionalProperties":false,"required":["id","localPart","address","kind","grantees","appPasswordCount","outboundInsights"]}}},"additionalProperties":false,"required":["inboxes"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Email Domains"],"summary":"Create a new inbox or mailing list.","operationId":"api_email-domains_id_inboxes_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"localPart":{"type":"string","pattern":"^[a-z0-9]([a-z0-9._-]*[a-z0-9])?$"},"kind":{"type":"string","enum":["mailbox","mailing_list"]},"replyToTarget":{"type":"string","enum":["list","sender"]}},"additionalProperties":false,"required":["localPart","kind"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}":{"delete":{"tags":["Email Domains"],"summary":"Delete an inbox (and its mail).","operationId":"api_email-domains_id_inboxes_inboxId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/grants":{"post":{"tags":["Email Domains"],"summary":"Grant a user access to an inbox.","operationId":"api_email-domains_id_inboxes_inboxId_grants_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"}},"additionalProperties":false,"required":["username"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/grants/{username}":{"delete":{"tags":["Email Domains"],"summary":"Revoke a user's access to an inbox.","operationId":"api_email-domains_id_inboxes_inboxId_grants_username_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}},{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/app-passwords":{"get":{"tags":["Email Domains"],"summary":"List an inbox's integration passwords (metadata only). Grantees' own passwords are not listed.","operationId":"api_email-domains_id_inboxes_inboxId_app-passwords_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"appPasswords":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","label","createdAt"]}}},"additionalProperties":false,"required":["appPasswords"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Email Domains"],"summary":"Create an integration password for an inbox (no user; the password is the grant). Plaintext returned ONCE.","operationId":"api_email-domains_id_inboxes_inboxId_app-passwords_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":100}},"additionalProperties":false,"required":["label"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"password":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","label","password","createdAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/app-passwords/{passwordId}":{"delete":{"tags":["Email Domains"],"summary":"Revoke an inbox's integration password.","operationId":"api_email-domains_id_inboxes_inboxId_app-passwords_passwordId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}},{"name":"passwordId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/mailing-list":{"get":{"tags":["Email Domains"],"summary":"Get mailing list configuration.","operationId":"api_email-domains_id_inboxes_inboxId_mailing-list_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"replyToTarget":{"type":"string"},"recipients":{"type":"array","items":{"type":"string"}},"unsubscribed":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"unsubscribedAt":{"type":"string"}},"additionalProperties":false,"required":["address","unsubscribedAt"]}},"allowedSenders":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["replyToTarget","recipients","unsubscribed","allowedSenders"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Email Domains"],"summary":"Update mailing list configuration.","operationId":"api_email-domains_id_inboxes_inboxId_mailing-list_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"replyToTarget":{"type":"string","enum":["list","sender"]}},"additionalProperties":false,"required":["replyToTarget"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/mailing-list/recipients":{"post":{"tags":["Email Domains"],"summary":"Add a recipient to a mailing list.","operationId":"api_email-domains_id_inboxes_inboxId_mailing-list_recipients_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"resubscribe":{"type":"boolean","description":"Required to add back an address that unsubscribed itself: the person opted out, so adding them again needs their consent."}},"additionalProperties":false,"required":["address"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/mailing-list/recipients/{address}":{"delete":{"tags":["Email Domains"],"summary":"Remove a recipient from a mailing list.","operationId":"api_email-domains_id_inboxes_inboxId_mailing-list_recipients_address_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}},{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/mailing-list/allowed-senders":{"post":{"tags":["Email Domains"],"summary":"Add an allowed sender to a mailing list.","operationId":"api_email-domains_id_inboxes_inboxId_mailing-list_allowed-senders_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"}},"additionalProperties":false,"required":["address"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/mailing-list/allowed-senders/{address}":{"delete":{"tags":["Email Domains"],"summary":"Remove an allowed sender from a mailing list.","operationId":"api_email-domains_id_inboxes_inboxId_mailing-list_allowed-senders_address_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}},{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/mailing-list/sent":{"get":{"tags":["Email Domains"],"summary":"List the fan-out copies this mailing list has sent.","operationId":"api_email-domains_id_inboxes_inboxId_mailing-list_sent_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sender":{"type":"string"},"recipients":{"type":"array","items":{"type":"string"}},"delivery":{"type":"string","enum":["internal","external"]},"state":{"type":"string","enum":["pending","sent","failed"]},"attempts":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"providerEvents":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"source":{"type":"string"},"event":{"type":"string"},"classified":{"type":"string"},"recipient":{"type":"string"},"eventId":{"type":"string"},"diagnostic":{"type":"string"},"raw":{}},"additionalProperties":false,"required":["at","source","event","raw"]}}},"additionalProperties":false,"required":["id","sender","recipients","delivery","state","attempts","createdAt"]}},"total":{"type":"integer"}},"additionalProperties":false,"required":["rows","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/mailing-list/received":{"get":{"tags":["Email Domains"],"summary":"List the posts this mailing list has received.","operationId":"api_email-domains_id_inboxes_inboxId_mailing-list_received_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"receivedAt":{"type":"string","format":"date-time"},"mailFrom":{"type":"string"},"subject":{"type":"string"},"source":{"type":"string"}},"additionalProperties":false,"required":["id","receivedAt","mailFrom","subject","source"]}},"total":{"type":"integer"}},"additionalProperties":false,"required":["emails","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/mailing-list/received/{messageId}":{"get":{"tags":["Email Domains"],"summary":"Read one post a mailing list received.","operationId":"api_email-domains_id_inboxes_inboxId_mailing-list_received_messageId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"receivedAt":{"type":"string","format":"date-time"},"mailFrom":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"html":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"filename":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"}},"additionalProperties":false,"required":["index","filename","contentType","size"]}}},"additionalProperties":false,"required":["id","receivedAt","mailFrom","subject","body","html","attachments"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/sieve":{"get":{"tags":["Email Domains"],"summary":"Get an inbox's Sieve filter script.","operationId":"api_email-domains_id_inboxes_inboxId_sieve_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"script":{"type":"string"}},"additionalProperties":false,"required":["script"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Email Domains"],"summary":"Set an inbox's Sieve filter script.","operationId":"api_email-domains_id_inboxes_inboxId_sieve_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"script":{"type":"string"}},"additionalProperties":false,"required":["script"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/email-domains/{id}/inboxes/{inboxId}/outbound-insights":{"put":{"tags":["Email Domains"],"summary":"Turn outbound insights on or off for an inbox.","operationId":"api_email-domains_id_inboxes_inboxId_outbound-insights_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"inboxId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false,"required":["enabled"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/mail-receive-log":{"get":{"tags":["Emails"],"summary":"List SMTP transactions the mail receiver handled.","operationId":"api_mail-receive-log_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","enum":["mine","cluster"]}},{"name":"address","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"receivedAt":{"type":"string","format":"date-time"},"listener":{"type":"string","enum":["inbound","submission","relay"]},"status":{"type":"string","enum":["accepted","rejected","refused","abandoned"]},"reply":{"type":"string"},"clientIp":{"type":"string"},"helo":{"type":"string"},"tlsVersion":{"type":"string"},"tlsGroup":{"type":"string"},"keyExchange":{"type":"string","enum":["post-quantum","classical","none","unknown"]},"authenticatedAs":{"type":"string"},"mailFrom":{"type":"string"},"headerFrom":{"type":"string"},"subject":{"type":"string"},"messageId":{"type":"string"},"sizeBytes":{"type":"integer"},"authSpf":{"type":"string"},"authDkim":{"type":"string"},"authDmarc":{"type":"string"},"recipients":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"inboxId":{"type":"string"},"outcome":{"type":"string"},"actions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"folder":{"type":"string"},"address":{"type":"string"},"ok":{"type":"boolean"},"error":{"type":"string"},"reason":{"type":"string"},"internal":{"type":"integer"},"external":{"type":"integer"},"skipped":{"type":"string"}},"additionalProperties":false,"required":["kind"]}},"detail":{"type":"string"}},"additionalProperties":false,"required":["address","outcome","actions"]}}},"additionalProperties":false,"required":["id","receivedAt","listener","status","keyExchange","mailFrom","recipients"]}},"total":{"type":"integer"}},"additionalProperties":false,"required":["rows","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/mail-receive-log/key-exchange":{"get":{"tags":["Emails"],"summary":"Count the last day's SMTP sessions by key exchange.","operationId":"api_mail-receive-log_key-exchange_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"inbound":{"type":"object","properties":{"post-quantum":{"type":"integer"},"classical":{"type":"integer"},"none":{"type":"integer"},"unknown":{"type":"integer"}},"additionalProperties":false,"required":["post-quantum","classical","none","unknown"]},"submission":{"type":"object","properties":{"post-quantum":{"type":"integer"},"classical":{"type":"integer"},"none":{"type":"integer"},"unknown":{"type":"integer"}},"additionalProperties":false,"required":["post-quantum","classical","none","unknown"]},"outbound":{"type":"object","properties":{"post-quantum":{"type":"integer"},"classical":{"type":"integer"},"none":{"type":"integer"},"unknown":{"type":"integer"}},"additionalProperties":false,"required":["post-quantum","classical","none","unknown"]}},"additionalProperties":false,"required":["inbound","submission","outbound"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/outbound-queue":{"get":{"tags":["Outbound Mail"],"summary":"List outbound mail queue entries for a project.","operationId":"api_outbound-queue_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}},{"name":"domain","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sender":{"type":"string"},"recipients":{"type":"array","items":{"type":"string"}},"delivery":{"type":"string","enum":["internal","external"]},"state":{"type":"string","enum":["pending","sent","failed"]},"attempts":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"nextAttemptAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"mailingListInboxId":{"type":"string"},"providerEvents":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"source":{"type":"string"},"event":{"type":"string"},"classified":{"type":"string"},"recipient":{"type":"string"},"eventId":{"type":"string"},"diagnostic":{"type":"string"},"raw":{}},"additionalProperties":false,"required":["at","source","event","raw"]}},"lint":{"type":"object","properties":{"v":{"type":"integer"},"findings":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["rule"]}},"error":{"type":"string","description":"Set when the message could not be checked."}},"additionalProperties":false,"required":["v","findings"]},"previewable":{"type":"boolean"}},"additionalProperties":false,"required":["id","sender","recipients","delivery","state","attempts","createdAt","nextAttemptAt","previewable"]}},"total":{"type":"integer"}},"additionalProperties":false,"required":["rows","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/outbound-queue/cluster":{"get":{"tags":["Outbound Mail"],"summary":"Admin-only cluster-wide outbound mail log. Used by Cluster → Email → Activity.","operationId":"api_outbound-queue_cluster_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"state","in":"query","required":false,"schema":{"type":"string","enum":["pending","sent","failed"]}},{"name":"delivery","in":"query","required":false,"schema":{"type":"string","enum":["internal","external"]}},{"name":"sender","in":"query","description":"Case-insensitive substring match on the envelope sender.","required":false,"schema":{"type":"string","description":"Case-insensitive substring match on the envelope sender."}},{"name":"recipient","in":"query","description":"Case-insensitive substring match on any envelope recipient.","required":false,"schema":{"type":"string","description":"Case-insensitive substring match on any envelope recipient."}},{"name":"projectId","in":"query","required":false,"schema":{"type":"string"}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sender":{"type":"string"},"recipients":{"type":"array","items":{"type":"string"}},"delivery":{"type":"string","enum":["internal","external"]},"state":{"type":"string","enum":["pending","sent","failed"]},"attempts":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"accountId":{"type":"string"},"accountType":{"type":"string"},"accountName":{"type":"string"},"mailingListInboxId":{"type":"string"},"deliveryLog":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string","enum":["smtp","http"]},"relayId":{"type":"string"},"recipient":{"type":"string"},"outcome":{"type":"string","enum":["accepted","deferred","rejected","no_relay"]},"mxHost":{"type":"string"},"sourceIpv4":{"type":"string"},"sourceIpv6":{"type":"string"},"smtpCode":{"type":"integer"},"smtpResponse":{"type":"string"},"tls":{"type":"string","enum":["verified","opportunistic","none"]},"tlsVersion":{"type":"string"},"tlsGroup":{"type":"string"},"keyExchange":{"type":"string","enum":["post-quantum","classical","none","unknown"]},"stage":{"type":"string"},"error":{"type":"string"},"provider":{"type":"string"},"method":{"type":"string"},"url":{"type":"string"},"status":{"type":"integer"},"durationMs":{"type":"integer"},"response":{"type":"string"}},"additionalProperties":false,"required":["at","outcome"]}},"providerEvents":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"source":{"type":"string"},"event":{"type":"string"},"classified":{"type":"string"},"recipient":{"type":"string"},"eventId":{"type":"string"},"diagnostic":{"type":"string"},"raw":{},"rawBounceKey":{"type":"string"}},"additionalProperties":false,"required":["at","source","event","raw"]}}},"additionalProperties":false,"required":["id","sender","recipients","delivery","state","attempts","createdAt"]}},"total":{"type":"integer"}},"additionalProperties":false,"required":["rows","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/outbound-queue/{id}/preview":{"get":{"tags":["Outbound Mail"],"summary":"Preview an outbound message a service sent, or one from an inbox with outbound insights on.","operationId":"api_outbound-queue_id_preview_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sender":{"type":"string"},"recipients":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"body":{"type":"string"},"html":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"filename":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"}},"additionalProperties":false,"required":["index","filename","contentType","size"]}}},"additionalProperties":false,"required":["id","sender","recipients","subject","body","html","attachments"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/outbound-queue/{id}/attachments/{index}":{"get":{"tags":["Outbound Mail"],"summary":"Download an attachment from a service-relayed outbound message.","operationId":"api_outbound-queue_id_attachments_index_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/outbound-queue/{id}/bounce/{index}":{"get":{"tags":["Outbound Mail"],"summary":"Download the raw bounce message behind a self-hosted DSN event.","operationId":"api_outbound-queue_id_bounce_index_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/suppressions":{"get":{"tags":["Suppressions"],"summary":"List platform-wide outbound suppressions (admin only).","operationId":"api_suppressions_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"search","in":"query","description":"Case-insensitive substring match against the address. Empty = no filter.","required":false,"schema":{"type":"string","description":"Case-insensitive substring match against the address. Empty = no filter."}},{"name":"reason","in":"query","required":false,"schema":{"type":"string","enum":["hard_bounce","complaint","unsubscribe","manual"]}},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["mailgun","mailjet","brevo","resend","lettermint","scaleway","self_hosted","manual"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"reason":{"type":"string","enum":["hard_bounce","complaint","unsubscribe","manual"]},"source":{"type":"string","enum":["mailgun","mailjet","brevo","resend","lettermint","scaleway","self_hosted","manual"]},"providerEventId":{"type":"string"},"providerMessageId":{"type":"string"},"diagnostic":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["address","reason","source","createdAt"]}},"total":{"type":"integer"}},"additionalProperties":false,"required":["rows","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Suppressions"],"summary":"Manually add an address to the suppression list (admin only).","description":"Useful when you know an address is bad before a provider webhook confirms it. Stored with source='manual'. UPSERT — re-adding an existing address refreshes the diagnostic.","operationId":"api_suppressions_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"reason":{"type":"string","enum":["hard_bounce","complaint","unsubscribe","manual"]},"diagnostic":{"type":"string"}},"additionalProperties":false,"required":["address","reason"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"}},"additionalProperties":false,"required":["address"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/suppressions/{address}":{"delete":{"tags":["Suppressions"],"summary":"Remove an address from the platform suppression list (admin only).","description":"Lets the outbound worker attempt delivery to the address again. Also calls every configured outbound account's API to clear the address from its own suppression list (Mailgun, Brevo) — Mailjet, Resend, and Scaleway TEM have no public API for this, so their dashboards must be used separately. Provider-side failures are non-fatal: the local row is removed regardless.","operationId":"api_suppressions_address_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"providerCleared":{"type":"boolean"}},"additionalProperties":false,"required":["providerCleared"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/mailboxes":{"get":{"tags":["Mailboxes"],"summary":"List user mailboxes.","operationId":"api_mailboxes_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"fullAddress":{"type":"string"},"pgpKey":{"type":"string","enum":["none","published","uploader-left"]}},"additionalProperties":false,"required":["id","address","fullAddress","pgpKey"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/mailboxes/{id}/app-passwords":{"get":{"tags":["Mailboxes"],"summary":"List your own app passwords for an inbox (metadata only).","operationId":"api_mailboxes_id_app-passwords_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"appPasswords":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","label","createdAt"]}}},"additionalProperties":false,"required":["address","appPasswords"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Mailboxes"],"summary":"Generate your own app password for an inbox. Plaintext returned ONCE.","operationId":"api_mailboxes_id_app-passwords_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":100}},"additionalProperties":false,"required":["label"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"password":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","label","password","createdAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/mailboxes/{id}/app-passwords/{passwordId}":{"delete":{"tags":["Mailboxes"],"summary":"Revoke one of your own app passwords for an inbox.","operationId":"api_mailboxes_id_app-passwords_passwordId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"passwordId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/mailboxes/{id}/pgp-key":{"get":{"tags":["Mailboxes"],"summary":"The OpenPGP key an inbox publishes in its Web Key Directory.","operationId":"api_mailboxes_id_pgp-key_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"unavailable":{"type":["string","null"]},"key":{"type":["object","null"],"properties":{"fingerprint":{"type":"string"},"version":{"type":"integer"},"postQuantum":{"type":"boolean"},"uploadedBy":{"type":"string"},"uploadedAt":{"type":"string"},"uploaderHasAccess":{"type":"boolean"}},"additionalProperties":false,"required":["fingerprint","version","postQuantum","uploadedBy","uploadedAt","uploaderHasAccess"]},"url":{"type":["string","null"]}},"additionalProperties":false,"required":["address","unavailable","key","url"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Mailboxes"],"summary":"Publish an OpenPGP public key for an inbox.","operationId":"api_mailboxes_id_pgp-key_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fingerprint":{"type":"string"},"version":{"type":"integer"},"binary":{"type":"string","description":"Base64 of the binary public key."}},"additionalProperties":false,"required":["fingerprint","version","binary"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"object","properties":{"fingerprint":{"type":"string"},"version":{"type":"integer"},"postQuantum":{"type":"boolean"},"uploadedBy":{"type":"string"},"uploadedAt":{"type":"string"},"uploaderHasAccess":{"type":"boolean"}},"additionalProperties":false,"required":["fingerprint","version","postQuantum","uploadedBy","uploadedAt","uploaderHasAccess"]}},"additionalProperties":false,"required":["key"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Mailboxes"],"summary":"Stop publishing an inbox's OpenPGP key.","operationId":"api_mailboxes_id_pgp-key_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/mailboxes/{id}/share-links":{"get":{"tags":["Mailboxes"],"summary":"List your own share links for an inbox (metadata only).","operationId":"api_mailboxes_id_share-links_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","label","createdAt","expiresAt"]}}},"additionalProperties":false,"required":["links"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Mailboxes"],"summary":"Create a link that opens an inbox read-only for someone without an account. The token is returned ONCE.","operationId":"api_mailboxes_id_share-links_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":100},"expiresInDays":{"type":"integer","minimum":1}},"additionalProperties":false,"required":["label","expiresInDays"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","label","token","createdAt","expiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/mailboxes/{id}/share-links/{linkId}":{"delete":{"tags":["Mailboxes"],"summary":"Revoke one of your own share links for an inbox.","operationId":"api_mailboxes_id_share-links_linkId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/inbox-share":{"get":{"tags":["Mailboxes"],"summary":"Describe the inbox a share link opens.","operationId":"api_inbox-share_get","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"sharedBy":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["address","sharedBy","expiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ticket-shares/mine":{"get":{"tags":["Tickets"],"summary":"Tickets other people shared with you.","operationId":"api_ticket-shares_mine_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"shareId":{"type":"string"},"ticketId":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string"},"projectName":{"type":"string"},"sharedBy":{"type":"string"},"sharedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["shareId","ticketId","number","subject","status","projectName","sharedBy","sharedAt","expiresAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ticket-shares/link":{"get":{"tags":["Tickets"],"summary":"The ticket a share link opens (token in x-ticket-share-token).","operationId":"api_ticket-shares_link_get","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"share":{"type":"object","properties":{"shareId":{"type":"string"},"kind":{"type":"string","enum":["user","link"]},"projectName":{"type":"string"},"sharedBy":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["shareId","kind","projectName","sharedBy","expiresAt"]},"ticket":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"assignees":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"lastActivityAt":{"type":"string"},"closedAt":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"side":{"type":"string","enum":["own","delivers","receives"]},"ticketProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"homeProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"address":{"type":"string"},"emailDomainId":{"type":"string"},"defaultAssignees":{"type":"array","items":{"type":"string"}},"canReply":{"type":"boolean"},"openTickets":{"type":"integer"},"firstResponseMinutes":{"type":"integer"},"resolutionHours":{"type":"integer"},"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hourlyLimit":{"type":"integer"}},"additionalProperties":false,"required":["id","name","hourlyLimit"]}}},"additionalProperties":false,"required":["id","name","side","ticketProject","homeProject","defaultAssignees","canReply","openTickets","services"]},"participants":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"role":{"type":"string","enum":["customer","cc"]},"addedAt":{"type":"string"},"addedBy":{"type":"string"}},"additionalProperties":false,"required":["address","role","addedAt"]}},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"severity":{"type":"string"},"linkedAt":{"type":"string"},"statusUrl":{"type":"string"}},"additionalProperties":false,"required":["id","title","status","severity","linkedAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"at":{"type":"string"},"actor":{"type":"string"},"held":{"type":"boolean"},"fromAddress":{"type":"string"},"fromName":{"type":"string"},"toAddresses":{"type":"array","items":{"type":"string"}},"ccAddresses":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"bodyText":{"type":"string"},"shared":{"type":"object","properties":{"recipient":{"type":"string"},"label":{"type":"string"}},"additionalProperties":false},"hasRaw":{"type":"boolean"},"service":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"context":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["key","value"]}},"automatic":{"type":"boolean"},"auth":{"type":"object","properties":{"spf":{"type":"string"},"dkim":{"type":"string"},"dmarc":{"type":"string"}},"additionalProperties":false,"required":["spf","dkim","dmarc"]},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"}},"additionalProperties":false,"required":["filename","contentType","size"]}},"from":{"type":"string"},"to":{"type":"string"},"added":{"type":"array","items":{"type":"string"}},"removed":{"type":"array","items":{"type":"string"}},"address":{"type":"string"},"role":{"type":"string"},"change":{"type":"string"},"until":{"type":"string"},"environment":{"type":"string"},"list":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"from":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"incidentId":{"type":"string"},"incidentTitle":{"type":"string"},"via":{"type":"string"},"fix":{"type":"object","properties":{"repo":{"type":"string"},"number":{"type":"integer"},"sha":{"type":"string"},"pull":{"type":"integer"},"service":{"type":"string"},"revision":{"type":"string"}},"additionalProperties":false,"required":["repo","number","sha","service","revision"]},"related":{"type":"object","properties":{"ticketId":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"reason":{"type":"string"},"in":{"type":"string"}},"additionalProperties":false,"required":["ticketId","number","subject"]},"parent":{"type":"object","properties":{"to":{"type":"object","properties":{"ticketId":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"}},"additionalProperties":false,"required":["ticketId","number","subject"]},"from":{"type":"object","properties":{"ticketId":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"}},"additionalProperties":false,"required":["ticketId","number","subject"]}},"additionalProperties":false},"merge":{"type":"object","properties":{"direction":{"type":"string"},"ticketId":{"type":"string"},"number":{"type":"integer"},"added":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["direction"]},"forgejo":{"type":"object","properties":{"type":{"type":"string"},"repo":{"type":"string"},"number":{"type":"integer"},"url":{"type":"string"},"by":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"state":{"type":"string"},"action":{"type":"string"},"verdict":{"type":"string"},"isPull":{"type":"boolean"},"issue":{"type":"integer"},"created":{"type":"boolean"}},"additionalProperties":false,"required":["type","repo","number","url"]},"note":{"type":"string"},"imported":{"type":"object","properties":{"source":{"type":"string"},"author":{"type":"string"}},"additionalProperties":false,"required":["source"]},"digest":{"type":"object","properties":{"gist":{"type":"string"},"translation":{"type":"string"},"effects":{"type":"array","items":{"type":"string","enum":["new_request","more_info","answers_us","still_broken","works_now","thanks","asks_update","unhappy","new_topic"]}},"asks":{"type":"array","items":{"type":"string"}},"language":{"type":"string"}},"additionalProperties":false,"required":["gist","translation","effects","asks","language"]},"assistant":{"type":"object","properties":{"trigger":{"type":"string","enum":["analysis","mention","rewrite"]},"actions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["priority","labels","incident","ticket","issue","issue_created","draft","description","failed"]},"priority":{"type":"string"},"added":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"title":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"ref":{"type":"string"},"url":{"type":"string"},"isPull":{"type":"boolean"},"eventId":{"type":"string"},"what":{"type":"string"},"error":{"type":"string"}},"additionalProperties":false,"required":["kind"]}},"services":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["trigger","actions","services"]},"draft":{"type":"object","properties":{"state":{"type":"string","enum":["pending","sending","sent","denied"]},"warnings":{"type":"array","items":{"type":"string"}},"decidedBy":{"type":"string"},"decidedAt":{"type":"string"},"reason":{"type":"string"},"editedBy":{"type":"string"},"replyEventId":{"type":"string"},"nextStatus":{"type":"string","enum":["open","waiting","resolved"]},"nextStatusReason":{"type":"string"}},"additionalProperties":false,"required":["state","warnings"]},"translation":{"type":"object","properties":{"translation":{"type":"string"},"language":{"type":"string"}},"additionalProperties":false,"required":["translation","language"]},"delivery":{"type":"object","properties":{"state":{"type":"string"},"attempts":{"type":"integer"},"lastError":{"type":"string"},"completedAt":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"event":{"type":"string"},"recipient":{"type":"string"},"diagnostic":{"type":"string"}},"additionalProperties":false,"required":["at","event"]}}},"additionalProperties":false,"required":["state","attempts","events"]}},"additionalProperties":false,"required":["id","kind","at","held","toAddresses","ccAddresses","hasRaw"]}},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"related":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"linkedBy":{"type":"string"},"reason":{"type":"string"},"linkedAt":{"type":"string"}},"additionalProperties":false,"required":["id","number","subject","status","linkedAt"]}},"snoozedUntil":{"type":"string"},"firstResponseDueAt":{"type":"string"},"resolutionDueAt":{"type":"string"},"replyOwed":{"type":"boolean"},"hasCustomer":{"type":"boolean"},"delivery":{"type":"array","items":{"type":"object","properties":{"environment":{"type":"string","enum":["development","staging","production"]},"state":{"type":"string","enum":["none","partial","reached","unknown"]},"servicesWithFix":{"type":"integer"},"servicesTotal":{"type":"integer"},"reachedAt":{"type":"string"}},"additionalProperties":false,"required":["environment","state","servicesWithFix","servicesTotal"]}},"lists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"}},"additionalProperties":false,"required":["id","name","archived"]}},"description":{"type":"string"},"descriptionUpdatedAt":{"type":"string"},"descriptionUpdatedBy":{"type":"string"},"parent":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]}},"additionalProperties":false,"required":["id","number","subject","status"]},"subtasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"assignees":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","number","subject","status","assignees"]}},"lastReadAt":{"type":"string"},"ai":{"type":"object","properties":{"enabled":{"type":"boolean"},"available":{"type":"boolean"},"teamLanguage":{"type":"string"},"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trigger":{"type":"string","enum":["analysis","mention","rewrite"]},"sourceEventId":{"type":"string"},"requestedBy":{"type":"string"},"status":{"type":"string","enum":["pending","running","done","failed"]},"attempts":{"type":"integer"},"error":{"type":"string"},"createdAt":{"type":"string"},"startedAt":{"type":"string"}},"additionalProperties":false,"required":["id","trigger","status","attempts","createdAt"]}}},"additionalProperties":false,"required":["enabled","available","teamLanguage","jobs"]},"issues":{"type":"array","items":{"type":"object","properties":{"repo":{"type":"string"},"number":{"type":"integer"},"title":{"type":"string"},"url":{"type":"string"},"isPull":{"type":"boolean"},"state":{"type":"string"},"createdHere":{"type":"boolean"},"linkedAt":{"type":"string"},"linkedBy":{"type":"string"}},"additionalProperties":false,"required":["repo","number","title","url","isPull","state","createdHere","linkedAt"]}},"forgejo":{"type":"object","properties":{"connected":{"type":"boolean"},"defaultRepo":{"type":"string"}},"additionalProperties":false,"required":["connected"]}},"additionalProperties":false,"required":["id","number","subject","status","assignees","createdAt","lastActivityAt","participants","incidents","events","priority","labels","related","replyOwed","hasCustomer","delivery","lists","description","subtasks","ai","issues","forgejo"]}},"additionalProperties":false,"required":["share","ticket"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ticket-shares/view/{shareId}":{"get":{"tags":["Tickets"],"summary":"A ticket shared with you, read-only.","operationId":"api_ticket-shares_view_shareId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"shareId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"share":{"type":"object","properties":{"shareId":{"type":"string"},"kind":{"type":"string","enum":["user","link"]},"projectName":{"type":"string"},"sharedBy":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["shareId","kind","projectName","sharedBy","expiresAt"]},"ticket":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"assignees":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"lastActivityAt":{"type":"string"},"closedAt":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"side":{"type":"string","enum":["own","delivers","receives"]},"ticketProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"homeProject":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"address":{"type":"string"},"emailDomainId":{"type":"string"},"defaultAssignees":{"type":"array","items":{"type":"string"}},"canReply":{"type":"boolean"},"openTickets":{"type":"integer"},"firstResponseMinutes":{"type":"integer"},"resolutionHours":{"type":"integer"},"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hourlyLimit":{"type":"integer"}},"additionalProperties":false,"required":["id","name","hourlyLimit"]}}},"additionalProperties":false,"required":["id","name","side","ticketProject","homeProject","defaultAssignees","canReply","openTickets","services"]},"participants":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"role":{"type":"string","enum":["customer","cc"]},"addedAt":{"type":"string"},"addedBy":{"type":"string"}},"additionalProperties":false,"required":["address","role","addedAt"]}},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"severity":{"type":"string"},"linkedAt":{"type":"string"},"statusUrl":{"type":"string"}},"additionalProperties":false,"required":["id","title","status","severity","linkedAt"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"at":{"type":"string"},"actor":{"type":"string"},"held":{"type":"boolean"},"fromAddress":{"type":"string"},"fromName":{"type":"string"},"toAddresses":{"type":"array","items":{"type":"string"}},"ccAddresses":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"bodyText":{"type":"string"},"shared":{"type":"object","properties":{"recipient":{"type":"string"},"label":{"type":"string"}},"additionalProperties":false},"hasRaw":{"type":"boolean"},"service":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"context":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["key","value"]}},"automatic":{"type":"boolean"},"auth":{"type":"object","properties":{"spf":{"type":"string"},"dkim":{"type":"string"},"dmarc":{"type":"string"}},"additionalProperties":false,"required":["spf","dkim","dmarc"]},"attachments":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"}},"additionalProperties":false,"required":["filename","contentType","size"]}},"from":{"type":"string"},"to":{"type":"string"},"added":{"type":"array","items":{"type":"string"}},"removed":{"type":"array","items":{"type":"string"}},"address":{"type":"string"},"role":{"type":"string"},"change":{"type":"string"},"until":{"type":"string"},"environment":{"type":"string"},"list":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"from":{"type":"string"}},"additionalProperties":false,"required":["id","name"]},"incidentId":{"type":"string"},"incidentTitle":{"type":"string"},"via":{"type":"string"},"fix":{"type":"object","properties":{"repo":{"type":"string"},"number":{"type":"integer"},"sha":{"type":"string"},"pull":{"type":"integer"},"service":{"type":"string"},"revision":{"type":"string"}},"additionalProperties":false,"required":["repo","number","sha","service","revision"]},"related":{"type":"object","properties":{"ticketId":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"reason":{"type":"string"},"in":{"type":"string"}},"additionalProperties":false,"required":["ticketId","number","subject"]},"parent":{"type":"object","properties":{"to":{"type":"object","properties":{"ticketId":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"}},"additionalProperties":false,"required":["ticketId","number","subject"]},"from":{"type":"object","properties":{"ticketId":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"}},"additionalProperties":false,"required":["ticketId","number","subject"]}},"additionalProperties":false},"merge":{"type":"object","properties":{"direction":{"type":"string"},"ticketId":{"type":"string"},"number":{"type":"integer"},"added":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["direction"]},"forgejo":{"type":"object","properties":{"type":{"type":"string"},"repo":{"type":"string"},"number":{"type":"integer"},"url":{"type":"string"},"by":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"state":{"type":"string"},"action":{"type":"string"},"verdict":{"type":"string"},"isPull":{"type":"boolean"},"issue":{"type":"integer"},"created":{"type":"boolean"}},"additionalProperties":false,"required":["type","repo","number","url"]},"note":{"type":"string"},"imported":{"type":"object","properties":{"source":{"type":"string"},"author":{"type":"string"}},"additionalProperties":false,"required":["source"]},"digest":{"type":"object","properties":{"gist":{"type":"string"},"translation":{"type":"string"},"effects":{"type":"array","items":{"type":"string","enum":["new_request","more_info","answers_us","still_broken","works_now","thanks","asks_update","unhappy","new_topic"]}},"asks":{"type":"array","items":{"type":"string"}},"language":{"type":"string"}},"additionalProperties":false,"required":["gist","translation","effects","asks","language"]},"assistant":{"type":"object","properties":{"trigger":{"type":"string","enum":["analysis","mention","rewrite"]},"actions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["priority","labels","incident","ticket","issue","issue_created","draft","description","failed"]},"priority":{"type":"string"},"added":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"title":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"ref":{"type":"string"},"url":{"type":"string"},"isPull":{"type":"boolean"},"eventId":{"type":"string"},"what":{"type":"string"},"error":{"type":"string"}},"additionalProperties":false,"required":["kind"]}},"services":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["trigger","actions","services"]},"draft":{"type":"object","properties":{"state":{"type":"string","enum":["pending","sending","sent","denied"]},"warnings":{"type":"array","items":{"type":"string"}},"decidedBy":{"type":"string"},"decidedAt":{"type":"string"},"reason":{"type":"string"},"editedBy":{"type":"string"},"replyEventId":{"type":"string"},"nextStatus":{"type":"string","enum":["open","waiting","resolved"]},"nextStatusReason":{"type":"string"}},"additionalProperties":false,"required":["state","warnings"]},"translation":{"type":"object","properties":{"translation":{"type":"string"},"language":{"type":"string"}},"additionalProperties":false,"required":["translation","language"]},"delivery":{"type":"object","properties":{"state":{"type":"string"},"attempts":{"type":"integer"},"lastError":{"type":"string"},"completedAt":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"event":{"type":"string"},"recipient":{"type":"string"},"diagnostic":{"type":"string"}},"additionalProperties":false,"required":["at","event"]}}},"additionalProperties":false,"required":["state","attempts","events"]}},"additionalProperties":false,"required":["id","kind","at","held","toAddresses","ccAddresses","hasRaw"]}},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"labels":{"type":"array","items":{"type":"string"}},"related":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"linkedBy":{"type":"string"},"reason":{"type":"string"},"linkedAt":{"type":"string"}},"additionalProperties":false,"required":["id","number","subject","status","linkedAt"]}},"snoozedUntil":{"type":"string"},"firstResponseDueAt":{"type":"string"},"resolutionDueAt":{"type":"string"},"replyOwed":{"type":"boolean"},"hasCustomer":{"type":"boolean"},"delivery":{"type":"array","items":{"type":"object","properties":{"environment":{"type":"string","enum":["development","staging","production"]},"state":{"type":"string","enum":["none","partial","reached","unknown"]},"servicesWithFix":{"type":"integer"},"servicesTotal":{"type":"integer"},"reachedAt":{"type":"string"}},"additionalProperties":false,"required":["environment","state","servicesWithFix","servicesTotal"]}},"lists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"}},"additionalProperties":false,"required":["id","name","archived"]}},"description":{"type":"string"},"descriptionUpdatedAt":{"type":"string"},"descriptionUpdatedBy":{"type":"string"},"parent":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]}},"additionalProperties":false,"required":["id","number","subject","status"]},"subtasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]},"assignees":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","number","subject","status","assignees"]}},"lastReadAt":{"type":"string"},"ai":{"type":"object","properties":{"enabled":{"type":"boolean"},"available":{"type":"boolean"},"teamLanguage":{"type":"string"},"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trigger":{"type":"string","enum":["analysis","mention","rewrite"]},"sourceEventId":{"type":"string"},"requestedBy":{"type":"string"},"status":{"type":"string","enum":["pending","running","done","failed"]},"attempts":{"type":"integer"},"error":{"type":"string"},"createdAt":{"type":"string"},"startedAt":{"type":"string"}},"additionalProperties":false,"required":["id","trigger","status","attempts","createdAt"]}}},"additionalProperties":false,"required":["enabled","available","teamLanguage","jobs"]},"issues":{"type":"array","items":{"type":"object","properties":{"repo":{"type":"string"},"number":{"type":"integer"},"title":{"type":"string"},"url":{"type":"string"},"isPull":{"type":"boolean"},"state":{"type":"string"},"createdHere":{"type":"boolean"},"linkedAt":{"type":"string"},"linkedBy":{"type":"string"}},"additionalProperties":false,"required":["repo","number","title","url","isPull","state","createdHere","linkedAt"]}},"forgejo":{"type":"object","properties":{"connected":{"type":"boolean"},"defaultRepo":{"type":"string"}},"additionalProperties":false,"required":["connected"]}},"additionalProperties":false,"required":["id","number","subject","status","assignees","createdAt","lastActivityAt","participants","incidents","events","priority","labels","related","replyOwed","hasCustomer","delivery","lists","description","subtasks","ai","issues","forgejo"]}},"additionalProperties":false,"required":["share","ticket"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ticket-shares/view/{shareId}/events/{eventId}/raw":{"get":{"tags":["Tickets"],"summary":"Download a received message of a shared ticket (.eml).","operationId":"api_ticket-shares_view_shareId_events_eventId_raw_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"shareId","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ticket-shares/view/{shareId}/events/{eventId}/attachments/{index}/preview":{"get":{"tags":["Tickets"],"summary":"Show one image attachment of a shared ticket.","operationId":"api_ticket-shares_view_shareId_events_eventId_attachments_index_preview_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"shareId","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ticket-shares/view/{shareId}/events/{eventId}/attachments/{index}":{"get":{"tags":["Tickets"],"summary":"Download one attachment of a shared ticket.","operationId":"api_ticket-shares_view_shareId_events_eventId_attachments_index_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"shareId","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/mailing-lists/unsubscribe":{"post":{"tags":["Mailing Lists"],"summary":"One-click unsubscribe from a mailing list.","description":"RFC 8058 one-click unsubscribe handler. Mail clients POST here when the user clicks 'Unsubscribe' in their inbox; the per-recipient HMAC token in the URL authenticates the request without requiring the user to log in. The body is `List-Unsubscribe=One-Click` (multipart or form-encoded); its contents are not consulted, except that the confirmation page's button adds `source=page` to get an HTML reply. Answers 200 on a valid token even if the address was already removed (idempotent), 401 on an invalid one.","operationId":"api_mailing-lists_unsubscribe_post","security":[],"parameters":[{"name":"list","in":"query","required":true,"schema":{"type":"string"}},{"name":"addr","in":"query","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"get":{"tags":["Mailing Lists"],"summary":"Confirmation page for a mailing list unsubscribe link.","description":"Served when an unsubscribe link is opened in a browser. Shows a button that POSTs to the one-click handler; opening the page itself changes nothing, so link scanners cannot unsubscribe anyone.","operationId":"api_mailing-lists_unsubscribe_get","security":[],"parameters":[{"name":"list","in":"query","required":true,"schema":{"type":"string"}},{"name":"addr","in":"query","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/settings":{"get":{"tags":["Settings"],"summary":"Get user settings (avatar address, calendar URL, ntfy).","operationId":"api_settings_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"gravatarEmail":{"type":"string"},"gravatarHash":{"type":"string"},"calendarUrl":{"type":"string"},"teamCalendarUrl":{"type":"string"},"ntfy":{"type":"object","properties":{"url":{"type":"string"},"username":{"type":"string"},"topic":{"type":"string"},"password":{"type":"string"}},"additionalProperties":false,"required":["url","username","topic","password"]}},"additionalProperties":false,"required":["gravatarHash"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Settings"],"summary":"Set the logged-in user's avatar (Gravatar) address.","description":"Sets the address the user's avatar is looked up by on Gravatar. oneDeploy never sends mail to it — it only hashes it — and other users only ever see the hash. Omitting the field or passing an empty string clears it, which falls the avatar back to a generated robot derived from the username.","operationId":"api_settings_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"gravatarEmail":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"gravatarEmail":{"type":"string"},"gravatarHash":{"type":"string"}},"additionalProperties":false,"required":["gravatarHash"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/settings/test-notification":{"post":{"tags":["Settings"],"summary":"Send a test push notification to the current user.","operationId":"api_settings_test-notification_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/availability":{"get":{"tags":["Availability"],"summary":"List your out-of-office entries.","operationId":"api_availability_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"start":{"type":"integer"},"end":{"type":"integer"},"note":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"integer"}},"additionalProperties":false,"required":["id","username","start","end","note","createdBy","createdAt"]}}},"additionalProperties":false,"required":["entries"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Availability"],"summary":"Add an out-of-office entry for yourself (or, as admin, anyone).","operationId":"api_availability_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"note":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false,"required":["startDate","endDate"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/availability/{id}":{"delete":{"tags":["Availability"],"summary":"Delete an out-of-office entry.","operationId":"api_availability_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/oncall/offers":{"get":{"tags":["On-call"],"summary":"List outstanding on-call swap offers across your projects.","operationId":"api_oncall_offers_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"offers":{"type":"array","items":{"type":"object","properties":{"swapId":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"rotationName":{"type":"string"},"date":{"type":"integer"},"offeredBy":{"type":"string"},"auto":{"type":"boolean"}},"additionalProperties":false,"required":["swapId","projectId","projectName","rotationName","date","offeredBy","auto"]}}},"additionalProperties":false,"required":["offers"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/platform-settings":{"get":{"tags":["Settings"],"summary":"Get platform-domain settings.","operationId":"api_platform-settings_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"zone":{"type":"string"},"domain":{"type":"string"},"tunnelDomain":{"type":"string"},"previewDomain":{"type":"string"},"availableZones":{"type":"array","items":{"type":"string"}},"move":{"type":"object","properties":{"oldDomain":{"type":"string"},"since":{"type":"number"},"createdBy":{"type":"string"},"moved":{"type":"number"},"notMoved":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["oldDomain","since","createdBy","moved","notMoved"]}},"additionalProperties":false,"required":["availableZones"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Settings"],"summary":"Change the platform domain.","description":"Sets the platform domain: the dashboard host. A subdomain inside a configured DNS zone (a new apex is refused). Tunnels and PR previews are served from `tunnelDomain` / `previewDomain`, which must be siblings of it, outside its WebAuthn scope: omitted, the current ones are kept and must be safe for the new domain, and they are required when there are none yet. Omit `domain` to clear it (serves dashboard on IP cert only). When it replaces a domain, the current one stays up as a move page until retired, so users can carry their passkeys over (the RP ID changes). Clearing it deletes every passkey. Fans out via reloadGateways so every CP node refreshes its cache, rebuilds Envoy, restarts the email server, and reloads PowerDNS.","operationId":"api_platform-settings_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"The platform domain, e.g. `deploy.example.com` or `example.dev`. Must lie inside a configured DNS zone."},"tunnelDomain":{"type":"string","description":"Tunnel parent domain, e.g. `t.example.com`. Defaults to the current one."},"previewDomain":{"type":"string","description":"Preview parent domain, e.g. `preview.example.com`. Defaults to the current one."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/platform-settings/tunnel-preview":{"put":{"tags":["Settings"],"summary":"Set the tunnel and preview parent domains.","description":"Sets where tunnels (`*.<tunnelDomain>`) and PR previews (`*.<previewDomain>`) are served. A changed value must be inside the platform zone, outside the dashboard host's WebAuthn scope (neither at/below it nor a parent of it), distinct from the other, and not already in use by a DNS record. Fans out via reloadGateways so every CP rebuilds DNS, certs and Envoy; existing tunnels reconnect under the new name and previews are re-routed on the next snapshot.","operationId":"api_platform-settings_tunnel-preview_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tunnelDomain":{"type":"string","description":"Tunnel parent domain, e.g. `t.example.com`."},"previewDomain":{"type":"string","description":"Preview parent domain, e.g. `preview.example.com`."}},"additionalProperties":false,"required":["tunnelDomain","previewDomain"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/platform-settings/old-domain":{"delete":{"tags":["Settings"],"summary":"Retire the previous platform domain.","description":"Ends a platform-domain move: the old domain stops resolving and serving, and every passkey registered under it is deleted. Users who have not moved their passkey by then need an account reset.","operationId":"api_platform-settings_old-domain_delete","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/alerts":{"get":{"tags":["Alerts"],"summary":"List active (pending/cleared) alerts for a project.","operationId":"api_alerts_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"serviceId":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"severity":{"type":"string"},"labels":{"type":"string"},"firedAt":{"type":"string","format":"date-time"},"status":{"type":"string"},"silencedById":{"type":"string"},"deliveryMode":{"type":"string"},"lastWebhookStatus":{"type":"string"},"lastWebhookError":{"type":"string"},"lastWebhookAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","projectId","title","body","severity","labels","firedAt","status","deliveryMode"]}}},"additionalProperties":false,"required":["alerts"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/alerts/{alertId}":{"get":{"tags":["Alerts"],"summary":"Get a single alert by ID.","operationId":"api_alerts_alertId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"serviceId":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"severity":{"type":"string"},"labels":{"type":"string"},"annotations":{"type":"string"},"firedAt":{"type":"string","format":"date-time"},"status":{"type":"string"},"incidentId":{"type":"string"},"escalationLog":{"type":"array","items":{"type":"object","properties":{"t":{"type":"integer"},"m":{"type":"string"}},"additionalProperties":false,"required":["t","m"]}},"events":{"type":"array","items":{"type":"object","properties":{"t":{"type":"integer"},"type":{"type":"string"}},"additionalProperties":false,"required":["t","type"]}},"source":{"type":"string"},"ruleName":{"type":"string"},"resolvedAt":{"type":"string","format":"date-time"},"deliveryMode":{"type":"string"},"lastWebhookStatus":{"type":"string"},"lastWebhookError":{"type":"string"},"lastWebhookAt":{"type":"string","format":"date-time"},"webhookLog":{"type":"array","items":{"type":"object","properties":{"t":{"type":"number"},"event":{"type":"string"},"status":{"type":"string"},"error":{"type":"string"}},"additionalProperties":false,"required":["t","event","status"]}},"condition":{"type":"object","properties":{"expr":{"type":"string"},"comparator":{"type":"string"},"tiers":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string"},"threshold":{"type":"number"}},"additionalProperties":false,"required":["severity"]}},"datasource":{"type":"string","enum":["metrics","logs"]}},"additionalProperties":false,"required":["expr","tiers"]},"silence":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string"},"createdBy":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","reason","createdBy"]}},"additionalProperties":false,"required":["id","projectId","title","body","severity","labels","annotations","firedAt","status","escalationLog","events","source","deliveryMode","webhookLog"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/alerts/{alertId}/dismiss":{"post":{"tags":["Alerts"],"summary":"Dismiss an alert that is not on an incident.","description":"Only an alert outside any incident can be dismissed: a silenced or webhook alert. An alert on an incident ends when the incident is closed.","operationId":"api_alerts_alertId_dismiss_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/silences":{"get":{"tags":["Silences"],"summary":"List active and recently-expired silences for a project.","operationId":"api_silences_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"silences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"matchers":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"op":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["label","op","value"]}},"expiresAt":{"type":"string","format":"date-time"},"reason":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","projectId","matchers","reason","createdBy","createdAt"]}}},"additionalProperties":false,"required":["silences"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Silences"],"summary":"Create a silence for a project.","operationId":"api_silences_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"matchers":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"op":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["label","op","value"]},"minItems":1},"expiresAt":{"type":"string","format":"date-time"},"reason":{"type":"string"}},"additionalProperties":false,"required":["projectId","matchers"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/silences/{id}":{"delete":{"tags":["Silences"],"summary":"Delete a silence.","operationId":"api_silences_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Silences"],"summary":"Change a silence's expiry (extend it or make it never expire).","operationId":"api_silences_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhooks/deploy":{"post":{"tags":["Webhooks"],"summary":"Trigger a service deployment via webhook.","operationId":"api_webhooks_deploy_post","security":[],"parameters":[{"name":"serviceId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"deployed":{"type":"boolean"}},"additionalProperties":false,"required":["ok","deployed"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhooks/pr-preview":{"post":{"tags":["Webhooks"],"summary":"Upsert or delete a PR preview deployment via webhook.","operationId":"api_webhooks_pr-preview_post","security":[],"parameters":[{"name":"serviceId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"token","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"event":{"type":"string","enum":["upsert"]},"slug":{"type":"string","minLength":1,"maxLength":31},"imageTag":{"type":"string","minLength":1,"maxLength":256},"title":{"type":"string","minLength":1,"maxLength":256},"url":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false,"required":["event","slug","imageTag"]},{"type":"object","properties":{"event":{"type":"string","enum":["delete"]},"slug":{"type":"string","minLength":1,"maxLength":31}},"additionalProperties":false,"required":["event","slug"]}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"previewId":{"type":"string"},"hostname":{"type":"string"},"created":{"type":"boolean"}},"additionalProperties":false,"required":["ok","created"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhooks/forgejo/{projectId}":{"post":{"tags":["Webhooks"],"summary":"Receive a Forgejo webhook for a project's tickets.","operationId":"api_webhooks_forgejo_projectId_post","security":[],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tickets":{"type":"integer"}},"additionalProperties":false,"required":["ok","tickets"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhooks/acme/present":{"post":{"tags":["Webhooks"],"summary":"lego httpreq present: publish an ACME DNS-01 TXT record.","description":"HTTP Basic auth (username \"onedeploy\", password is the ACME token). Writes the TXT value to the shared acme_challenges table and reloads PowerDNS on every CP. Compatible with Traefik's lego httpreq provider — point HTTPREQ_ENDPOINT at this endpoint's parent path.","operationId":"api_webhooks_acme_present_post","security":[],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"fqdn":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["fqdn","value"]},{"type":"object","properties":{"domain":{"type":"string"},"token":{"type":"string"},"keyAuth":{"type":"string"}},"additionalProperties":false,"required":["domain","token","keyAuth"]}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhooks/acme/cleanup":{"post":{"tags":["Webhooks"],"summary":"lego httpreq cleanup: remove an ACME DNS-01 TXT record.","description":"HTTP Basic auth (username \"onedeploy\", password is the ACME token). Deletes the (fqdn, value) row from acme_challenges and reloads PowerDNS. Cleanup is value-scoped so a concurrent issuance for the same name (e.g. apex + wildcard) isn't affected.","operationId":"api_webhooks_acme_cleanup_post","security":[],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"fqdn":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["fqdn","value"]},{"type":"object","properties":{"domain":{"type":"string"},"token":{"type":"string"},"keyAuth":{"type":"string"}},"additionalProperties":false,"required":["domain","token","keyAuth"]}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhooks/bounces/mailgun/{secret}":{"post":{"tags":["Webhooks"],"summary":"Mailgun bounce / complaint / unsubscribe webhook.","description":"Authenticated by the random URL-path secret oneDeploy generated when the Mailgun outbound account was created and registered with Mailgun's webhooks API. The secret uniquely identifies the originating outbound account. Every event is recorded against the originating message (with its full raw payload); hard bounces, spam complaints, and explicit unsubscribes additionally drop the recipient into the platform-wide suppression list so future outbound sends — by any service, user, or tool on the cluster, regardless of which outbound account they use — skip the address.","operationId":"api_webhooks_bounces_mailgun_secret_post","security":[],"parameters":[{"name":"secret","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhooks/bounces/mailjet/{secret}":{"post":{"tags":["Webhooks"],"summary":"Mailjet bounce / complaint / unsubscribe webhook.","description":"Authenticated by the URL-path secret oneDeploy generated for the Mailjet outbound account at create time and registered with Mailjet's `/eventcallbackurl` API. The secret uniquely identifies the originating outbound account. Every event is recorded against the originating message (with its full raw payload); hard bounces, spam complaints, and explicit unsubscribes additionally drop the recipient into the platform-wide suppression list. Mailjet may POST a single event object or an array of events — both shapes are accepted.","operationId":"api_webhooks_bounces_mailjet_secret_post","security":[],"parameters":[{"name":"secret","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhooks/bounces/brevo/{secret}":{"post":{"tags":["Webhooks"],"summary":"Brevo bounce / complaint / unsubscribe webhook.","description":"Authenticated by the URL-path secret oneDeploy generated for the Brevo outbound account at create time and registered with Brevo's `/webhooks` API. The secret uniquely identifies the originating outbound account. Every event is recorded against the originating message (with its full raw payload); hard bounces, blocked addresses, invalid-email reports, spam complaints, and explicit unsubscribes additionally drop the recipient into the platform-wide suppression list.","operationId":"api_webhooks_bounces_brevo_secret_post","security":[],"parameters":[{"name":"secret","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhooks/bounces/lettermint/{secret}":{"post":{"tags":["Webhooks"],"summary":"Lettermint bounce / complaint / unsubscribe webhook.","description":"Authenticated by the URL-path secret oneDeploy generated for the Lettermint outbound account and registered with Lettermint's Team API on save. Every event is recorded against the originating message (with its full raw payload); hard bounces, spam complaints and unsubscribes for a message this cluster sent additionally drop the recipient into the platform-wide suppression list.","operationId":"api_webhooks_bounces_lettermint_secret_post","security":[],"parameters":[{"name":"secret","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/agents.txt":{"get":{"tags":["Agent"],"summary":"The guide for AI agents, as Markdown.","description":"How an agent works with oneDeploy: the permission model, getting project access, the approval protocol, SSH, and where the API reference is. No authentication.","operationId":"agents.txt_get","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhook-endpoints":{"get":{"tags":["Webhooks"],"summary":"List your webhook capture endpoints.","operationId":"api_webhook-endpoints_get","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"httpEnabled":{"type":"boolean"},"emailEnabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"httpUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytesUsed":{"type":"number"},"eventCount":{"type":"number"},"lastEventAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"additionalProperties":false,"required":["id","label","httpEnabled","emailEnabled","createdAt","expiresAt","httpUrl","emailAddress","bytesUsed","eventCount","lastEventAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Webhooks"],"summary":"Create a webhook capture endpoint.","operationId":"api_webhook-endpoints_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","maxLength":200}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"httpEnabled":{"type":"boolean"},"emailEnabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"httpUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytesUsed":{"type":"number"}},"additionalProperties":false,"required":["id","label","httpEnabled","emailEnabled","createdAt","expiresAt","httpUrl","emailAddress","bytesUsed"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhook-endpoints/{id}":{"get":{"tags":["Webhooks"],"summary":"Get one of your webhook capture endpoints.","operationId":"api_webhook-endpoints_id_get","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"httpEnabled":{"type":"boolean"},"emailEnabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"httpUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytesUsed":{"type":"number"},"eventCount":{"type":"number"},"usedBytes":{"type":"number"},"maxBytes":{"type":"number"}},"additionalProperties":false,"required":["id","label","httpEnabled","emailEnabled","createdAt","expiresAt","httpUrl","emailAddress","bytesUsed","eventCount","usedBytes","maxBytes"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Webhooks"],"summary":"Update a webhook capture endpoint.","operationId":"api_webhook-endpoints_id_put","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"httpEnabled":{"type":"boolean"},"emailEnabled":{"type":"boolean"},"extend":{"type":"boolean","description":"Reset the expiry to the full window from now."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"httpEnabled":{"type":"boolean"},"emailEnabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"httpUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytesUsed":{"type":"number"}},"additionalProperties":false,"required":["id","label","httpEnabled","emailEnabled","createdAt","expiresAt","httpUrl","emailAddress","bytesUsed"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook capture endpoint and everything it captured.","operationId":"api_webhook-endpoints_id_delete","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"additionalProperties":false,"required":["deleted"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhook-endpoints/{id}/events":{"get":{"tags":["Webhooks"],"summary":"List the requests and emails captured by an endpoint.","description":"Both channels come back in one chronological list, newest first — interleaving them is the reason both share an endpoint id. Every captured field is sealed to the caller's identity key and opened in the browser; the server cannot read any of it back.","operationId":"api_webhook-endpoints_id_events_get","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string","enum":["http","email"]},"receivedAt":{"type":"string","format":"date-time"},"sourceIp":{"anyOf":[{"type":"string"},{"type":"null"}]},"bodySize":{"type":"number"},"truncated":{"type":"boolean"},"summaryTruncated":{"type":"boolean"},"sealedKey":{"type":"string"},"sealedSummary":{"type":"string"},"hasDetail":{"type":"boolean"}},"additionalProperties":false,"required":["id","channel","receivedAt","sourceIp","bodySize","truncated","summaryTruncated","sealedKey","sealedSummary","hasDetail"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete everything an endpoint has captured, keeping the endpoint.","operationId":"api_webhook-endpoints_id_events_delete","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"cleared":{"type":"boolean"}},"additionalProperties":false,"required":["cleared"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/webhook-endpoints/{id}/events/{eventId}/detail":{"get":{"tags":["Webhooks"],"summary":"Download the sealed detail payload of a captured event.","description":"Returns the encrypted headers, attachment list and body as one opaque blob. Only the endpoint owner's browser can open it — the control plane holds no key for it.","operationId":"api_webhook-endpoints_id_events_eventId_detail_get","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/hook/{id}/*":{"get":{"tags":["Webhooks"],"summary":"Capture an inbound GET request.","description":"Public capture sink. Records the request against a webhook endpoint and always answers with a fixed body that never echoes the request.","operationId":"hook_id_*_get","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Webhooks"],"summary":"Capture an inbound POST request.","description":"Public capture sink. Records the request against a webhook endpoint and always answers with a fixed body that never echoes the request.","operationId":"hook_id_*_post","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Webhooks"],"summary":"Capture an inbound PUT request.","description":"Public capture sink. Records the request against a webhook endpoint and always answers with a fixed body that never echoes the request.","operationId":"hook_id_*_put","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"patch":{"tags":["Webhooks"],"summary":"Capture an inbound PATCH request.","description":"Public capture sink. Records the request against a webhook endpoint and always answers with a fixed body that never echoes the request.","operationId":"hook_id_*_patch","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Webhooks"],"summary":"Capture an inbound DELETE request.","description":"Public capture sink. Records the request against a webhook endpoint and always answers with a fixed body that never echoes the request.","operationId":"hook_id_*_delete","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/incidents":{"get":{"tags":["Incidents"],"summary":"List incidents for a project.","operationId":"api_incidents_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"closedAt":{"type":"string","format":"date-time"},"createdByUsername":{"type":"string"},"assignees":{"type":"array","items":{"type":"string"}},"acknowledgedAt":{"type":"string","format":"date-time"},"acknowledgedBy":{"type":"string"},"alertCount":{"type":"integer"},"firingAlerts":{"type":"integer"}},"additionalProperties":false,"required":["id","projectId","title","severity","status","createdAt","createdByUsername","assignees","alertCount","firingAlerts"]}}},"additionalProperties":false,"required":["incidents"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Incidents"],"summary":"Create an incident for a project.","description":"An incident opened by hand is acknowledged by its creator, so it pages nobody (escalate it from the incident to page). With a `serviceId`, later alerts about that service join it instead of opening their own incident while it is open.","operationId":"api_incidents_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"severity":{"type":"string","enum":["critical","high","medium","low","info"]},"serviceId":{"type":"string"},"assignees":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["title","severity"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/incidents/{incidentId}":{"get":{"tags":["Incidents"],"summary":"Get an incident with its timeline.","operationId":"api_incidents_incidentId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"closedAt":{"type":"string","format":"date-time"},"createdByUsername":{"type":"string"},"assignees":{"type":"array","items":{"type":"string"}},"acknowledgedAt":{"type":"string","format":"date-time"},"acknowledgedBy":{"type":"string"},"escalating":{"type":"boolean"},"lastEscalationLayer":{"type":"integer"},"nextEscalationUsers":{"type":"array","items":{"type":"string"}},"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string"},"firedAt":{"type":"string","format":"date-time"},"status":{"type":"string"},"firing":{"type":"boolean"},"body":{"type":"string"},"labels":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"t":{"type":"integer"},"type":{"type":"string"}},"additionalProperties":false,"required":["t","type"]}},"condition":{"type":"object","properties":{"expr":{"type":"string"},"comparator":{"type":"string"},"tiers":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string"},"threshold":{"type":"number"}},"additionalProperties":false,"required":["severity"]}},"datasource":{"type":"string","enum":["metrics","logs"]}},"additionalProperties":false,"required":["expr","tiers"]}},"additionalProperties":false,"required":["id","title","severity","firedAt","status","firing","body","labels","events"]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"incidentId":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"username":{"type":"string"},"message":{"type":"string"},"isPublic":{"type":"integer"},"kind":{"type":"string"}},"additionalProperties":false,"required":["id","incidentId","timestamp","message","isPublic"]}},"ai":{"type":"object","properties":{"available":{"type":"boolean"},"unavailableReason":{"type":"string"},"pending":{"type":"boolean"},"error":{"type":"string"},"analysis":{"type":"object","properties":{"summary":{"type":"string"},"cause":{"type":"string"},"confidence":{"type":"string","enum":["high","medium","low"]},"affected":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["service","node","other"]},"name":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":false,"required":["kind","name","detail"]}},"findings":{"type":"array","items":{"type":"string"}},"countermeasures":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"why":{"type":"string"}},"additionalProperties":false,"required":["action","why"]}},"related":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"linked":{"type":"boolean"},"reason":{"type":"string"}},"additionalProperties":false,"required":["id","title","status","linked","reason"]}},"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string"},"linked":{"type":"boolean"},"reason":{"type":"string"}},"additionalProperties":false,"required":["id","number","subject","status","linked","reason"]}},"knowledge":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"},"type":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["id","path","type","reason"]}},"readLogs":{"type":"boolean"},"model":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"automatic":{"type":"boolean"}},"additionalProperties":false,"required":["summary","cause","confidence","affected","findings","countermeasures","related","tickets","knowledge","readLogs","model","createdAt","automatic"]},"report":{"type":"object","properties":{"state":{"type":"string","enum":["writing","written","failed"]},"recordId":{"type":"string"},"path":{"type":"string"},"error":{"type":"string"}},"additionalProperties":false,"required":["state","recordId","path"]}},"additionalProperties":false,"required":["available","pending"]},"related":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"severity":{"type":"string"},"reason":{"type":"string"},"linkedBy":{"type":"string"},"linkedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","title","status","severity","linkedAt"]}},"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string","enum":["new","open","in_progress","waiting","fixed","resolved","canceled","spam"]}},"additionalProperties":false,"required":["id","number","subject","status"]}}},"additionalProperties":false,"required":["id","projectId","title","severity","status","createdAt","createdByUsername","assignees","escalating","lastEscalationLayer","nextEscalationUsers","alerts","events","ai","related","tickets"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Incidents"],"summary":"Update an incident (close, reassign, rename).","operationId":"api_incidents_incidentId_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"severity":{"type":"string","enum":["critical","high","medium","low","info"]},"assignees":{"type":"array","items":{"type":"string"}},"title":{"type":"string"},"call":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"reportId":{"type":"string"},"reportPath":{"type":"string"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Incidents"],"summary":"Delete an incident permanently.","operationId":"api_incidents_incidentId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/incidents/{incidentId}/acknowledge":{"post":{"tags":["Incidents"],"summary":"Acknowledge an incident, which stops its escalation.","description":"An incident opened by an alert pages the on-call rotation until someone acknowledges it. Acknowledging stops that escalation and, when the incident has no assignees yet, assigns it to the caller. New alerts on an acknowledged incident notify its assignees instead of paging. Acknowledging an incident that is already acknowledged changes nothing.","operationId":"api_incidents_incidentId_acknowledge_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/incidents/{incidentId}/ai/analyze":{"post":{"tags":["Incidents"],"summary":"Analyse an incident with AI now.","description":"The AI reads the incident's alerts and investigates the project with read-only tools (services, their configuration, connections and recent changes, metrics, alerts, incidents, tickets, the knowledge base, Forgejo issues, and logs and traces when the project allows it; nodes in the Infrastructure project). It stores what is affected, the likely cause, countermeasures and what to read, posts a note on the timeline, and links related incidents and affected tickets unless a person unlinked them before. It never changes the incident otherwise and never posts publicly.","operationId":"api_incidents_incidentId_ai_analyze_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean"},"unavailableReason":{"type":"string"},"pending":{"type":"boolean"},"error":{"type":"string"},"analysis":{"type":"object","properties":{"summary":{"type":"string"},"cause":{"type":"string"},"confidence":{"type":"string","enum":["high","medium","low"]},"affected":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["service","node","other"]},"name":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":false,"required":["kind","name","detail"]}},"findings":{"type":"array","items":{"type":"string"}},"countermeasures":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"why":{"type":"string"}},"additionalProperties":false,"required":["action","why"]}},"related":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"linked":{"type":"boolean"},"reason":{"type":"string"}},"additionalProperties":false,"required":["id","title","status","linked","reason"]}},"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string"},"linked":{"type":"boolean"},"reason":{"type":"string"}},"additionalProperties":false,"required":["id","number","subject","status","linked","reason"]}},"knowledge":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"},"type":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["id","path","type","reason"]}},"readLogs":{"type":"boolean"},"model":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"automatic":{"type":"boolean"}},"additionalProperties":false,"required":["summary","cause","confidence","affected","findings","countermeasures","related","tickets","knowledge","readLogs","model","createdAt","automatic"]},"report":{"type":"object","properties":{"state":{"type":"string","enum":["writing","written","failed"]},"recordId":{"type":"string"},"path":{"type":"string"},"error":{"type":"string"}},"additionalProperties":false,"required":["state","recordId","path"]}},"additionalProperties":false,"required":["available","pending"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/incidents/{incidentId}/ai/report":{"post":{"tags":["Incidents"],"summary":"Try a failed incident report again.","description":"When an incident closes, the AI writes the summary, root cause and action items into its report document. If that failed, this tries again. It does nothing for a report that was written or is still being written, since a closed incident cannot have changed.","operationId":"api_incidents_incidentId_ai_report_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean"},"unavailableReason":{"type":"string"},"pending":{"type":"boolean"},"error":{"type":"string"},"analysis":{"type":"object","properties":{"summary":{"type":"string"},"cause":{"type":"string"},"confidence":{"type":"string","enum":["high","medium","low"]},"affected":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["service","node","other"]},"name":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":false,"required":["kind","name","detail"]}},"findings":{"type":"array","items":{"type":"string"}},"countermeasures":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"why":{"type":"string"}},"additionalProperties":false,"required":["action","why"]}},"related":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"linked":{"type":"boolean"},"reason":{"type":"string"}},"additionalProperties":false,"required":["id","title","status","linked","reason"]}},"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"subject":{"type":"string"},"status":{"type":"string"},"linked":{"type":"boolean"},"reason":{"type":"string"}},"additionalProperties":false,"required":["id","number","subject","status","linked","reason"]}},"knowledge":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"},"type":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["id","path","type","reason"]}},"readLogs":{"type":"boolean"},"model":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"automatic":{"type":"boolean"}},"additionalProperties":false,"required":["summary","cause","confidence","affected","findings","countermeasures","related","tickets","knowledge","readLogs","model","createdAt","automatic"]},"report":{"type":"object","properties":{"state":{"type":"string","enum":["writing","written","failed"]},"recordId":{"type":"string"},"path":{"type":"string"},"error":{"type":"string"}},"additionalProperties":false,"required":["state","recordId","path"]}},"additionalProperties":false,"required":["available","pending"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/incidents/{incidentId}/links":{"post":{"tags":["Incidents"],"summary":"Link a related incident.","description":"Marks two incidents of the same project as related (one caused the other, or both have one cause). Nothing moves between them: each keeps its alerts, timeline and escalation. Both timelines record the link.","operationId":"api_incidents_incidentId_links_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"incidentId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["incidentId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"linked":{"type":"boolean"}},"additionalProperties":false,"required":["linked"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/incidents/{incidentId}/links/{otherId}":{"delete":{"tags":["Incidents"],"summary":"Remove the link to a related incident.","description":"The AI assistant never links the pair again; a person can.","operationId":"api_incidents_incidentId_links_otherId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"otherId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"unlinked":{"type":"boolean"}},"additionalProperties":false,"required":["unlinked"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/incidents/{incidentId}/escalate":{"post":{"tags":["Incidents"],"summary":"Manually escalate an incident to the next on-call layer.","operationId":"api_incidents_incidentId_escalate_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"layer":{"type":"integer"},"error":{"type":"string"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/incidents/{incidentId}/ping":{"post":{"tags":["Incidents"],"summary":"Ping a user about an incident.","operationId":"api_incidents_incidentId_ping_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"call":{"type":"boolean"}},"additionalProperties":false,"required":["username"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/incidents/{incidentId}/events":{"post":{"tags":["Incidents"],"summary":"Add an event to an incident timeline.","operationId":"api_incidents_incidentId_events_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"incidentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"isPublic":{"type":"boolean"}},"additionalProperties":false,"required":["message","isPublic"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/k6-tests":{"get":{"tags":["k6 Tests"],"summary":"List k6 tests in a project.","operationId":"api_k6-tests_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"schedule":{"type":"string"},"alertingEnabled":{"type":"boolean"},"lastRunStatus":{"type":"string"},"lastRunAt":{"type":"string","format":"date-time"},"lastRunId":{"type":"string"}},"additionalProperties":false,"required":["id","name","description","alertingEnabled"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["k6 Tests"],"summary":"Create a k6 test.","operationId":"api_k6-tests_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"script":{"type":"string"},"schedule":{"type":"string"},"alertingEnabled":{"type":"boolean"}},"additionalProperties":false,"required":["name","description","script","alertingEnabled"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/k6-tests/{id}":{"get":{"tags":["k6 Tests"],"summary":"Get a k6 test.","operationId":"api_k6-tests_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"script":{"type":"string"},"schedule":{"type":"string"},"alertingEnabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","projectId","name","description","script","alertingEnabled","createdAt","updatedAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["k6 Tests"],"summary":"Update a k6 test.","operationId":"api_k6-tests_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"script":{"type":"string"},"schedule":{"type":"string"},"alertingEnabled":{"type":"boolean"}},"additionalProperties":false,"required":["name","description","script","alertingEnabled"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["k6 Tests"],"summary":"Delete a k6 test.","operationId":"api_k6-tests_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/k6-tests/{id}/run":{"post":{"tags":["k6 Tests"],"summary":"Trigger a manual k6 test run.","operationId":"api_k6-tests_id_run_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"}},"additionalProperties":false,"required":["runId"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/k6-tests/{id}/runs":{"get":{"tags":["k6 Tests"],"summary":"List runs for a k6 test.","operationId":"api_k6-tests_id_runs_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number"}},{"name":"offset","in":"query","required":false,"schema":{"type":"number"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"triggeredBy":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time"},"exitCode":{"type":"number"}},"additionalProperties":false,"required":["id","status","triggeredBy"]}},"total":{"type":"number"}},"additionalProperties":false,"required":["runs","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/k6-tests/{id}/runs/{runId}":{"get":{"tags":["k6 Tests"],"summary":"Get a k6 test run.","operationId":"api_k6-tests_id_runs_runId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"testId":{"type":"string"},"status":{"type":"string"},"triggeredBy":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time"},"exitCode":{"type":"number"},"summary":{},"hasLogs":{"type":"boolean"}},"additionalProperties":false,"required":["id","testId","status","triggeredBy","hasLogs"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/k6-tests/{id}/runs/{runId}/cancel":{"post":{"tags":["k6 Tests"],"summary":"Cancel a running k6 test.","operationId":"api_k6-tests_id_runs_runId_cancel_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/k6-tests/{id}/files":{"get":{"tags":["k6 Tests"],"summary":"List files for a k6 test.","operationId":"api_k6-tests_id_files_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"size":{"type":"number"}},"additionalProperties":false,"required":["name","size"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["k6 Tests"],"summary":"Upload a file for a k6 test.","operationId":"api_k6-tests_id_files_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9._-]+$"},"data":{"type":"string"}},"additionalProperties":false,"required":["name","data"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/k6-tests/{id}/files/{fileName}":{"get":{"tags":["k6 Tests"],"summary":"Download a k6 test file.","operationId":"api_k6-tests_id_files_fileName_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileName","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._-]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"data":{"type":"string"}},"additionalProperties":false,"required":["name","data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["k6 Tests"],"summary":"Delete a k6 test file.","operationId":"api_k6-tests_id_files_fileName_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileName","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._-]+$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/search":{"get":{"tags":["Knowledge Base"],"summary":"Full-text search across a project's KB records.","operationId":"api_kb_search_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"path":{"type":"string"},"rank":{"type":"number"},"snippet":{"type":"string"}},"additionalProperties":false,"required":["id","type","path","rank","snippet"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/deleted":{"get":{"tags":["Knowledge Base"],"summary":"List soft-deleted KB records in a project (restorable).","operationId":"api_kb_deleted_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"path":{"type":"string"},"deletedAt":{"type":"number"}},"additionalProperties":false,"required":["id","type","path","deletedAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/records/{id}":{"delete":{"tags":["Knowledge Base"],"summary":"Delete a KB record (document or asset).","operationId":"api_kb_records_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/records/{id}/restore-deleted":{"post":{"tags":["Knowledge Base"],"summary":"Restore a soft-deleted KB record (document or asset).","operationId":"api_kb_records_id_restore-deleted_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/records/{id}/content":{"put":{"tags":["Knowledge Base"],"summary":"Change part of a KB record's content (document body, asset fields, notes).","description":"A document's markdown is `fields.body`. Fields left out are left alone; `null` clears a non-text field. Text fields replace their whole value.","operationId":"api_kb_records_id_content_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string"},"fields":{"type":"object","additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/records/{id}/versions":{"get":{"tags":["Knowledge Base"],"summary":"List a record's version history (newest first).","operationId":"api_kb_records_id_versions_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"}},"additionalProperties":false,"required":["id","createdAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/records/{id}/versions/{versionId}":{"get":{"tags":["Knowledge Base"],"summary":"Get a single version's captured content (for preview).","operationId":"api_kb_records_id_versions_versionId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"type":{"type":"string"},"path":{"type":"string"},"notes":{"type":"string"},"fields":{"type":"object","additionalProperties":{}}},"additionalProperties":false,"required":["id","createdAt","type","path","notes","fields"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/records/{id}/versions/{versionId}/restore":{"post":{"tags":["Knowledge Base"],"summary":"Restore a record's content to a captured version.","operationId":"api_kb_records_id_versions_versionId_restore_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/documents":{"get":{"tags":["Knowledge Base"],"summary":"List all documents in a project.","operationId":"api_kb_documents_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"path":{"type":"string"}},"additionalProperties":false,"required":["id","path"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Knowledge Base"],"summary":"Create a new document.","operationId":"api_kb_documents_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"content":{"type":"string"}},"additionalProperties":false,"required":["path"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/documents/{id}":{"get":{"tags":["Knowledge Base"],"summary":"Get a document by ID.","operationId":"api_kb_documents_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"path":{"type":"string"},"content":{"type":"string","description":"The markdown body as last saved (edits in an open editor are saved within seconds)."}},"additionalProperties":false,"required":["id","projectId","path","content"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Knowledge Base"],"summary":"Rename or move a document.","operationId":"api_kb_documents_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"}},"additionalProperties":false,"required":["path"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/documents/{id}/signoffs":{"get":{"tags":["Knowledge Base"],"summary":"List a document's sections with who has signed each, and who has not.","operationId":"api_kb_documents_id_signoffs_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"parents":{"type":"array","items":{"type":"string"}},"level":{"type":"number"},"line":{"type":"number"},"content":{"type":"string"},"hash":{"type":"string"},"signers":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"signatureId":{"type":"string"},"signedAt":{"type":"number"},"current":{"type":"boolean"}},"additionalProperties":false,"required":["username","signatureId","signedAt","current"]}},"missing":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["key","title","parents","level","line","content","hash","signers","missing"]}},"orphaned":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"signers":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"signatureId":{"type":"string"},"signedAt":{"type":"number"},"current":{"type":"boolean"}},"additionalProperties":false,"required":["username","signatureId","signedAt","current"]}}},"additionalProperties":false,"required":["key","signers"]}}},"additionalProperties":false,"required":["members","sections","orphaned"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Knowledge Base"],"summary":"Sign a section of a document as it is written now.","operationId":"api_kb_documents_id_signoffs_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sectionKey":{"type":"string","maxLength":4096},"contentHash":{"type":"string","maxLength":64}},"additionalProperties":false,"required":["sectionKey","contentHash"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"signatureId":{"type":"string"},"signedAt":{"type":"number"}},"additionalProperties":false,"required":["signatureId","signedAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/documents/{id}/signoffs/{signatureId}":{"get":{"tags":["Knowledge Base"],"summary":"Get the exact text a signature covers.","operationId":"api_kb_documents_id_signoffs_signatureId_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"signatureId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sectionKey":{"type":"string"},"sectionTitle":{"type":"string"},"username":{"type":"string"},"signedAt":{"type":"number"},"content":{"type":"string"},"currentContent":{"type":["string","null"]}},"additionalProperties":false,"required":["id","sectionKey","sectionTitle","username","signedAt","content","currentContent"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/asset-types":{"get":{"tags":["Knowledge Base"],"summary":"List built-in knowledge-base asset types.","operationId":"api_kb_asset-types_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"icon":{"type":"string"},"description":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"placeholder":{"type":"string"},"autofill":{"type":"string"}},"additionalProperties":false,"required":["key","label","type"]}}},"additionalProperties":false,"required":["key","label","icon","description","fields"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/asset-ssh-key":{"get":{"tags":["Knowledge Base"],"summary":"Get the project's SSH key state for asset access.","operationId":"api_kb_asset-ssh-key_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"provisioned":{"type":"boolean"},"publicKey":{"type":"string"}},"additionalProperties":false,"required":["provisioned","publicKey"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/restorable-clusters":{"get":{"tags":["Knowledge Base"],"summary":"List the oneDeploy clusters a new cluster can be restored from.","description":"Admin only. Every managed cluster asset, each with whether this cluster holds backup storage for it. Creating a cluster with `restore` replaces one of them.","operationId":"api_kb_restorable-clusters_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hasBackupStorage":{"type":"boolean"}},"additionalProperties":false,"required":["id","name","hasBackupStorage"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/clusters":{"post":{"tags":["Knowledge Base"],"summary":"Create a managed oneDeploy cluster.","description":"Admin only. Buys a server with one of this cluster's provider accounts (Hetzner Cloud, Hetzner Robot or Scaleway) exactly as a control-plane node is bought — this cluster's SSH key, a generated host key, the control-plane disk layout — documents it as a oneDeploy cluster asset in the Infrastructure project, and installs oneDeploy on it in the background with this cluster's registry credential. Follow the install with GET /assets/{clusterId}/cluster-install. When it finishes, create the first admin's sign-in link from the cluster's page.","operationId":"api_kb_clusters_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"name":{"type":"string"},"serverTypeId":{"type":"string","description":"A server type from GET /api/cluster-settings/accounts/{id}/options. It must be big enough for a control plane — the same rule a control-plane node is admitted by."},"locationId":{"type":"string","description":"The location's `name` from the same options call (what the server types' `prices` are keyed by), as for POST /api/nodes."},"restore":{"type":"object","properties":{"fromClusterId":{"type":"string","description":"The oneDeploy cluster asset being replaced. Its backup storage here, if it has any, moves to the new cluster."},"source":{"type":"string","enum":["storage","s3"],"description":"Where the backup is: `storage` is the backup storage this cluster holds for the cluster being replaced, `s3` another bucket (usually its primary backup storage)."},"s3":{"type":"object","properties":{"url":{"type":"string"},"region":{"type":"string"},"accessKeyId":{"type":"string"},"accessKeySecret":{"type":"string"}},"additionalProperties":false,"required":["url","region","accessKeyId","accessKeySecret"],"description":"The bucket to restore from, as the cluster's backup settings name it. Required for `s3`."},"encryptionKey":{"type":"string","description":"The backup encryption key of the cluster being restored. Kept here only until it has been written onto the new server for its first start, then deleted; never included in this cluster's own backups."},"snapshot":{"type":"string","description":"A snapshot id, or \"latest\" (the default)."}},"additionalProperties":false,"required":["fromClusterId","source","encryptionKey"],"description":"Restore another cluster's platform backup on the new cluster's first start, instead of starting empty."}},"additionalProperties":false,"required":["accountId","name","serverTypeId","locationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"clusterRecordId":{"type":"string"}},"additionalProperties":false,"required":["clusterRecordId"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/asset-tunnel-daemon/config":{"post":{"tags":["Knowledge Base"],"summary":"Fetch an asset tunnel daemon's Nebula configuration.","operationId":"api_kb_asset-tunnel-daemon_config_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string","description":"The asset tunnel daemon secret."},"os":{"type":"string","enum":["linux","windows"]}},"additionalProperties":false,"required":["secret"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"nebulaConfig":{"type":"string"},"forwards":{"type":"array","items":{"type":"object","properties":{"port":{"type":"integer"}},"additionalProperties":false,"required":["port"]}},"alloyConfig":{"type":"string"}},"additionalProperties":false,"required":["nebulaConfig","forwards"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/asset-metrics":{"post":{"tags":["Knowledge Base"],"summary":"Ingest host metrics from an asset's tunnel daemon.","operationId":"api_kb_asset-metrics_post","security":[],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets":{"get":{"tags":["Knowledge Base"],"summary":"List assets in a project.","operationId":"api_kb_assets_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"path":{"type":"string"},"updatedAt":{"type":"number"}},"additionalProperties":false,"required":["id","type","path","updatedAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Knowledge Base"],"summary":"Create a new asset.","operationId":"api_kb_assets_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["type"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}":{"get":{"tags":["Knowledge Base"],"summary":"Get an asset by ID.","operationId":"api_kb_assets_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"type":{"type":"string"},"path":{"type":"string"},"fields":{"type":"object","additionalProperties":{}},"notes":{"type":"string"},"collectMetrics":{"type":"boolean"},"metricsOs":{"type":"string","enum":["linux","windows"]}},"additionalProperties":false,"required":["id","projectId","type","path","fields","notes","collectMetrics"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Knowledge Base"],"summary":"Rename or move an asset (change its path).","operationId":"api_kb_assets_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"}},"additionalProperties":false,"required":["path"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/host-key":{"get":{"tags":["Knowledge Base"],"summary":"Get an asset's pinned SSH host key.","operationId":"api_kb_assets_id_host-key_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"pinned":{"type":"boolean"},"hostKey":{"type":"string"},"fingerprint":{"type":"string"}},"additionalProperties":false,"required":["pinned","hostKey","fingerprint"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Knowledge Base"],"summary":"Pin or clear an asset's SSH host key.","operationId":"api_kb_assets_id_host-key_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hostKey":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"pinned":{"type":"boolean"},"hostKey":{"type":"string"},"fingerprint":{"type":"string"}},"additionalProperties":false,"required":["pinned","hostKey","fingerprint"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/cluster":{"get":{"tags":["Knowledge Base"],"summary":"Get a managed cluster's health.","operationId":"api_kb_assets_id_cluster_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"monitored":{"type":"boolean","description":"Whether a control plane failing its health check for 5 minutes pages the project's on-call rotation."},"monitoredDecided":{"type":"boolean","description":"False until paging was switched on automatically (the first time every control plane answered) or set by a member. While false, nothing pages."},"addresses":{"type":"array","items":{"type":"string"},"description":"The control plane addresses this cluster is checked on: those on the record plus those the connected cluster reported."},"sshTargets":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"primary":{"type":"boolean"}},"additionalProperties":false,"required":["address","primary"]},"description":"The control planes the terminal and the sign-in link can reach: the primary when its host key is known, and every control plane the connected cluster reported."},"managerPublicKey":{"type":"string","description":"This cluster's SSH public key. A connected cluster installs it on every control plane itself; for one documented by hand, add it to root's authorized_keys on the primary control plane."},"controlPlanes":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"lastProbeAt":{"type":"string","format":"date-time"},"lastOkAt":{"type":"string","format":"date-time"},"failingSince":{"type":"string","format":"date-time"},"error":{"type":"string"},"version":{"type":"string"}},"additionalProperties":false,"required":["address","lastProbeAt"]}}},"additionalProperties":false,"required":["monitored","monitoredDecided","addresses","sshTargets","managerPublicKey","controlPlanes"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Knowledge Base"],"summary":"Turn paging for a managed cluster on or off.","description":"Turn paging off while a cluster is being worked on, and back on afterwards. Once set here it stays as set; the automatic switch-on only applies to a cluster nobody has decided for yet.","operationId":"api_kb_assets_id_cluster_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monitored":{"type":"boolean"}},"additionalProperties":false,"required":["monitored"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"monitored":{"type":"boolean","description":"Whether a control plane failing its health check for 5 minutes pages the project's on-call rotation."},"monitoredDecided":{"type":"boolean","description":"False until paging was switched on automatically (the first time every control plane answered) or set by a member. While false, nothing pages."},"addresses":{"type":"array","items":{"type":"string"},"description":"The control plane addresses this cluster is checked on: those on the record plus those the connected cluster reported."},"sshTargets":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"primary":{"type":"boolean"}},"additionalProperties":false,"required":["address","primary"]},"description":"The control planes the terminal and the sign-in link can reach: the primary when its host key is known, and every control plane the connected cluster reported."},"managerPublicKey":{"type":"string","description":"This cluster's SSH public key. A connected cluster installs it on every control plane itself; for one documented by hand, add it to root's authorized_keys on the primary control plane."},"controlPlanes":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"lastProbeAt":{"type":"string","format":"date-time"},"lastOkAt":{"type":"string","format":"date-time"},"failingSince":{"type":"string","format":"date-time"},"error":{"type":"string"},"version":{"type":"string"}},"additionalProperties":false,"required":["address","lastProbeAt"]}}},"additionalProperties":false,"required":["monitored","monitoredDecided","addresses","sshTargets","managerPublicKey","controlPlanes"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/cluster/check":{"post":{"tags":["Knowledge Base"],"summary":"Check a managed cluster now.","description":"Check every control plane immediately instead of waiting for the next minute's probe.","operationId":"api_kb_assets_id_cluster_check_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"monitored":{"type":"boolean","description":"Whether a control plane failing its health check for 5 minutes pages the project's on-call rotation."},"monitoredDecided":{"type":"boolean","description":"False until paging was switched on automatically (the first time every control plane answered) or set by a member. While false, nothing pages."},"addresses":{"type":"array","items":{"type":"string"},"description":"The control plane addresses this cluster is checked on: those on the record plus those the connected cluster reported."},"sshTargets":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"primary":{"type":"boolean"}},"additionalProperties":false,"required":["address","primary"]},"description":"The control planes the terminal and the sign-in link can reach: the primary when its host key is known, and every control plane the connected cluster reported."},"managerPublicKey":{"type":"string","description":"This cluster's SSH public key. A connected cluster installs it on every control plane itself; for one documented by hand, add it to root's authorized_keys on the primary control plane."},"controlPlanes":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"lastProbeAt":{"type":"string","format":"date-time"},"lastOkAt":{"type":"string","format":"date-time"},"failingSince":{"type":"string","format":"date-time"},"error":{"type":"string"},"version":{"type":"string"}},"additionalProperties":false,"required":["address","lastProbeAt"]}}},"additionalProperties":false,"required":["monitored","monitoredDecided","addresses","sshTargets","managerPublicKey","controlPlanes"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/cluster-access":{"post":{"tags":["Knowledge Base"],"summary":"Mint a sign-in link on a managed cluster.","description":"Create a one-time sign-in link on the managed cluster for `username`, creating that user as an admin there if it does not exist — the recovery path for a cluster nobody can sign in to any more. Runs the image's own `access` script (`docker exec onedeploy access <username>`) over SSH with this cluster's own key on `address` — any control plane in `sshTargets` — or on the primary when omitted. The link is served on that control plane's IP certificate and expires after 5 minutes.","operationId":"api_kb_assets_id_cluster-access_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"address":{"type":"string"}},"additionalProperties":false,"required":["username"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"additionalProperties":false,"required":["url"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/cluster-connection":{"get":{"tags":["Knowledge Base"],"summary":"Get a managed cluster's connection to this cluster.","description":"Whether a connection token is issued, when the cluster last synced, and the control planes it reported, each with its host key and whether this cluster's SSH key is installed there.","operationId":"api_kb_assets_id_cluster-connection_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"type":"boolean"},"tokenIssuedAt":{"type":"string","format":"date-time"},"lastSyncAt":{"type":"string","format":"date-time","description":"When the cluster last synced; absent until it has."},"version":{"type":"string"},"controlPlanes":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"hostKey":{"type":"string"},"summitKeyInstalled":{"type":"boolean"}},"additionalProperties":false,"required":["address","hostKey","summitKeyInstalled"]}}},"additionalProperties":false,"required":["connected","controlPlanes"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Knowledge Base"],"summary":"Issue a managed cluster's connection token, or replace it.","description":"Returns this cluster's URL and the token the managed cluster enters at Cluster Settings → Summit. The token is returned once and only its hash is stored; calling this again replaces it, and the cluster stops syncing and forwarding its audit log until it is given the new one.","operationId":"api_kb_assets_id_cluster-connection_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"token":{"type":"string"}},"additionalProperties":false,"required":["url","token"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Knowledge Base"],"summary":"Disconnect a managed cluster.","description":"Revokes the connection token and the cluster's backup credential. Audit entries and backups already received stay until they age out or the record is deleted.","operationId":"api_kb_assets_id_cluster-connection_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/cluster-backup":{"get":{"tags":["Knowledge Base"],"summary":"Get a managed cluster's backup storage.","operationId":"api_kb_assets_id_cluster-backup_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean","description":"The cluster has backup storage here, whether or not a credential is live."},"url":{"type":"string","description":"S3 URL including the bucket, as the managed cluster's backup settings take it."},"region":{"type":"string"},"accessKeyId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"secretIssuedAt":{"type":"string","format":"date-time","description":"When the secret the managed cluster holds was issued. Absent when the credential was revoked: the backups are kept and issuing a credential reaches them again."},"usage":{"type":"object","properties":{"objects":{"type":"number"},"bytes":{"type":"number"},"lastWriteAt":{"type":"string","format":"date-time","description":"When a backup last wrote to the bucket."},"truncated":{"type":"boolean","description":"Listing stopped early; the numbers are a floor."}},"additionalProperties":false,"required":["objects","bytes","truncated"]},"usageError":{"type":"string","description":"Why the bucket's contents could not be read."}},"additionalProperties":false,"required":["configured"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/cluster-audit":{"get":{"tags":["Knowledge Base"],"summary":"Get a managed cluster's forwarded audit log.","description":"Whether forwarding is set up, when the cluster was last heard from, and a page of the entries it has forwarded, newest first. The entries are redacted by the cluster before they leave it, so env values and file contents are masked and cannot be revealed here.","operationId":"api_kb_assets_id_cluster-audit_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"action","in":"query","required":false,"schema":{"type":"string"}},{"name":"entityType","in":"query","required":false,"schema":{"type":"string"}},{"name":"username","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"url":{"type":"string","description":"Where the managed cluster forwards to."},"lastSeenAt":{"type":"string","format":"date-time","description":"When the cluster last sent anything, entries or not."},"lastEntryAt":{"type":"string","format":"date-time"},"bytesUsed":{"type":"number"},"bytesCap":{"type":"number"},"retentionDays":{"type":"number"},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"receivedAt":{"type":"string","format":"date-time"},"username":{"type":"string"},"action":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"entityName":{"type":"string"},"before":{"type":"string"},"after":{"type":"string"}},"additionalProperties":false,"required":["id","timestamp","receivedAt","username","action","entityType","entityId","entityName"]}},"total":{"type":"number"}},"additionalProperties":false,"required":["configured","bytesUsed","bytesCap","retentionDays","entries","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/cluster-install":{"get":{"tags":["Knowledge Base"],"summary":"Get the progress of installing oneDeploy on a managed cluster.","description":"Admin only. The step-by-step output is the deployment log of the cluster record's id.","operationId":"api_kb_assets_id_cluster-install_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"install":{"type":"object","properties":{"state":{"type":"string","enum":["ordering","installing","installed","failed","deleting"]},"step":{"type":"string"},"error":{"type":"string"},"interrupted":{"type":"boolean","description":"Still marked as in progress, but the control plane running it has stopped reporting. The leader picks an install back up by itself within a few minutes."},"needsRestoreDetails":{"type":"boolean","description":"The install restores a backup whose request has not reached the server yet, and its restore details are not kept here (an install started before they were), so retrying it needs them again."},"restoreSource":{"type":"string","enum":["storage","s3"]},"awaitingDelivery":{"type":"boolean","description":"The server was ordered (Hetzner Robot) and the provider has not delivered it yet. Delivery can take hours; the install continues by itself once it arrives."},"orderPending":{"type":"boolean","description":"The server has not been delivered, so it can only be forgotten here, not deleted. Includes an order that failed."},"canRetry":{"type":"boolean","description":"Whether POST to this resource retries. False for an order whose placement was never confirmed: retrying could buy a second server."},"accountType":{"type":"string","description":"The provider account's type. `hetzner-robot` servers are cancelled at the end of their term rather than deleted."},"serverCreated":{"type":"boolean","description":"Whether the provider created a server, which then has to be deleted from here."},"accountName":{"type":"string"},"serverType":{"type":"string","description":"The server type's name."},"location":{"type":"string","description":"The location's city."},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["state","interrupted","needsRestoreDetails","awaitingDelivery","orderPending","canRetry","serverCreated","serverType","location","updatedAt"],"description":"Absent for a cluster documented by hand."}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Knowledge Base"],"summary":"Retry installing oneDeploy on a managed cluster.","description":"Admin only. For an install that failed. Runs the whole install again (every step is safe to repeat). While a restore request has not reached the server, `restore` replaces the kept restore details (same source as before); it is required only when none are kept.","operationId":"api_kb_assets_id_cluster-install_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"restore":{"type":"object","properties":{"source":{"type":"string","enum":["storage","s3"],"description":"Where the backup is: `storage` is the backup storage this cluster holds for the cluster being replaced, `s3` another bucket (usually its primary backup storage)."},"s3":{"type":"object","properties":{"url":{"type":"string"},"region":{"type":"string"},"accessKeyId":{"type":"string"},"accessKeySecret":{"type":"string"}},"additionalProperties":false,"required":["url","region","accessKeyId","accessKeySecret"],"description":"The bucket to restore from, as the cluster's backup settings name it. Required for `s3`."},"encryptionKey":{"type":"string","description":"The backup encryption key of the cluster being restored. Kept here only until it has been written onto the new server for its first start, then deleted; never included in this cluster's own backups."},"snapshot":{"type":"string","description":"A snapshot id, or \"latest\" (the default)."}},"additionalProperties":false,"required":["source","encryptionKey"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"install":{"type":"object","properties":{"state":{"type":"string","enum":["ordering","installing","installed","failed","deleting"]},"step":{"type":"string"},"error":{"type":"string"},"interrupted":{"type":"boolean","description":"Still marked as in progress, but the control plane running it has stopped reporting. The leader picks an install back up by itself within a few minutes."},"needsRestoreDetails":{"type":"boolean","description":"The install restores a backup whose request has not reached the server yet, and its restore details are not kept here (an install started before they were), so retrying it needs them again."},"restoreSource":{"type":"string","enum":["storage","s3"]},"awaitingDelivery":{"type":"boolean","description":"The server was ordered (Hetzner Robot) and the provider has not delivered it yet. Delivery can take hours; the install continues by itself once it arrives."},"orderPending":{"type":"boolean","description":"The server has not been delivered, so it can only be forgotten here, not deleted. Includes an order that failed."},"canRetry":{"type":"boolean","description":"Whether POST to this resource retries. False for an order whose placement was never confirmed: retrying could buy a second server."},"accountType":{"type":"string","description":"The provider account's type. `hetzner-robot` servers are cancelled at the end of their term rather than deleted."},"serverCreated":{"type":"boolean","description":"Whether the provider created a server, which then has to be deleted from here."},"accountName":{"type":"string"},"serverType":{"type":"string","description":"The server type's name."},"location":{"type":"string","description":"The location's city."},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["state","interrupted","needsRestoreDetails","awaitingDelivery","orderPending","canRetry","serverCreated","serverType","location","updatedAt"],"description":"Absent for a cluster documented by hand."}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/cluster-server":{"delete":{"tags":["Knowledge Base"],"summary":"Delete a managed cluster's server.","description":"Admin only. Deletes the server the cluster was created on at the provider (a Hetzner Robot server is cancelled at the end of its term), then the cluster asset. An ordered server that has not been delivered yet can only be forgotten. With `forget=true`, stops tracking a server already deleted in the provider's console without calling the provider.","operationId":"api_kb_assets_id_cluster-server_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"forget","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/rdp-credentials":{"get":{"tags":["Knowledge Base"],"summary":"Report whether an asset's RDP credentials are set.","operationId":"api_kb_assets_id_rdp-credentials_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"username":{"type":"string"},"domain":{"type":"string"},"recordKeyNonce":{"type":"string"}},"additionalProperties":false,"required":["configured","username","domain","recordKeyNonce"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Knowledge Base"],"summary":"Set an asset's sealed RDP credentials.","operationId":"api_kb_assets_id_rdp-credentials_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"},"domain":{"type":"string"},"dek":{"type":"string","description":"The password's data encryption key, derived from this record's own key. Required — there is no plaintext column to fall back to."}},"additionalProperties":false,"required":["username","password","dek"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"username":{"type":"string"},"domain":{"type":"string"},"recordKeyNonce":{"type":"string"}},"additionalProperties":false,"required":["configured","username","domain","recordKeyNonce"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Knowledge Base"],"summary":"Clear an asset's RDP credentials.","operationId":"api_kb_assets_id_rdp-credentials_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/rdp-session":{"post":{"tags":["Knowledge Base"],"summary":"Start a browser RDP session to a server asset.","operationId":"api_kb_assets_id_rdp-session_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"destination":{"type":"string"},"proxyUsername":{"type":"string"},"proxyPassword":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"}},"additionalProperties":false,"required":["token","destination","proxyUsername","proxyPassword","width","height"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/vnc-credentials":{"get":{"tags":["Knowledge Base"],"summary":"Report whether an asset's VNC password is set.","operationId":"api_kb_assets_id_vnc-credentials_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"recordKeyNonce":{"type":"string"}},"additionalProperties":false,"required":["configured","recordKeyNonce"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Knowledge Base"],"summary":"Set an asset's sealed VNC password.","operationId":"api_kb_assets_id_vnc-credentials_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string"},"dek":{"type":"string","description":"The password's data encryption key, derived from this record's own key. Required — there is no plaintext column to fall back to."}},"additionalProperties":false,"required":["password","dek"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"recordKeyNonce":{"type":"string"}},"additionalProperties":false,"required":["configured","recordKeyNonce"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Knowledge Base"],"summary":"Clear an asset's VNC password.","operationId":"api_kb_assets_id_vnc-credentials_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/tunnel":{"get":{"tags":["Knowledge Base"],"summary":"List an asset's tunnel daemons.","operationId":"api_kb_assets_id_tunnel_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"daemons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"meshAddress":{"type":"string"},"createdAt":{"type":"integer"},"lastSeenAt":{"type":"integer"}},"additionalProperties":false,"required":["id","label","meshAddress","createdAt"]}},"collectMetrics":{"type":"boolean"}},"additionalProperties":false,"required":["daemons","collectMetrics"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Knowledge Base"],"summary":"Enroll a tunnel daemon for an asset.","operationId":"api_kb_assets_id_tunnel_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"secret":{"type":"string"},"meshAddress":{"type":"string"}},"additionalProperties":false,"required":["id","secret","meshAddress"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/tunnel/{secretId}":{"delete":{"tags":["Knowledge Base"],"summary":"Revoke an asset tunnel daemon.","operationId":"api_kb_assets_id_tunnel_secretId_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"secretId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/collect-metrics":{"post":{"tags":["Knowledge Base"],"summary":"Enable or disable host-metrics collection for an asset.","operationId":"api_kb_assets_id_collect-metrics_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false,"required":["enabled"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"collectMetrics":{"type":"boolean"}},"additionalProperties":false,"required":["collectMetrics"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/assets/{id}/metrics":{"get":{"tags":["Knowledge Base"],"summary":"Host metrics for a KB server asset over a selectable window.","operationId":"api_kb_assets_id_metrics_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"os":{"type":"string","enum":["linux","windows"]},"collectMetrics":{"type":"boolean"},"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"start":{"type":"number"},"end":{"type":"number"},"step":{"type":"number"},"cpu":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"memoryUsed":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"memoryTotal":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"fsUsed":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"fsTotal":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"networkRx":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"networkTx":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"diskRead":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"diskWrite":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"load1":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"load5":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"load15":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"errors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["key","message"]}}},"additionalProperties":false,"required":["collectMetrics","range","start","end","step","cpu","memoryUsed","memoryTotal","fsUsed","fsTotal","networkRx","networkTx","diskRead","diskWrite","load1","load5","load15","errors"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/links":{"get":{"tags":["Knowledge Base"],"summary":"List links (related items) for an entity.","operationId":"api_kb_links_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":true,"schema":{"type":"string"}},{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"peer":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false,"required":["kind","id","name"]}},"additionalProperties":false,"required":["id","label","peer"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Knowledge Base"],"summary":"Link two items (record / vault entry).","operationId":"api_kb_links_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"aKind":{"type":"string"},"aId":{"type":"string"},"bKind":{"type":"string"},"bId":{"type":"string"},"label":{"type":"string"}},"additionalProperties":false,"required":["aKind","aId","bKind","bId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/links/{id}":{"delete":{"tags":["Knowledge Base"],"summary":"Remove a link.","operationId":"api_kb_links_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/attachments":{"get":{"tags":["Knowledge Base"],"summary":"List file attachments for a document or asset.","operationId":"api_kb_attachments_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"document","in":"query","required":false,"schema":{"type":"string"}},{"name":"asset","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"uploadedBy":{"type":"string"},"createdAt":{"type":"number"}},"additionalProperties":false,"required":["id","fileName","contentType","size","createdAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Knowledge Base"],"summary":"Upload a file attachment to a document or asset.","operationId":"api_kb_attachments_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ownerKind":{"type":"string"},"ownerId":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"data":{"type":"string"}},"additionalProperties":false,"required":["ownerId","name","data"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"createdAt":{"type":"number"}},"additionalProperties":false,"required":["id","fileName","contentType","size","createdAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/attachments/{id}/download":{"get":{"tags":["Knowledge Base"],"summary":"Download a file attachment.","operationId":"api_kb_attachments_id_download_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string"},"contentType":{"type":"string"},"data":{"type":"string"}},"additionalProperties":false,"required":["fileName","contentType","data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/kb/attachments/{id}":{"delete":{"tags":["Knowledge Base"],"summary":"Delete a file attachment.","operationId":"api_kb_attachments_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault":{"get":{"tags":["Vault"],"summary":"List all vault entries in a project.","operationId":"api_vault_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"website":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false,"required":["id","name","website","username"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Vault"],"summary":"Create a new vault entry.","operationId":"api_vault_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyNonce":{"type":"string","format":"uuid","description":"The label this entry's key is derived from, generated by the client. Not an identifier — the server assigns the entry's id."},"name":{"type":"string"},"website":{"type":"string"},"username":{"type":"string"},"encryptedPassword":{"type":"string","description":"The password, encrypted in the browser under the entry key."},"encryptedNotes":{"type":"string","description":"The notes, encrypted the same way."},"totpSecret":{"type":"string","description":"A base32 TOTP seed, in the clear. Custodial: stored encrypted and never returned."},"totpDek":{"type":"string","description":"The seed's data encryption key, derived from the entry key. Required with totpSecret; the control plane keeps no copy."}},"additionalProperties":false,"required":["keyNonce","name","website","username"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault/{id}":{"get":{"tags":["Vault"],"summary":"Get a vault entry by ID.","operationId":"api_vault_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"name":{"type":"string"},"website":{"type":"string"},"username":{"type":"string"},"totpConfigured":{"type":"boolean"},"encryptedPasswordConfigured":{"type":"boolean"},"encryptedNotes":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyNonce":{"anyOf":[{"type":"string"},{"type":"null"}]},"sealedEntryKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"access":{"type":"string","enum":["project","share"]},"createdAt":{"type":"number"},"updatedAt":{"type":"number"}},"additionalProperties":false,"required":["id","projectId","name","website","username","totpConfigured","encryptedPasswordConfigured","encryptedNotes","keyNonce","sealedEntryKey","access","createdAt","updatedAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Vault"],"summary":"Update a vault entry.","operationId":"api_vault_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"website":{"type":"string"},"username":{"type":"string"},"encryptedPassword":{"type":"string","description":"The password, encrypted in the browser under the entry key."},"encryptedNotes":{"type":"string"},"totpSecret":{"type":"string","description":"A new base32 seed in the clear, or \"\" to remove it."},"totpDek":{"type":"string","description":"The seed's derived data encryption key. Required alongside a non-empty totpSecret."}},"additionalProperties":false,"required":["name","website","username"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Vault"],"summary":"Delete a vault entry.","operationId":"api_vault_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault/{id}/reveal":{"post":{"tags":["Vault"],"summary":"Reveal a vault entry's password (audited).","operationId":"api_vault_id_reveal_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"encryptedPassword":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"required":["encryptedPassword"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault/{id}/totp":{"post":{"tags":["Vault"],"summary":"Generate the current TOTP code for a vault entry (audited).","operationId":"api_vault_id_totp_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dek":{"type":"string","description":"The seed's data encryption key, derived from the entry key. The control plane holds no copy, so there is no code without it."}},"additionalProperties":false,"required":["dek"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"secondsRemaining":{"type":"number"},"period":{"type":"number"}},"additionalProperties":false,"required":["code","secondsRemaining","period"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-keys/status":{"get":{"tags":["Vault Keys"],"summary":"Outstanding vault key work for an administrator.","operationId":"api_vault-keys_status_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"agkConfigured":{"type":"boolean"},"sealedAgk":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectsWithoutKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]}},"pendingGrants":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"projectName":{"type":"string"},"username":{"type":"string"},"identityPublicKey":{"type":"string"}},"additionalProperties":false,"required":["projectId","projectName","username","identityPublicKey"]}},"pendingAdmins":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"identityPublicKey":{"type":"string"}},"additionalProperties":false,"required":["username","identityPublicKey"]}},"membersWithoutIdentity":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false,"required":["projectId","username"]}},"projectsNeedingSshKey":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]}},"projectsNeedingSealingKey":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]}},"projectsNeedingReportKey":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"token":{"type":"string"}},"additionalProperties":false,"required":["id","name"]}},"reportDomain":{"type":"string"}},"additionalProperties":false,"required":["agkConfigured","sealedAgk","projectsWithoutKeys","pendingGrants","pendingAdmins","membersWithoutIdentity","projectsNeedingSshKey","projectsNeedingSealingKey","projectsNeedingReportKey"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-keys/bootstrap":{"post":{"tags":["Vault Keys"],"summary":"Record the admin group key for the first time.","operationId":"api_vault-keys_bootstrap_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sealedAgk":{"type":"string"}},"additionalProperties":false,"required":["sealedAgk"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-keys/save":{"post":{"tags":["Vault Keys"],"summary":"Store sealed project keys and grants.","operationId":"api_vault-keys_save_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectKeys":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"wrappedUnderAgk":{"type":"string"}},"additionalProperties":false,"required":["projectId","wrappedUnderAgk"]}},"grants":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"username":{"type":"string"},"sealedKey":{"type":"string","description":"Project key sealed to the member's key."}},"additionalProperties":false,"required":["projectId","username","sealedKey"]}},"adminGrants":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"sealedAgk":{"type":"string"}},"additionalProperties":false,"required":["username","sealedAgk"]}},"sshKeys":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"dek":{"type":"string","description":"The SSH key's data encryption key, derived from this project's key. The control plane encrypts with it and keeps no copy."}},"additionalProperties":false,"required":["projectId","dek"]},"description":"Projects to provision an SSH key for. Skipped where one already exists — the public half is installed on machines oneDeploy does not administer, so a key is never regenerated."},"sealingKeys":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"publicKey":{"type":"string","description":"Base64 X-Wing public key whose seed is derived from this project's key."}},"additionalProperties":false,"required":["projectId","publicKey"]},"description":"Projects to record a sealing key for. Skipped where one already exists — replacing it would strand everything already sealed to it."},"reportKeys":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"token":{"type":"string","description":"The report address's tag the key's user id names: the project's own when it has one, else a fresh draw."},"fingerprint":{"type":"string"},"publicKey":{"type":"string","description":"Armored OpenPGP public key."},"encryptedSecretKey":{"type":"string","description":"The armored secret key, wrapped under reportKeyDek(PK_p). The control plane cannot open it."}},"additionalProperties":false,"required":["projectId","token","fingerprint","publicKey","encryptedSecretKey"]},"description":"Vulnerability-report PGP keys made in the browser. Skipped where the project already has one, where its address has another token, or where the token is taken; the next pass picks those up again."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"projectKeys":{"type":"integer"},"grants":{"type":"integer"},"adminGrants":{"type":"integer"},"sshKeys":{"type":"integer","description":"How many SSH keys were provisioned."},"sealingKeys":{"type":"integer","description":"How many sealing keys were recorded."},"reportKeys":{"type":"integer","description":"How many report keys were recorded."}},"additionalProperties":false,"required":["projectKeys","grants","adminGrants","sshKeys","sealingKeys","reportKeys"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-keys/identity/{username}":{"get":{"tags":["Vault Keys"],"summary":"Fetch a user's published identity key.","operationId":"api_vault-keys_identity_username_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"identityPublicKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"required":["username","identityPublicKey"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-keys/project/{id}":{"get":{"tags":["Vault Keys"],"summary":"Fetch the caller's sealed copy of a project key.","operationId":"api_vault-keys_project_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"sealedKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"wrappedUnderAgk":{"anyOf":[{"type":"string"},{"type":"null"}]},"sealedAgk":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"required":["sealedKey","wrappedUnderAgk","sealedAgk"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-shares/mine":{"get":{"tags":["Vault"],"summary":"List vault entries shared with the caller.","operationId":"api_vault-shares_mine_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"shareId":{"type":"string"},"entryId":{"type":"string"},"name":{"type":"string"},"website":{"type":"string"},"username":{"type":"string"},"projectName":{"type":"string"},"sharedBy":{"type":"string"},"createdAt":{"type":"number"},"expiresAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false,"required":["shareId","entryId","name","website","username","projectName","sharedBy","createdAt","expiresAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-shares/entry/{id}":{"get":{"tags":["Vault"],"summary":"List the shares and links on a vault entry.","operationId":"api_vault-shares_entry_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"number"},"expiresAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false,"required":["id","username","createdBy","createdAt","expiresAt"]}},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"number"},"expiresAt":{"type":"number"},"views":{"type":"number"},"maxViews":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastViewedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false,"required":["id","label","createdBy","createdAt","expiresAt","views","maxViews","lastViewedAt"]}}},"additionalProperties":false,"required":["users","links"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-shares/entry/{id}/user":{"post":{"tags":["Vault"],"summary":"Share a vault entry with another user.","operationId":"api_vault-shares_entry_id_user_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"sealedKey":{"type":"string","description":"The entry key, sealed to the recipient's identity key."},"expiresAt":{"type":"number","description":"Epoch ms, at most 90 days out. Omit for no expiry — deleting the account still revokes it."}},"additionalProperties":false,"required":["username","sealedKey"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-shares/entry/{id}/link":{"post":{"tags":["Vault"],"summary":"Create a sharing link for a vault entry.","operationId":"api_vault-shares_entry_id_link_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"The link's auth token, base64. Stored hashed; derived by the client from the link secret, which never leaves the browser."},"wrappedKey":{"type":"string","description":"The entry key wrapped under the link's wrap key, which is derived from the same secret and never sent."},"label":{"type":"string","maxLength":200,"description":"A note for the creator about who it went to."},"expiresAt":{"type":"number"},"maxViews":{"type":"integer","minimum":1,"maximum":1000}},"additionalProperties":false,"required":["token","wrappedKey"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-shares/user/{id}":{"delete":{"tags":["Vault"],"summary":"Withdraw a vault entry share.","operationId":"api_vault-shares_user_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-shares/link/{id}":{"delete":{"tags":["Vault"],"summary":"Revoke a vault sharing link.","operationId":"api_vault-shares_link_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-shares/open":{"post":{"tags":["Vault"],"summary":"Open a vault sharing link.","operationId":"api_vault-shares_open_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"additionalProperties":false,"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"website":{"type":"string"},"username":{"type":"string"},"wrappedKey":{"type":"string"},"encryptedPassword":{"anyOf":[{"type":"string"},{"type":"null"}]},"encryptedNotes":{"anyOf":[{"type":"string"},{"type":"null"}]},"totpConfigured":{"type":"boolean"},"sharedBy":{"type":"string"},"viewsRemaining":{"anyOf":[{"type":"number"},{"type":"null"}]},"expiresAt":{"type":"number"},"codeSessionToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"codeSessionExpiresAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false,"required":["name","website","username","wrappedKey","encryptedPassword","encryptedNotes","totpConfigured","sharedBy","viewsRemaining","expiresAt","codeSessionToken","codeSessionExpiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-shares/open/totp":{"post":{"tags":["Vault"],"summary":"Generate a one-time code through a vault sharing link.","operationId":"api_vault-shares_open_totp_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionToken":{"type":"string","description":"The code session minted by POST /api/vault-shares/open. Not the link token — see the note above."},"dek":{"type":"string","description":"The TOTP seed's data encryption key, derived from the entry key the holder unwrapped."}},"additionalProperties":false,"required":["sessionToken","dek"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"secondsRemaining":{"type":"number"},"period":{"type":"number"}},"additionalProperties":false,"required":["code","secondsRemaining","period"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/file-drop/open":{"post":{"tags":["File drops"],"summary":"Open a file-drop link.","description":"What the upload page needs: the drop's name, its expiry, the room left, and the public key files are encrypted to.","operationId":"api_file-drop_open_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"additionalProperties":false,"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"createdBy":{"type":"string"},"expiresAt":{"type":"string"},"sealingPublicKey":{"type":"string"},"bytesLeft":{"type":"number"},"filesLeft":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false,"required":["label","createdBy","expiresAt","sealingPublicKey","bytesLeft","filesLeft"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/file-drop/files":{"post":{"tags":["File drops"],"summary":"Start uploading a file into a file drop.","description":"Records the file's sealed content key and sealed metadata, and reserves its ciphertext size against the drop's and the project's limits.","operationId":"api_file-drop_files_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"sealedKey":{"type":"string"},"sealedMeta":{"type":"string"},"size":{"type":"number"}},"additionalProperties":false,"required":["token","sealedKey","sealedMeta","size"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string"},"parts":{"type":"number"}},"additionalProperties":false,"required":["fileId","parts"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/file-drop/files/{fileId}/parts/{index}":{"put":{"tags":["File drops"],"summary":"Upload one part of a file.","description":"The body is the part's ciphertext, exactly the length the file's size implies. The link token is sent in the X-File-Drop-Token header rather than the URL, which is traced.","operationId":"api_file-drop_files_fileId_parts_index_put","security":[],"parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"string"}},{"name":"x-file-drop-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/file-drop/files/{fileId}/complete":{"post":{"tags":["File drops"],"summary":"Finish uploading a file.","operationId":"api_file-drop_files_fileId_complete_post","security":[],"parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"additionalProperties":false,"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/file-share/open":{"post":{"tags":["File drops"],"summary":"Open a share link to a file.","description":"Spends one of the link's opens and returns the file's content key wrapped under the link's wrap key, its sealed metadata, and a download session for its parts.","operationId":"api_file-share_open_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"additionalProperties":false,"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"wrappedKey":{"type":"string"},"sealedMeta":{"type":"string"},"size":{"type":"number"},"sharedBy":{"type":"string"},"expiresAt":{"type":"string"},"viewsRemaining":{"anyOf":[{"type":"number"},{"type":"null"}]},"sessionToken":{"type":"string"},"sessionExpiresAt":{"type":"string"}},"additionalProperties":false,"required":["wrappedKey","sealedMeta","size","sharedBy","expiresAt","viewsRemaining","sessionToken","sessionExpiresAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/file-share/parts/{index}":{"get":{"tags":["File drops"],"summary":"Download one encrypted part of a shared file.","description":"Authorized by the download session from opening the link, sent in X-File-Share-Session rather than the URL, which is traced.","operationId":"api_file-share_parts_index_get","security":[],"parameters":[{"name":"index","in":"path","required":true,"schema":{"type":"string"}},{"name":"x-file-share-session","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/passkeys":{"get":{"tags":["Passkeys"],"summary":"List custodial passkeys.","operationId":"api_passkeys_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":false,"schema":{"type":"string"}},{"name":"entry","in":"query","required":false,"schema":{"type":"string"}},{"name":"rpId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"vaultEntryId":{"type":"string"},"credentialId":{"type":"string"},"rpId":{"type":"string"},"origin":{"type":"string"},"userName":{"type":"string"},"label":{"type":"string"},"entryName":{"anyOf":[{"type":"string"},{"type":"null"}]},"entryUsername":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectName":{"type":"string"},"entryKeyNonce":{"anyOf":[{"type":"string"},{"type":"null"}]},"dekNonce":{"type":"string"},"sealedEntryKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"number"},"lastUsedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false,"required":["id","projectId","vaultEntryId","credentialId","rpId","origin","userName","label","entryName","entryUsername","projectName","entryKeyNonce","dekNonce","sealedEntryKey","createdAt","lastUsedAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/passkeys/register":{"post":{"tags":["Passkeys"],"summary":"Register a custodial passkey (WebAuthn create).","operationId":"api_passkeys_register_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"origin":{"type":"string","description":"The true top-level origin, e.g. https://github.com."},"challenge":{"type":"string","description":"The relying party's challenge, base64url."},"rpId":{"type":"string","description":"RP ID; defaults to the origin host."},"userHandle":{"type":"string","description":"The RP's user.id (base64url), stored for usernameless flows."},"userName":{"type":"string"},"algs":{"type":"array","items":{"type":"number"},"description":"Accepted COSE algorithm ids from pubKeyCredParams."},"attestation":{"type":"string","enum":["none","indirect","direct","enterprise"],"description":"The relying party's attestation conveyance preference. Defaults to 'none', which returns a zero AAGUID and fmt='none' exactly as before attestation existed; anything else returns a 'packed' statement signed by this cluster's attestation key."},"dek":{"type":"string","description":"A data encryption key, base64. The private key is stored encrypted under it and never in plaintext."},"prfDek":{"type":"string","description":"The PRF seed's data encryption key, base64, derived from the same entry key and dek nonce. Required: the seed is minted here, in the one request whose caller is provably a project member, so no later writer can choose the key it lands under."},"label":{"type":"string","description":"User-facing name for this passkey."},"vaultEntryId":{"type":"string","description":"The vault entry this passkey belongs to (required)."},"dekNonce":{"type":"string","format":"uuid","description":"The label this row's DEK is derived from, generated by the client. Required because the DEK has to exist before anything can be encrypted under it; a nonce rather than the row id, so nothing caller-supplied lands on a primary key. The server assigns the id."}},"additionalProperties":false,"required":["origin","challenge","dek","prfDek","vaultEntryId","dekNonce"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"credentialId":{"type":"string"},"attestationObject":{"type":"string"},"clientDataJson":{"type":"string"},"authenticatorData":{"type":"string"},"publicKey":{"type":"string"},"publicKeyAlgorithm":{"type":"number"},"attestationFormat":{"type":"string","enum":["none","packed"]}},"additionalProperties":false,"required":["id","credentialId","attestationObject","clientDataJson","authenticatorData","publicKey","publicKeyAlgorithm","attestationFormat"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/passkeys/assert":{"post":{"tags":["Passkeys"],"summary":"Sign a WebAuthn assertion with a custodial passkey (WebAuthn get).","operationId":"api_passkeys_assert_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"credentialId":{"type":"string","description":"base64url credential ID to sign with."},"origin":{"type":"string","description":"The true top-level origin, e.g. https://github.com."},"challenge":{"type":"string","description":"The relying party's challenge, base64url."},"rpId":{"type":"string","description":"RP ID; must match the credential's."},"dek":{"type":"string","description":"The credential's data encryption key, base64. Required once the passkey is protected; the control plane holds no copy."}},"additionalProperties":false,"required":["credentialId","origin","challenge"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"authenticatorData":{"type":"string"},"clientDataJson":{"type":"string"},"signature":{"type":"string"},"userHandle":{"type":"string"}},"additionalProperties":false,"required":["authenticatorData","clientDataJson","signature","userHandle"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/passkeys/prf-derive":{"post":{"tags":["Passkeys"],"summary":"Derive a passkey's PRF outputs from its DEK-protected seed.","operationId":"api_passkeys_prf-derive_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"salts":{"type":"array","items":{"type":"string"},"description":"One or two 32-byte PRF salts, base64."},"dek":{"type":"string","description":"The seed's data encryption key, base64."}},"additionalProperties":false,"required":["id","salts","dek"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"outputs":{"type":"array","items":{"type":"string"},"description":"One 32-byte PRF output per salt, base64."}},"additionalProperties":false,"required":["outputs"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/passkeys/projects":{"get":{"tags":["Passkeys"],"summary":"List the caller's projects (for the extension picker).","operationId":"api_passkeys_projects_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/passkeys/entries":{"get":{"tags":["Passkeys"],"summary":"List vault entries (non-secret) for the picker / autofill.","operationId":"api_passkeys_entries_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"},"website":{"type":"string"},"totpConfigured":{"type":"boolean"},"keyNonce":{"anyOf":[{"type":"string"},{"type":"null"}]},"sealedEntryKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectId":{"type":"string"},"projectName":{"type":"string"}},"additionalProperties":false,"required":["id","name","username","website","totpConfigured","keyNonce","sealedEntryKey","projectId","projectName"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Passkeys"],"summary":"Create a bare vault entry to bind a new passkey to.","operationId":"api_passkeys_entries_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"username":{"type":"string","maxLength":200},"keyNonce":{"type":"string","format":"uuid","description":"The label this entry's key is derived from, generated by the client. Not an identifier — the server assigns the entry's id."}},"additionalProperties":false,"required":["name","keyNonce"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/passkeys/{id}":{"put":{"tags":["Passkeys"],"summary":"Rename or relink a custodial passkey.","operationId":"api_passkeys_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"vaultEntryId":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Passkeys"],"summary":"Revoke a custodial passkey.","operationId":"api_passkeys_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ssh-keys":{"get":{"tags":["SSH Keys"],"summary":"List custodial SSH keys.","operationId":"api_ssh-keys_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":false,"schema":{"type":"string"}},{"name":"entry","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"vaultEntryId":{"type":"string"},"label":{"type":"string"},"keyType":{"type":"string"},"publicKey":{"type":"string"},"entryKeyNonce":{"anyOf":[{"type":"string"},{"type":"null"}]},"dekNonce":{"type":"string"},"sealedEntryKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"usable":{"type":"boolean"},"entryName":{"anyOf":[{"type":"string"},{"type":"null"}]},"entryUsername":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"number"},"lastUsedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false,"required":["id","projectId","vaultEntryId","label","keyType","publicKey","entryKeyNonce","dekNonce","sealedEntryKey","usable","entryName","entryUsername","createdAt","lastUsedAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["SSH Keys"],"summary":"Create a custodial SSH key (generated or imported).","operationId":"api_ssh-keys_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","description":"User-facing name for this key."},"dekNonce":{"type":"string","format":"uuid","description":"The label this row's DEK is derived from, generated by the client. Required because the DEK has to exist before anything can be encrypted under it; a nonce rather than the row id, so nothing caller-supplied lands on a primary key. The server assigns the id."},"vaultEntryId":{"type":"string","description":"The vault entry this key belongs to (required)."},"privateKey":{"type":"string","description":"An existing OpenSSH ed25519 private key to import. Omit to generate a new one."},"dek":{"type":"string","description":"A data encryption key, base64. The private key is stored encrypted under it and never in plaintext."}},"additionalProperties":false,"required":["dekNonce","vaultEntryId","dek"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"keyType":{"type":"string"},"publicKey":{"type":"string"},"createdAt":{"type":"number"}},"additionalProperties":false,"required":["id","label","keyType","publicKey","createdAt"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ssh-keys/sign":{"post":{"tags":["SSH Keys"],"summary":"Sign data with a custodial SSH key.","operationId":"api_ssh-keys_sign_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string"},"data":{"type":"string","description":"The bytes to sign, base64."},"dek":{"type":"string","description":"The key's data encryption key, base64, unwrapped with the project key."}},"additionalProperties":false,"required":["keyId","data","dek"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"signature":{"type":"string","description":"The SSH agent signature blob, base64."}},"additionalProperties":false,"required":["signature"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/ssh-keys/{id}":{"put":{"tags":["SSH Keys"],"summary":"Rename or relink a custodial SSH key.","operationId":"api_ssh-keys_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"vaultEntryId":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["SSH Keys"],"summary":"Revoke a custodial SSH key.","operationId":"api_ssh-keys_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-tokens":{"get":{"tags":["Vault Tokens"],"summary":"List the caller's vault access tokens.","operationId":"api_vault-tokens_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"createdAt":{"type":"number"},"lastUsedAt":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false,"required":["id","label","createdAt","lastUsedAt"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vault-tokens/{id}":{"delete":{"tags":["Vault Tokens"],"summary":"Revoke a vault access token.","operationId":"api_vault-tokens_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/observe/project":{"get":{"tags":["Observability API"],"summary":"Show which project this token reads.","description":"A cheap way to check a token works and see what it reaches. Authenticate with `Authorization: Bearer <token>` (or HTTP Basic with the token as the password).","operationId":"api_observe_project_get","security":[{"observabilityToken":[]}],"parameters":[{"name":"project","in":"query","description":"Project id. Required with a personal API token (`oda_`), which spans projects; omit it with an observability token (`odo_`), which is its project.","required":false,"schema":{"type":"string","description":"Project id. Required with a personal API token (`oda_`), which spans projects; omit it with an observability token (`odo_`), which is its project."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false,"required":["id","name"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/observe/logs":{"get":{"tags":["Observability API"],"summary":"Query the project's container logs.","description":"Returns log lines from the token's project, filtered by service, container and a literal substring. The window defaults to the last hour; retention is 7 days. `truncated` is true when the result hit `limit` — page further back by passing the oldest returned `timestamp` as the next `end`. For anything these filters can't express, use `POST /api/observe/logs/sql`.","operationId":"api_observe_logs_get","security":[{"observabilityToken":[]}],"parameters":[{"name":"project","in":"query","description":"Project id. Required with a personal API token (`oda_`), which spans projects; omit it with an observability token (`odo_`), which is its project.","required":false,"schema":{"type":"string","description":"Project id. Required with a personal API token (`oda_`), which spans projects; omit it with an observability token (`odo_`), which is its project."}},{"name":"service","in":"query","description":"Service NAME. Omit for every service in the project.","required":false,"schema":{"type":"string","description":"Service NAME. Omit for every service in the project."}},{"name":"container","in":"query","description":"Container id.","required":false,"schema":{"type":"string","description":"Container id."}},{"name":"search","in":"query","description":"Literal substring the line must contain.","required":false,"schema":{"type":"string","description":"Literal substring the line must contain."}},{"name":"start","in":"query","description":"RFC 3339. Defaults to one hour before `end`.","required":false,"schema":{"type":"string","description":"RFC 3339. Defaults to one hour before `end`."}},{"name":"end","in":"query","description":"RFC 3339. Defaults to now.","required":false,"schema":{"type":"string","description":"RFC 3339. Defaults to now."}},{"name":"limit","in":"query","description":"Maximum lines, 1–10000. Default 1000.","required":false,"schema":{"type":"string","description":"Maximum lines, 1–10000. Default 1000."}},{"name":"direction","in":"query","description":"`backward` (default) returns the newest lines first; `forward` the oldest first.","required":false,"schema":{"type":"string","enum":["backward","forward"],"description":"`backward` (default) returns the newest lines first; `forward` the oldest first."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"service":{"type":"string"},"container":{"type":"string"},"line":{"type":"string"}},"additionalProperties":false,"required":["timestamp","service","container","line"]}},"truncated":{"type":"boolean"}},"additionalProperties":false,"required":["lines","truncated"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/observe/logs/sql":{"post":{"tags":["Observability API"],"summary":"Run an OpenObserve SQL query against the project's logs.","description":"Executes OpenObserve SQL within the token's project. Container logs are the `default` stream (line in `body`, time in `_timestamp` as µs, plus `service_name` and `id` = container id); `SELECT * FROM default LIMIT 1` shows the available columns. The time window (default: last hour) is applied by OpenObserve in addition to any WHERE clause. Rows are returned as OpenObserve produced them.","operationId":"api_observe_logs_sql_post","security":[{"observabilityToken":[]}],"parameters":[{"name":"project","in":"query","description":"Project id. Required with a personal API token (`oda_`), which spans projects; omit it with an observability token (`odo_`), which is its project.","required":false,"schema":{"type":"string","description":"Project id. Required with a personal API token (`oda_`), which spans projects; omit it with an observability token (`odo_`), which is its project."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sql":{"type":"string","minLength":1,"maxLength":20000},"start":{"type":"string","description":"RFC 3339. Defaults to one hour before `end`."},"end":{"type":"string","description":"RFC 3339. Defaults to now."},"limit":{"type":"integer","minimum":1,"maximum":10000,"description":"Row cap, 1–10000. Default 1000."}},"additionalProperties":false,"required":["sql"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","additionalProperties":{}}},"truncated":{"type":"boolean"}},"additionalProperties":false,"required":["rows","truncated"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-audit":{"post":{"tags":["Cluster Manager"],"summary":"Receive audit log entries forwarded by a managed cluster.","description":"Called by a managed cluster's leader, with the token the cluster manager issued for it. Entries are stored once and never replaced: an id already stored is skipped. An empty batch is a heartbeat. Entries older than the retention are accepted and dropped. 507 when the cluster's storage here is full.","operationId":"api_cluster-audit_post","security":[{"auditForwardToken":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":1000},"timestamp":{"type":"string","format":"date-time"},"username":{"type":"string","maxLength":1000},"action":{"type":"string","maxLength":1000},"entityType":{"type":"string","maxLength":1000},"entityId":{"type":"string","maxLength":1000},"entityName":{"type":"string","maxLength":1000},"before":{"type":["string","null"],"maxLength":262144},"after":{"type":["string","null"],"maxLength":262144}},"additionalProperties":false,"required":["id","timestamp","username","action","entityType","entityId","entityName","before","after"]},"maxItems":100}},"additionalProperties":false,"required":["entries"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"stored":{"type":"number","description":"Entries newly stored by this request."}},"additionalProperties":false,"required":["stored"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/summit/sync":{"post":{"tags":["Cluster Manager"],"summary":"Sync a cluster connected to this cluster manager.","description":"Called by a managed cluster's leader with the connection token issued for it. Records the control planes it reports, and answers with this cluster's SSH public key (which the managed cluster installs on each of its control planes), where to forward its audit log, and the bucket its second platform-backup copy goes to. With `backupCredential`, also issues a credential for that bucket, replacing the secret held before.","operationId":"api_summit_sync_post","security":[{"summitConnection":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"backupCredential":{"type":"boolean"},"version":{"type":"string","maxLength":200},"controlPlanes":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","maxLength":64},"hostKey":{"type":"string","maxLength":2000},"summitKeyInstalled":{"type":"boolean"}},"additionalProperties":false,"required":["address","hostKey","summitKeyInstalled"]},"maxItems":16}},"additionalProperties":false,"required":["backupCredential","version","controlPlanes"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"sshPublicKey":{"type":"string"},"auditIngestUrl":{"type":"string"},"backupUrl":{"type":"string"},"backupCredential":{"type":"object","properties":{"url":{"type":"string"},"region":{"type":"string"},"accessKeyId":{"type":"string"},"secretAccessKey":{"type":"string"}},"additionalProperties":false,"required":["url","region","accessKeyId","secretAccessKey"]}},"additionalProperties":false,"required":["sshPublicKey","auditIngestUrl","backupUrl"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/json/v3/ping":{"post":{"tags":["Porkbun-compatible DNS API"],"summary":"Check the API key.","description":"Porkbun JSON API v3. Authenticate with a DNS API key's apikey and secretapikey in the JSON body.","operationId":"api_json_v3_ping_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/json/v3/dns/create/{domain}":{"post":{"tags":["Porkbun-compatible DNS API"],"summary":"Create a DNS record.","description":"Porkbun JSON API v3. Authenticate with a DNS API key's apikey and secretapikey in the JSON body.","operationId":"api_json_v3_dns_create_domain_post","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/json/v3/dns/edit/{domain}/{id}":{"post":{"tags":["Porkbun-compatible DNS API"],"summary":"Edit a DNS record by id.","description":"Porkbun JSON API v3. Authenticate with a DNS API key's apikey and secretapikey in the JSON body.","operationId":"api_json_v3_dns_edit_domain_id_post","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/json/v3/dns/editByNameType/{domain}/{type}":{"post":{"tags":["Porkbun-compatible DNS API"],"summary":"Edit every record with a name and type (at the domain itself).","description":"Porkbun JSON API v3. Authenticate with a DNS API key's apikey and secretapikey in the JSON body.","operationId":"api_json_v3_dns_editByNameType_domain_type_post","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/json/v3/dns/editByNameType/{domain}/{type}/{subdomain}":{"post":{"tags":["Porkbun-compatible DNS API"],"summary":"Edit every record with a name and type.","description":"Porkbun JSON API v3. Authenticate with a DNS API key's apikey and secretapikey in the JSON body.","operationId":"api_json_v3_dns_editByNameType_domain_type_subdomain_post","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"subdomain","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/json/v3/dns/delete/{domain}/{id}":{"post":{"tags":["Porkbun-compatible DNS API"],"summary":"Delete a DNS record by id.","description":"Porkbun JSON API v3. Authenticate with a DNS API key's apikey and secretapikey in the JSON body.","operationId":"api_json_v3_dns_delete_domain_id_post","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/json/v3/dns/deleteByNameType/{domain}/{type}":{"post":{"tags":["Porkbun-compatible DNS API"],"summary":"Delete every record with a name and type (at the domain itself).","description":"Porkbun JSON API v3. Authenticate with a DNS API key's apikey and secretapikey in the JSON body.","operationId":"api_json_v3_dns_deleteByNameType_domain_type_post","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/json/v3/dns/deleteByNameType/{domain}/{type}/{subdomain}":{"post":{"tags":["Porkbun-compatible DNS API"],"summary":"Delete every record with a name and type.","description":"Porkbun JSON API v3. Authenticate with a DNS API key's apikey and secretapikey in the JSON body.","operationId":"api_json_v3_dns_deleteByNameType_domain_type_subdomain_post","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"subdomain","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/json/v3/dns/retrieve/{domain}":{"post":{"tags":["Porkbun-compatible DNS API"],"summary":"List the DNS records of a domain.","description":"Porkbun JSON API v3. Authenticate with a DNS API key's apikey and secretapikey in the JSON body.","operationId":"api_json_v3_dns_retrieve_domain_post","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/json/v3/dns/retrieve/{domain}/{id}":{"post":{"tags":["Porkbun-compatible DNS API"],"summary":"Get one DNS record by id.","description":"Porkbun JSON API v3. Authenticate with a DNS API key's apikey and secretapikey in the JSON body.","operationId":"api_json_v3_dns_retrieve_domain_id_post","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/json/v3/dns/retrieveByNameType/{domain}/{type}":{"post":{"tags":["Porkbun-compatible DNS API"],"summary":"List the records with a name and type (at the domain itself).","description":"Porkbun JSON API v3. Authenticate with a DNS API key's apikey and secretapikey in the JSON body.","operationId":"api_json_v3_dns_retrieveByNameType_domain_type_post","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/json/v3/dns/retrieveByNameType/{domain}/{type}/{subdomain}":{"post":{"tags":["Porkbun-compatible DNS API"],"summary":"List the records with a name and type.","description":"Porkbun JSON API v3. Authenticate with a DNS API key's apikey and secretapikey in the JSON body.","operationId":"api_json_v3_dns_retrieveByNameType_domain_type_subdomain_post","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"path","required":true,"schema":{"type":"string"}},{"name":"subdomain","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/status/project/{projectId}/feed":{"get":{"tags":["Status"],"summary":"RSS feed for project incidents.","operationId":"api_status_project_projectId_feed_get","security":[],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/status/project/{projectId}":{"get":{"tags":["Status"],"summary":"Get aggregated public status for a project.","operationId":"api_status_project_projectId_get","security":[],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"projectName":{"type":"string"},"status":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"status":{"type":"string"},"latencyMs":{"type":"number"},"uptime90d":{"type":"number"},"latencyTimeline":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"integer"},"latencyMs":{"type":"number"}},"additionalProperties":false,"required":["timestamp","latencyMs"]}},"history":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"status":{"type":"string"},"uptime":{"type":"number"},"latencyMs":{"type":"number"}},"additionalProperties":false,"required":["date","status","uptime"]}}},"additionalProperties":false,"required":["domain","status","uptime90d","latencyTimeline","history"]}},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"closedAt":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"message":{"type":"string"}},"additionalProperties":false,"required":["timestamp","message"]}}},"additionalProperties":false,"required":["id","title","severity","status","createdAt","events"]}}},"additionalProperties":false,"required":["projectName","status","services","incidents"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/status/candidates":{"get":{"tags":["Status"],"summary":"List public ingress services that can be added to a status page.","operationId":"api_status_candidates_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"services":{"type":"array","items":{"type":"object","properties":{"record":{"type":"string"},"fqdn":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"serviceName":{"type":"string"}},"additionalProperties":false,"required":["record","fqdn","projectId","projectName","serviceName"]}}},"additionalProperties":false,"required":["services"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/status/host/{domain}":{"get":{"tags":["Status"],"summary":"Get the public status page served on a custom domain.","operationId":"api_status_host_domain_get","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"showLatency":{"type":"boolean"},"status":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"displayName":{"type":"string"},"status":{"type":"string"},"latencyMs":{"type":"number"},"uptime90d":{"type":"number"},"latencyTimeline":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"integer"},"latencyMs":{"type":"number"}},"additionalProperties":false,"required":["timestamp","latencyMs"]}},"history":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"status":{"type":"string"},"uptime":{"type":"number"},"latencyMs":{"type":"number"}},"additionalProperties":false,"required":["date","status","uptime"]}}},"additionalProperties":false,"required":["domain","status","uptime90d","latencyTimeline","history"]}},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"closedAt":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"message":{"type":"string"}},"additionalProperties":false,"required":["timestamp","message"]}}},"additionalProperties":false,"required":["id","title","severity","status","createdAt","events"]}}},"additionalProperties":false,"required":["title","showLatency","status","services","incidents"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/status/{domain}":{"get":{"tags":["Status"],"summary":"Resolve a domain to its project status page.","operationId":"api_status_domain_get","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/canvas-groups":{"get":{"tags":["Canvas"],"summary":"List canvas groups for a project.","operationId":"api_canvas-groups_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"canvasX":{"type":"number"},"canvasY":{"type":"number"}},"additionalProperties":false,"required":["id","name","canvasX","canvasY"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/templates":{"get":{"tags":["Templates"],"summary":"List available service templates.","operationId":"api_templates_get","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"longDescription":{"type":"string"},"logoUrl":{"type":"string"},"group":{"type":"array","items":{"type":"string"}},"services":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"nameSuffix":{"type":"string"},"description":{"type":"string"},"registryUrl":{"type":"string"},"image":{"type":"string"},"defaultVolumes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"mountPath":{"type":"string"},"storage":{"type":"integer"},"diskType":{"type":"string"},"filesystem":{"type":"string","enum":["ext4","xfs"]},"layout":{"type":"string","enum":["mirrored","striped"]},"encrypted":{"type":"boolean"},"temporary":{"type":"boolean"}},"additionalProperties":false,"required":["name","mountPath","storage","diskType"]}},"command":{"type":"string"},"privileged":{"type":"boolean"},"user":{"type":"string"},"env":{"type":"object","additionalProperties":{"type":"string"}},"files":{"type":"object","additionalProperties":{"type":"object","properties":{"content":{"type":"string"},"mode":{"type":"string"},"owner":{"type":"integer"}},"additionalProperties":false,"required":["content"]}},"accesses":{"type":"array","items":{"type":"object","properties":{"serviceKey":{"type":"string"},"proto":{"type":"string","enum":["tcp","udp"]},"port":{"type":"integer"}},"additionalProperties":false,"required":["serviceKey","proto"]}},"metrics":{"type":"string"},"addHook":{"type":"string"},"deleteHook":{"type":"string"},"defaultCpu":{"type":"integer"},"defaultMemory":{"type":"integer"},"shmSize":{"type":"integer"},"dockerStorage":{"type":"integer"},"replicas":{"type":"integer"},"udpPort":{"type":"boolean"},"runtime":{"type":"string","enum":["gvisor","kata"]},"blockEgress":{"type":"boolean"},"readOnly":{"type":"boolean"},"tmpfsMounts":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"sizeMib":{"type":"integer"}},"additionalProperties":false,"required":["path"]}},"ingress":{"type":"object","properties":{"port":{"type":"integer"},"healthCheckPath":{"type":"string"},"public":{"type":"boolean"},"firewall":{"type":"array","items":{"type":"string"},"description":"Default allowlist for a non-public ingress, e.g. [\"@members\"]. Omitted = empty, which admits nobody until someone is added."},"exceptions":{"type":"array","items":{"type":"string"},"description":"Paths served without the sign-in check on a non-public ingress, e.g. [\"/webhook/*\"]."},"rateLimit":{"type":"integer"}},"additionalProperties":false,"required":["port"]},"tcpIngress":{"type":"object","properties":{"label":{"type":"string"},"port":{"type":"integer"},"useUdpPort":{"type":"boolean"}},"additionalProperties":false,"description":"A second, TCP-mode ingress (TCP over TLS on port 443), always public."}},"additionalProperties":false,"required":["key","nameSuffix","description","registryUrl","image","defaultVolumes","command","privileged","env","files","accesses","defaultCpu","defaultMemory","replicas"]}},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"boolean"},"services":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string"},"tcpPorts":{"type":"array","items":{"type":"object","properties":{"containerPort":{"type":"integer"}},"additionalProperties":false,"required":["containerPort"]}}},"additionalProperties":false,"required":["service"]}}},"additionalProperties":false,"required":["key","label","default","services"]}}},"additionalProperties":false,"required":["id","name","description","longDescription","logoUrl","group","services"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster/resources":{"get":{"tags":["Cluster"],"summary":"Get cluster-wide resource overview.","operationId":"api_cluster_resources_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"cluster":{"type":"object","properties":{"totalCpu":{"type":"integer"},"totalMemory":{"type":"integer"},"totalStorage":{"type":"object","additionalProperties":{"type":"integer"}},"usedCpu":{"type":"integer"},"usedMemory":{"type":"integer"},"usedStorage":{"type":"object","additionalProperties":{"type":"integer"}},"reserveCpu":{"type":"integer"},"reserveMemory":{"type":"integer"},"reserveStorage":{"type":"object","additionalProperties":{"type":"integer"}}},"additionalProperties":false,"required":["totalCpu","totalMemory","totalStorage","usedCpu","usedMemory","usedStorage","reserveCpu","reserveMemory","reserveStorage"]},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"region":{"type":"string"},"cpu":{"type":"integer"},"memory":{"type":"integer"},"storage":{"type":"object","additionalProperties":{"type":"integer"}},"usedCpu":{"type":"integer"},"usedMemory":{"type":"integer"},"usedStorage":{"type":"object","additionalProperties":{"type":"integer"}},"cpuReserve":{"type":"integer"},"memoryReserve":{"type":"integer"},"storageReserve":{"type":"integer"},"schedulable":{"type":"boolean","description":"Whether containers can be placed on this node at all. False for a custom-domain gateway, whose capacity is deliberately unusable and is excluded from the cluster totals above."}},"additionalProperties":false,"required":["id","address","region","cpu","memory","storage","usedCpu","usedMemory","usedStorage","cpuReserve","memoryReserve","storageReserve","schedulable"]}},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"cpu":{"type":"integer"},"memory":{"type":"integer"},"storage":{"type":"object","additionalProperties":{"type":"integer"}},"quotaCpu":{"type":"integer"},"quotaMemory":{"type":"integer"},"quotaStorage":{"type":"object","additionalProperties":{"type":"integer"}}},"additionalProperties":false,"required":["id","name","cpu","memory","storage","quotaCpu","quotaMemory","quotaStorage"]}},"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"containers":{"type":"integer"},"cpu":{"type":"integer"},"memory":{"type":"integer"},"storage":{"type":"object","additionalProperties":{"type":"integer"}}},"additionalProperties":false,"required":["id","name","projectId","projectName","containers","cpu","memory","storage"]}}},"additionalProperties":false,"required":["cluster","nodes","projects","services"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster/node-metrics":{"get":{"tags":["Cluster"],"summary":"Cluster-wide node_exporter metrics (CPU, memory, root + Docker disk, network) per node.","operationId":"api_cluster_node-metrics_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"start":{"type":"number"},"end":{"type":"number"},"step":{"type":"number"},"nodes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"cpuUsage":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"memoryUsage":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"memoryUsageRatio":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"diskUsage":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"diskUsageRatio":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"dockerUsage":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"dockerUsageRatio":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"networkRx":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"networkTx":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","cpuUsage","memoryUsage","memoryUsageRatio","diskUsage","diskUsageRatio","dockerUsage","dockerUsageRatio","networkRx","networkTx"]}},"errors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["key","message"]}}},"additionalProperties":false,"required":["range","start","end","step","nodes","errors"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster/component-metrics":{"get":{"tags":["Cluster"],"summary":"Per-process CPU and memory for the co-located observability backends (Mimir, OpenObserve, Pyroscope, NATS, Cairn).","operationId":"api_cluster_component-metrics_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"start":{"type":"number"},"end":{"type":"number"},"step":{"type":"number"},"components":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"cpuCores":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"memoryBytes":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","cpuCores","memoryBytes"]}},"errors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["key","message"]}}},"additionalProperties":false,"required":["range","start","end","step","components","errors"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster/ingest-metrics":{"get":{"tags":["Cluster"],"summary":"Per-project ingest volume into the observability backends, by signal type.","operationId":"api_cluster_ingest-metrics_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"start":{"type":"number"},"end":{"type":"number"},"step":{"type":"number"},"signals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"backend":{"type":"string","enum":["grafana","openobserve"]},"label":{"type":"string"},"source":{"type":"string"},"itemLabel":{"type":"string"},"bytesKey":{"type":"string"},"itemsKey":{"type":"string"},"projects":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"bytes":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"items":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","bytes","items"]}}},"additionalProperties":false,"required":["id","backend","label","source","itemLabel","bytesKey","itemsKey","projects"]}},"errors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["key","message"]}}},"additionalProperties":false,"required":["range","start","end","step","signals","errors"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster/dns-metrics":{"get":{"tags":["Cluster"],"summary":"PowerDNS metrics (queries, cache, latency, errors, DNSSEC) per gateway node.","operationId":"api_cluster_dns-metrics_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"start":{"type":"number"},"end":{"type":"number"},"step":{"type":"number"},"nodes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"queryRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"udpRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"tcpRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cacheHitRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cacheSize":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"latencyUs":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"corruptRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"servfailRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"signatureRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"signatureCacheSize":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","queryRate","udpRate","tcpRate","cacheHitRate","cacheSize","latencyUs","corruptRate","servfailRate","signatureRate","signatureCacheSize"]}},"errors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["key","message"]}}},"additionalProperties":false,"required":["range","start","end","step","nodes","errors"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster/kata-metrics":{"get":{"tags":["Cluster"],"summary":"Host-side and in-guest memory decomposition for every Kata sandbox on the cluster.","operationId":"api_cluster_kata-metrics_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"start":{"type":"number"},"end":{"type":"number"},"step":{"type":"number"},"sandboxes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"project":{"type":["string","null"]},"service":{"type":["string","null"]},"node":{"type":["string","null"]},"sliceBytes":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"guestResidentBytes":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"hostPageCacheBytes":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"nonguestBytes":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"guestTotalBytes":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"guestAvailableBytes":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"guestCachedBytes":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"guestFreeBytes":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","project","service","node","sliceBytes","guestResidentBytes","hostPageCacheBytes","nonguestBytes","guestTotalBytes","guestAvailableBytes","guestCachedBytes","guestFreeBytes"]}},"errors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["key","message"]}}},"additionalProperties":false,"required":["range","start","end","step","sandboxes","errors"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster/ingress-metrics":{"get":{"tags":["Cluster"],"summary":"Cluster-wide Envoy ingress metrics per server and per region (downstream HTTP).","operationId":"api_cluster_ingress-metrics_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","enum":["15m","1h","6h","24h","7d","30d","90d"]},"start":{"type":"number"},"end":{"type":"number"},"step":{"type":"number"},"perNode":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"requestsPerSec":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"errorRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"avgLatencyMs":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"activeConnections":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"rxBytesPerSec":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"txBytesPerSec":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"pqcAdoption":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"tls13Adoption":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cxDestroyRemote":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cxDestroyLocalActiveRq":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cxProtocolError":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"envoyMemoryBytes":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","requestsPerSec","errorRate","avgLatencyMs","activeConnections","rxBytesPerSec","txBytesPerSec","pqcAdoption","tls13Adoption","cxDestroyRemote","cxDestroyLocalActiveRq","cxProtocolError","envoyMemoryBytes"]}},"perRegion":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"requestsPerSec":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"errorRate":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"avgLatencyMs":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"activeConnections":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"rxBytesPerSec":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"txBytesPerSec":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"pqcAdoption":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"tls13Adoption":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cxDestroyRemote":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cxDestroyLocalActiveRq":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"cxProtocolError":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"envoyMemoryBytes":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["key","label","requestsPerSec","errorRate","avgLatencyMs","activeConnections","rxBytesPerSec","txBytesPerSec","pqcAdoption","tls13Adoption","cxDestroyRemote","cxDestroyLocalActiveRq","cxProtocolError","envoyMemoryBytes"]}},"httpVersions":{"type":"object","properties":{"http1Active":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"http2Active":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}},"http3Active":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"v":{"type":"number"}},"additionalProperties":false,"required":["ts","v"]}}},"additionalProperties":false,"required":["http1Active","http2Active","http3Active"]},"errors":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["key","message"]}}},"additionalProperties":false,"required":["range","start","end","step","perNode","perRegion","httpVersions","errors"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-autoscaler/settings":{"get":{"tags":["Cluster Autoscaler"],"summary":"Get cluster autoscaler settings.","operationId":"api_cluster-autoscaler_settings_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"When true, the cluster autoscaler adds and removes worker nodes automatically."},"providerAccountId":{"type":"string","format":"uuid","description":"Provider account to provision from (admin-managed in Cluster Settings)."},"serverTypeId":{"type":"string","description":"Provider server type ID for auto-provisioned nodes."},"locationId":{"type":"string","description":"Provider location ID for auto-provisioned nodes."},"maxAutoNodes":{"type":"integer","minimum":0,"description":"Safety cap on how many auto-provisioned nodes may exist at once."}},"additionalProperties":false,"required":["enabled","maxAutoNodes"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Cluster Autoscaler"],"summary":"Update cluster autoscaler settings.","operationId":"api_cluster-autoscaler_settings_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"When true, the cluster autoscaler adds and removes worker nodes automatically."},"providerAccountId":{"type":"string","format":"uuid","description":"Provider account to provision from (admin-managed in Cluster Settings)."},"serverTypeId":{"type":"string","description":"Provider server type ID for auto-provisioned nodes."},"locationId":{"type":"string","description":"Provider location ID for auto-provisioned nodes."},"maxAutoNodes":{"type":"integer","minimum":0,"description":"Safety cap on how many auto-provisioned nodes may exist at once."}},"additionalProperties":false,"required":["enabled","maxAutoNodes"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-autoscaler/events":{"get":{"tags":["Cluster Autoscaler"],"summary":"List cluster autoscaler events.","operationId":"api_cluster-autoscaler_events_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"eventType":{"type":"string","enum":["scale_up"]},"reason":{"type":"string"},"nodeId":{"type":"string"},"details":{"type":"object","properties":{"providerAccountId":{"type":"string"},"providerAccountName":{"type":"string"},"serverTypeId":{"type":"string"},"locationId":{"type":"string"},"pendingContainers":{"type":"integer"},"nebulaIp":{"type":"string"},"awaitingDelivery":{"type":"boolean"}},"additionalProperties":false,"required":["providerAccountId","providerAccountName","serverTypeId","locationId","pendingContainers"]}},"additionalProperties":false,"required":["id","timestamp","eventType","reason","nodeId","details"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"eventType":{"type":"string","enum":["scale_up_failed"]},"reason":{"type":"string"},"nodeId":{"type":"string"}},"additionalProperties":false,"required":["id","timestamp","eventType","reason"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"eventType":{"type":"string","enum":["scale_up_skipped"]},"reason":{"type":"string"},"details":{"type":"object","properties":{"pendingContainers":{"type":"integer"},"maxAutoNodes":{"type":"integer"},"oldestPendingSeconds":{"type":"integer"}},"additionalProperties":false,"required":["pendingContainers","maxAutoNodes","oldestPendingSeconds"]}},"additionalProperties":false,"required":["id","timestamp","eventType","reason","details"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"eventType":{"type":"string","enum":["scale_down"]},"reason":{"type":"string"},"nodeId":{"type":"string"},"details":{"type":"object","properties":{"idleForSeconds":{"type":"integer"}},"additionalProperties":false,"required":["idleForSeconds"]}},"additionalProperties":false,"required":["id","timestamp","eventType","reason","nodeId","details"]},{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"eventType":{"type":"string","enum":["scale_down_failed"]},"reason":{"type":"string"},"nodeId":{"type":"string"}},"additionalProperties":false,"required":["id","timestamp","eventType","reason","nodeId"]}]}},"total":{"type":"integer"}},"additionalProperties":false,"required":["events","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-autoscaler/status":{"get":{"tags":["Cluster Autoscaler"],"summary":"Get cluster autoscaler status (pending containers, load).","operationId":"api_cluster-autoscaler_status_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"pending":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"serviceName":{"type":"string"},"cpu":{"type":"integer"},"memory":{"type":"integer"},"pendingSince":{"type":"string","format":"date-time"},"pendingSeconds":{"type":"integer"}},"additionalProperties":false,"required":["id","serviceName","cpu","memory","pendingSince","pendingSeconds"]}},"cluster":{"type":"object","properties":{"totalCpu":{"type":"integer"},"totalMemory":{"type":"integer"},"usedCpu":{"type":"integer"},"usedMemory":{"type":"integer"},"autoNodes":{"type":"integer"},"idleAutoNodes":{"type":"integer"}},"additionalProperties":false,"required":["totalCpu","totalMemory","usedCpu","usedMemory","autoNodes","idleAutoNodes"]}},"additionalProperties":false,"required":["pending","cluster"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/backup":{"get":{"tags":["Cluster Settings"],"summary":"Get the cluster-wide S3 backup config.","operationId":"api_cluster-settings_backup_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"region":{"type":"string"},"accessKeyId":{"type":"string"},"accessKeySecret":{"type":"string"},"encryptionKey":{"type":"string","description":"Auto-generated restic encryption password. Save it offline — losing it makes existing backups unrecoverable."},"secondary":{"type":"object","properties":{"url":{"type":"string"},"region":{"type":"string"},"accessKeyId":{"type":"string"},"accessKeySecret":{"type":"string"}},"additionalProperties":false,"required":["url","region","accessKeyId","accessKeySecret"],"description":"A second destination for oneDeploy's own backups (not per-service backups), encrypted with the same key. Set by the Summit connection (Cluster Settings → Summit), never on its own."},"platformBackups":{"type":"array","items":{"type":"object","properties":{"job":{"type":"string","enum":["database","mail"]},"target":{"type":"string","enum":["primary","secondary"]},"lastSuccessAt":{"type":"string"},"lastFailureAt":{"type":"string"},"lastError":{"type":"string","description":"Error from the most recent failed run. Kept after a later success; compare the two timestamps to tell whether it is current."},"running":{"type":"boolean","description":"A run is in progress on this control plane."}},"additionalProperties":false,"required":["job","target","running"]},"description":"oneDeploy's own backups: the database dump and the Cairn mail objects, once per configured destination."}},"additionalProperties":false,"required":["encryptionKey","platformBackups"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Cluster Settings"],"summary":"Update the cluster-wide S3 backup config.","description":"Pass all of url/region/access keys to enable backups, or pass an empty body to clear the config. The encryption key is read-only.","operationId":"api_cluster-settings_backup_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"region":{"type":"string"},"accessKeyId":{"type":"string"},"accessKeySecret":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/backup/run":{"post":{"tags":["Cluster Settings"],"summary":"Run oneDeploy's own backups now.","description":"Starts the database dump and the mail backup in the background on the control plane that receives the request, instead of waiting for the scheduled runs, to every configured destination (the primary, Summit's second copy, or both). Poll the backup config for the outcome.","operationId":"api_cluster-settings_backup_run_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/summit":{"get":{"tags":["Cluster Settings"],"summary":"Get this cluster's connection to Summit.","description":"Whether the cluster is connected to Summit (its cluster manager), and how everything that follows from the connection is doing: Summit's SSH key on each control plane, audit log forwarding, and the second copy of oneDeploy's own backups. The token is never returned.","operationId":"api_cluster-settings_summit_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"type":"boolean"},"url":{"type":"string"},"lastSyncAt":{"type":"string","format":"date-time","description":"When the last sync with Summit succeeded."},"lastError":{"type":"string","description":"Why the last sync failed, until one succeeds."},"lastErrorAt":{"type":"string","format":"date-time"},"sshKey":{"type":"object","properties":{"publicKey":{"type":"string","description":"Summit's public key, `<alg> <base64>`."},"controlPlanes":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"address":{"type":"string"},"installed":{"type":"boolean"},"checkedAt":{"type":"string","format":"date-time"},"error":{"type":"string"},"errorAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["nodeId","address","installed"]}}},"additionalProperties":false,"required":["controlPlanes"],"description":"Summit's SSH key on each control plane, so Summit can reach this cluster even when the primary is down."},"audit":{"type":"object","properties":{"active":{"type":"boolean"},"lastSuccessAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"lastErrorAt":{"type":"string","format":"date-time"},"pending":{"type":"number"}},"additionalProperties":false,"required":["active","pending"]},"backup":{"type":"object","properties":{"active":{"type":"boolean","description":"oneDeploy's own backups are also written to Summit."},"url":{"type":"string"},"primaryConfigured":{"type":"boolean","description":"Whether primary backup storage is set up too. Without it only the database and mail are backed up (to Summit); container backups need the primary."},"lastSuccessAt":{"type":"string","format":"date-time","description":"The older of the two jobs' last successes there."},"lastError":{"type":"string"},"lastFailureAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["active","primaryConfigured"]}},"additionalProperties":false,"required":["connected","sshKey","audit","backup"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Cluster Settings"],"summary":"Connect this cluster to Summit.","description":"Pass Summit's URL and the connection token issued on this cluster's page there. The cluster syncs with Summit before anything is saved, so a wrong URL or token is refused here. Connecting installs Summit's SSH key on every control plane, forwards the audit log to Summit, and adds Summit as the second destination of oneDeploy's own backups — none of which is configured separately. Connecting with a new token, or to another Summit, replaces all three.","operationId":"api_cluster-settings_summit_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"token":{"type":"string"}},"additionalProperties":false,"required":["url","token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"type":"boolean"},"url":{"type":"string"},"lastSyncAt":{"type":"string","format":"date-time","description":"When the last sync with Summit succeeded."},"lastError":{"type":"string","description":"Why the last sync failed, until one succeeds."},"lastErrorAt":{"type":"string","format":"date-time"},"sshKey":{"type":"object","properties":{"publicKey":{"type":"string","description":"Summit's public key, `<alg> <base64>`."},"controlPlanes":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"address":{"type":"string"},"installed":{"type":"boolean"},"checkedAt":{"type":"string","format":"date-time"},"error":{"type":"string"},"errorAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["nodeId","address","installed"]}}},"additionalProperties":false,"required":["controlPlanes"],"description":"Summit's SSH key on each control plane, so Summit can reach this cluster even when the primary is down."},"audit":{"type":"object","properties":{"active":{"type":"boolean"},"lastSuccessAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"lastErrorAt":{"type":"string","format":"date-time"},"pending":{"type":"number"}},"additionalProperties":false,"required":["active","pending"]},"backup":{"type":"object","properties":{"active":{"type":"boolean","description":"oneDeploy's own backups are also written to Summit."},"url":{"type":"string"},"primaryConfigured":{"type":"boolean","description":"Whether primary backup storage is set up too. Without it only the database and mail are backed up (to Summit); container backups need the primary."},"lastSuccessAt":{"type":"string","format":"date-time","description":"The older of the two jobs' last successes there."},"lastError":{"type":"string"},"lastFailureAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["active","primaryConfigured"]}},"additionalProperties":false,"required":["connected","sshKey","audit","backup"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Cluster Settings"],"summary":"Disconnect this cluster from Summit.","description":"Removes Summit's SSH key from every control plane, stops forwarding the audit log and stops writing the second backup copy. Summit keeps what it already received.","operationId":"api_cluster-settings_summit_delete","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"type":"boolean"},"url":{"type":"string"},"lastSyncAt":{"type":"string","format":"date-time","description":"When the last sync with Summit succeeded."},"lastError":{"type":"string","description":"Why the last sync failed, until one succeeds."},"lastErrorAt":{"type":"string","format":"date-time"},"sshKey":{"type":"object","properties":{"publicKey":{"type":"string","description":"Summit's public key, `<alg> <base64>`."},"controlPlanes":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"address":{"type":"string"},"installed":{"type":"boolean"},"checkedAt":{"type":"string","format":"date-time"},"error":{"type":"string"},"errorAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["nodeId","address","installed"]}}},"additionalProperties":false,"required":["controlPlanes"],"description":"Summit's SSH key on each control plane, so Summit can reach this cluster even when the primary is down."},"audit":{"type":"object","properties":{"active":{"type":"boolean"},"lastSuccessAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"lastErrorAt":{"type":"string","format":"date-time"},"pending":{"type":"number"}},"additionalProperties":false,"required":["active","pending"]},"backup":{"type":"object","properties":{"active":{"type":"boolean","description":"oneDeploy's own backups are also written to Summit."},"url":{"type":"string"},"primaryConfigured":{"type":"boolean","description":"Whether primary backup storage is set up too. Without it only the database and mail are backed up (to Summit); container backups need the primary."},"lastSuccessAt":{"type":"string","format":"date-time","description":"The older of the two jobs' last successes there."},"lastError":{"type":"string"},"lastFailureAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["active","primaryConfigured"]}},"additionalProperties":false,"required":["connected","sshKey","audit","backup"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/summit/sync":{"post":{"tags":["Cluster Settings"],"summary":"Sync with Summit now.","description":"Sync immediately instead of waiting for the next scheduled sync, and bring every control plane's authorized_keys in line. A failure is reported in the status, as for a scheduled sync.","operationId":"api_cluster-settings_summit_sync_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"type":"boolean"},"url":{"type":"string"},"lastSyncAt":{"type":"string","format":"date-time","description":"When the last sync with Summit succeeded."},"lastError":{"type":"string","description":"Why the last sync failed, until one succeeds."},"lastErrorAt":{"type":"string","format":"date-time"},"sshKey":{"type":"object","properties":{"publicKey":{"type":"string","description":"Summit's public key, `<alg> <base64>`."},"controlPlanes":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"address":{"type":"string"},"installed":{"type":"boolean"},"checkedAt":{"type":"string","format":"date-time"},"error":{"type":"string"},"errorAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["nodeId","address","installed"]}}},"additionalProperties":false,"required":["controlPlanes"],"description":"Summit's SSH key on each control plane, so Summit can reach this cluster even when the primary is down."},"audit":{"type":"object","properties":{"active":{"type":"boolean"},"lastSuccessAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"lastErrorAt":{"type":"string","format":"date-time"},"pending":{"type":"number"}},"additionalProperties":false,"required":["active","pending"]},"backup":{"type":"object","properties":{"active":{"type":"boolean","description":"oneDeploy's own backups are also written to Summit."},"url":{"type":"string"},"primaryConfigured":{"type":"boolean","description":"Whether primary backup storage is set up too. Without it only the database and mail are backed up (to Summit); container backups need the primary."},"lastSuccessAt":{"type":"string","format":"date-time","description":"The older of the two jobs' last successes there."},"lastError":{"type":"string"},"lastFailureAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["active","primaryConfigured"]}},"additionalProperties":false,"required":["connected","sshKey","audit","backup"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/passkey-attestation":{"get":{"tags":["Cluster Settings"],"summary":"Get this cluster's custodial-passkey attestation trust anchor.","description":"Returns the AAGUID and the attestation root certificate to give a relying party that wants to require passkeys issued by this specific cluster. Both are unique to this cluster, but only the certificate proves anything: the AAGUID is self-asserted and travels in the clear, so it must never be allowlisted without verifying the chain.","operationId":"api_cluster-settings_passkey-attestation_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"aaguid":{"type":"string","description":"This cluster's AAGUID, generated at install and unique to it. Self-asserted and unverifiable on its own — any software can claim it — so a relying party must verify the certificate chain and never treat a matching AAGUID as sufficient."},"caCert":{"type":"string","description":"PEM attestation root certificate, unique to this cluster. A relying party pins this as a trust anchor for the 'packed' attestation format."},"cert":{"type":"string","description":"PEM attestation certificate carried in the attestation statement's x5c. Shared by every credential this cluster issues, so it identifies the cluster and never a user. Informational — a relying party pins the root above, not this."}},"additionalProperties":false,"required":["aaguid","caCert","cert"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/hardware-keys":{"get":{"tags":["Cluster Settings"],"summary":"The hardware-key requirement, its allowed models and who complies.","operationId":"api_cluster-settings_hardware-keys_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["off","admins","internal"]},"enforcing":{"type":"boolean"},"models":{"type":"array","items":{"type":"object","properties":{"aaguid":{"type":"string"},"kind":{"type":"string","enum":["fido","custom"]},"name":{"type":"string"},"inMetadata":{"type":"boolean"},"compromise":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"certification":{"anyOf":[{"type":"object","properties":{"level":{"type":"string"},"since":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"required":["level","since"]},{"type":"null"}]},"addedBy":{"type":"string"},"addedAt":{"type":"number"}},"additionalProperties":false,"required":["aaguid","kind","name","inMetadata","compromise","version","certification","addedBy","addedAt"]}},"users":{"type":"array","items":{"type":"object","properties":{"username":{"type":"string"},"isAdmin":{"type":"boolean"},"covered":{"type":"boolean"},"hasKey":{"type":"boolean"},"otherModels":{"type":"array","items":{"type":"object","properties":{"aaguid":{"type":"string"},"name":{"type":"string"},"version":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"required":["aaguid","name","version"]}}},"additionalProperties":false,"required":["username","isAdmin","covered","hasKey","otherModels"]}},"metadata":{"type":"object","properties":{"models":{"type":"number"},"blobNo":{"anyOf":[{"type":"number"},{"type":"null"}]},"syncedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"attemptedAt":{"anyOf":[{"type":"number"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"required":["models","blobNo","syncedAt","attemptedAt","lastError"]}},"additionalProperties":false,"required":["scope","enforcing","models","users","metadata"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Cluster Settings"],"summary":"Set who must sign in with a hardware key, and whether it is enforced yet.","description":"scope: off, admins or internal (every internal account; external users are never covered). enforcing: false announces it (covered users sign in as before and are asked to add a key), true enforces it at once: only allowed keys sign in, and other passkey sessions of covered users end. Enforcing is refused while you have no key that counts.","operationId":"api_cluster-settings_hardware-keys_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["off","admins","internal"]},"enforcing":{"type":"boolean"}},"additionalProperties":false,"required":["scope","enforcing"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/hardware-keys/catalog":{"get":{"tags":["Cluster Settings"],"summary":"Authenticator models in FIDO's metadata, to pick from.","description":"Vendors list one product under several AAGUIDs with the same name, one per firmware generation, so each entry carries its firmware version (decoded from FIDO's authenticatorVersion, whose encoding is the vendor's; display only) and certification level.","operationId":"api_cluster-settings_hardware-keys_catalog_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"aaguid":{"type":"string"},"name":{"type":"string"},"compromise":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"certification":{"anyOf":[{"type":"object","properties":{"level":{"type":"string"},"since":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"required":["level","since"]},{"type":"null"}]}},"additionalProperties":false,"required":["aaguid","name","compromise","version","certification"]}}},"additionalProperties":false,"required":["models"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/hardware-keys/models":{"post":{"tags":["Cluster Settings"],"summary":"Allow FIDO models for signing in.","description":"Usually one model, or every firmware generation of one product at once. Models already on the list are skipped; refused when none is new.","operationId":"api_cluster-settings_hardware-keys_models_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"aaguids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["aaguids"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"aaguid":{"type":"string"},"kind":{"type":"string","enum":["fido","custom"]},"name":{"type":"string"},"inMetadata":{"type":"boolean"},"compromise":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"certification":{"anyOf":[{"type":"object","properties":{"level":{"type":"string"},"since":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"required":["level","since"]},{"type":"null"}]},"addedBy":{"type":"string"},"addedAt":{"type":"number"}},"additionalProperties":false,"required":["aaguid","kind","name","inMetadata","compromise","version","certification","addedBy","addedAt"]}}},"additionalProperties":false,"required":["models"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/hardware-keys/custom-models":{"post":{"tags":["Cluster Settings"],"summary":"Allow a custom authenticator, trusted through its own root.","description":"For a model FIDO does not list, such as another oneDeploy cluster's custodial passkeys (its Cluster Settings → Passkey Attestation shows the AAGUID and root). Adding it is allowing it: whoever holds the root's key can make passkeys that count here. Passkeys of that AAGUID already registered are checked again.","operationId":"api_cluster-settings_hardware-keys_custom-models_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"aaguid":{"type":"string"},"name":{"type":"string"},"rootCertificate":{"type":"string","description":"PEM."}},"additionalProperties":false,"required":["aaguid","name","rootCertificate"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"object","properties":{"aaguid":{"type":"string"},"kind":{"type":"string","enum":["fido","custom"]},"name":{"type":"string"},"inMetadata":{"type":"boolean"},"compromise":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"certification":{"anyOf":[{"type":"object","properties":{"level":{"type":"string"},"since":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"required":["level","since"]},{"type":"null"}]},"addedBy":{"type":"string"},"addedAt":{"type":"number"}},"additionalProperties":false,"required":["aaguid","kind","name","inMetadata","compromise","version","certification","addedBy","addedAt"]},"proven":{"type":"number"}},"additionalProperties":false,"required":["model","proven"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/hardware-keys/models/{aaguid}":{"delete":{"tags":["Cluster Settings"],"summary":"Stop allowing a model for signing in.","operationId":"api_cluster-settings_hardware-keys_models_aaguid_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"aaguid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/hardware-keys/sync":{"post":{"tags":["Cluster Settings"],"summary":"Fetch FIDO's metadata now.","operationId":"api_cluster-settings_hardware-keys_sync_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"stored":{"type":"boolean"},"proven":{"type":"number"}},"additionalProperties":false,"required":["stored","proven"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/postmaster":{"get":{"tags":["Cluster Settings"],"summary":"Google Postmaster Tools connection status.","operationId":"api_cluster-settings_postmaster_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean","description":"An OAuth client has been saved."},"clientId":{"type":"string"},"connected":{"type":"boolean","description":"An admin has consented and a refresh token is stored."},"googleEmail":{"type":"string","description":"The Google account the connection belongs to."},"connectedAt":{"type":"string","format":"date-time"},"connectedBy":{"type":"string"},"lastSyncAt":{"type":"string","format":"date-time"},"lastError":{"type":"string","description":"Why the last sync failed, until one succeeds."},"lastErrorAt":{"type":"string","format":"date-time"},"redirectUri":{"type":"string","description":"The redirect URI to register on the OAuth client. Absent until a platform domain is set."},"domains":{"type":"array","items":{"type":"object","properties":{"emailDomainId":{"type":"string"},"domain":{"type":"string"},"verified":{"type":"boolean"},"verifiedAt":{"type":"string","format":"date-time"},"statsFetchedAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"lastErrorAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["emailDomainId","domain","verified"]},"description":"Sending email domains enrolled in Postmaster Tools."}},"additionalProperties":false,"required":["configured","connected","domains"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Cluster Settings"],"summary":"Save the OAuth client used to connect to Google Postmaster Tools.","description":"A different client id drops the existing connection. Omit the secret to keep the stored one for the same client id.","operationId":"api_cluster-settings_postmaster_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","maxLength":512}},"additionalProperties":false,"required":["clientId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean","description":"An OAuth client has been saved."},"clientId":{"type":"string"},"connected":{"type":"boolean","description":"An admin has consented and a refresh token is stored."},"googleEmail":{"type":"string","description":"The Google account the connection belongs to."},"connectedAt":{"type":"string","format":"date-time"},"connectedBy":{"type":"string"},"lastSyncAt":{"type":"string","format":"date-time"},"lastError":{"type":"string","description":"Why the last sync failed, until one succeeds."},"lastErrorAt":{"type":"string","format":"date-time"},"redirectUri":{"type":"string","description":"The redirect URI to register on the OAuth client. Absent until a platform domain is set."},"domains":{"type":"array","items":{"type":"object","properties":{"emailDomainId":{"type":"string"},"domain":{"type":"string"},"verified":{"type":"boolean"},"verifiedAt":{"type":"string","format":"date-time"},"statsFetchedAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"lastErrorAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["emailDomainId","domain","verified"]},"description":"Sending email domains enrolled in Postmaster Tools."}},"additionalProperties":false,"required":["configured","connected","domains"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Cluster Settings"],"summary":"Disconnect from Google Postmaster Tools.","description":"Forgets the OAuth client, the grant, every enrolled domain and its statistics, removes the verification TXT records, and asks Google to revoke the token. The domains stay in the Google account.","operationId":"api_cluster-settings_postmaster_delete","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean","description":"An OAuth client has been saved."},"clientId":{"type":"string"},"connected":{"type":"boolean","description":"An admin has consented and a refresh token is stored."},"googleEmail":{"type":"string","description":"The Google account the connection belongs to."},"connectedAt":{"type":"string","format":"date-time"},"connectedBy":{"type":"string"},"lastSyncAt":{"type":"string","format":"date-time"},"lastError":{"type":"string","description":"Why the last sync failed, until one succeeds."},"lastErrorAt":{"type":"string","format":"date-time"},"redirectUri":{"type":"string","description":"The redirect URI to register on the OAuth client. Absent until a platform domain is set."},"domains":{"type":"array","items":{"type":"object","properties":{"emailDomainId":{"type":"string"},"domain":{"type":"string"},"verified":{"type":"boolean"},"verifiedAt":{"type":"string","format":"date-time"},"statsFetchedAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"lastErrorAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["emailDomainId","domain","verified"]},"description":"Sending email domains enrolled in Postmaster Tools."}},"additionalProperties":false,"required":["configured","connected","domains"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/postmaster/authorize":{"post":{"tags":["Cluster Settings"],"summary":"Start connecting to Google Postmaster Tools.","description":"Returns the Google consent URL to send the admin's browser to. Google returns to /api/postmaster/oauth/callback.","operationId":"api_cluster-settings_postmaster_authorize_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"additionalProperties":false,"required":["url"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/postmaster/sync":{"post":{"tags":["Cluster Settings"],"summary":"Sync with Google Postmaster Tools now.","description":"Enrolls new sending domains, advances their verification and refetches statistics immediately. A failure is reported in the status.","operationId":"api_cluster-settings_postmaster_sync_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean","description":"An OAuth client has been saved."},"clientId":{"type":"string"},"connected":{"type":"boolean","description":"An admin has consented and a refresh token is stored."},"googleEmail":{"type":"string","description":"The Google account the connection belongs to."},"connectedAt":{"type":"string","format":"date-time"},"connectedBy":{"type":"string"},"lastSyncAt":{"type":"string","format":"date-time"},"lastError":{"type":"string","description":"Why the last sync failed, until one succeeds."},"lastErrorAt":{"type":"string","format":"date-time"},"redirectUri":{"type":"string","description":"The redirect URI to register on the OAuth client. Absent until a platform domain is set."},"domains":{"type":"array","items":{"type":"object","properties":{"emailDomainId":{"type":"string"},"domain":{"type":"string"},"verified":{"type":"boolean"},"verifiedAt":{"type":"string","format":"date-time"},"statsFetchedAt":{"type":"string","format":"date-time"},"lastError":{"type":"string"},"lastErrorAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["emailDomainId","domain","verified"]},"description":"Sending email domains enrolled in Postmaster Tools."}},"additionalProperties":false,"required":["configured","connected","domains"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/ai":{"get":{"tags":["Cluster Settings"],"summary":"Get the cluster-wide AI provider for tickets.","description":"Never includes the API key.","operationId":"api_cluster-settings_ai_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"baseUrl":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"additionalProperties":false,"required":["configured"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Cluster Settings"],"summary":"Set the AI provider for tickets.","description":"An OpenAI-compatible Responses API. The key is tried before anything is saved. Leave `apiKey` out to keep the stored one (not allowed when the address changes).","operationId":"api_cluster-settings_ai_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"baseUrl":{"type":"string"},"model":{"type":"string"},"apiKey":{"type":"string"},"reasoningEffort":{"type":"string"}},"additionalProperties":false,"required":["model"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Cluster Settings"],"summary":"Remove the AI provider.","description":"Tickets get no AI assistance until a provider is set again. What the AI already wrote on tickets stays.","operationId":"api_cluster-settings_ai_delete","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/twilio":{"get":{"tags":["Cluster Settings"],"summary":"Get the cluster-wide Twilio config.","operationId":"api_cluster-settings_twilio_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"accountSid":{"type":"string"},"authToken":{"type":"string"},"fromNumber":{"type":"string","description":"E.164 phone number to place calls from."}},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Cluster Settings"],"summary":"Update the cluster-wide Twilio config.","description":"Pass all three fields to enable phone-call escalation, or none to disable.","operationId":"api_cluster-settings_twilio_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountSid":{"type":"string"},"authToken":{"type":"string"},"fromNumber":{"type":"string","description":"E.164 phone number to place calls from."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/account-types":{"get":{"tags":["Accounts"],"summary":"List supported account types and their credential fields.","operationId":"api_cluster-settings_account-types_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"credentialFields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"secret":{"type":"boolean"},"placeholder":{"type":"string"},"help":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"additionalProperties":false,"required":["value","label"]}}},"additionalProperties":false,"required":["name","label","secret"]}}},"additionalProperties":false,"required":["type","kind","label","credentialFields"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/accounts":{"get":{"tags":["Accounts"],"summary":"List configured accounts (cloud providers, DNS registrars, outbound mail).","operationId":"api_cluster-settings_accounts_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"kind","in":"query","description":"Filter by 'provider', 'registrar', or 'outbound'.","required":false,"schema":{"type":"string","description":"Filter by 'provider', 'registrar', or 'outbound'."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"linkedCount":{"type":"number","description":"Nodes and managed clusters' servers (provider), DNS zones (registrar), or email domains (outbound) referencing this account."}},"additionalProperties":false,"required":["id","kind","type","name","linkedCount"]}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Accounts"],"summary":"Create a new account (cloud provider or DNS registrar).","operationId":"api_cluster-settings_accounts_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Account type, e.g. 'hetzner', 'hetzner-robot', 'scaleway', 'porkbun', 'scaleway-domains'."},"name":{"type":"string","description":"Admin-facing label."},"credentials":{"type":"object","additionalProperties":{"type":"string"},"description":"Credential fields keyed by name; the set required depends on type."}},"additionalProperties":false,"required":["type","name","credentials"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/accounts/{id}":{"put":{"tags":["Accounts"],"summary":"Update an account (rename or rotate credentials).","operationId":"api_cluster-settings_accounts_id_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"credentials":{"type":"object","additionalProperties":{"type":"string"},"description":"If supplied, replaces the entire credentials map. Required keys depend on the account type."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Accounts"],"summary":"Delete an account.","operationId":"api_cluster-settings_accounts_id_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/cluster-settings/accounts/{id}/options":{"get":{"tags":["Accounts"],"summary":"Get available server types and locations for a provider account.","operationId":"api_cluster-settings_accounts_id_options_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"serverTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["shared-cpu","dedicated-cpu","bare-metal"]},"billing":{"type":"string","enum":["hourly","committed"],"description":"Whether deleting this server stops the charge. `hourly` is billed for what it runs; `committed` is paid for up front (a monthly commitment, a setup fee, or both) and refunds nothing when torn down early. The cluster autoscaler may only use `hourly` types, since it deletes nodes that go idle for 48 hours."},"cpu":{"type":"number"},"memory":{"type":"number"},"disk":{"type":"number"},"prices":{"type":"object","additionalProperties":{"type":"number"}}},"additionalProperties":false,"required":["id","name","description","category","billing","cpu","memory","disk","prices"]}},"locations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"city":{"type":"string"}},"additionalProperties":false,"required":["id","name","city"]}}},"additionalProperties":false,"required":["serverTypes","locations"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/postmaster/oauth/callback":{"get":{"tags":["Cluster Settings"],"summary":"OAuth callback for Google Postmaster Tools.","operationId":"api_postmaster_oauth_callback_get","security":[],"parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"error","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/custom-domains":{"get":{"tags":["Custom Domains"],"summary":"List every custom domain in the cluster.","description":"Admin-only. Returns every custom domain with the service and project serving it, so an abuse complaint naming a hostname can be traced to a tenant. Optional `q` filters by domain, service or project name.","operationId":"api_custom-domains_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"suppressedOnly","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"port":{"type":"number"},"verified":{"type":"boolean"},"createdAt":{"type":"string"},"lastError":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"suppressed":{"type":"boolean"}},"additionalProperties":false,"required":["id","domain","port","verified","createdAt","serviceId","serviceName","projectId","projectName","suppressed"]}},"suppressions":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"reason":{"type":"string"},"revokedServiceName":{"type":"string"},"revokedProjectId":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string"}},"additionalProperties":false,"required":["domain","createdBy","createdAt"]}}},"additionalProperties":false,"required":["domains","suppressions"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/custom-domains/revoke":{"post":{"tags":["Custom Domains"],"summary":"Revoke a custom domain cluster-wide.","description":"Admin-only abuse action. Adds the domain to the suppression list, detaches it from whatever service holds it, and reloads the gateways. The domain stops being served, its certificate stops renewing, and no project can attach it — or anything under it — until the suppression is removed.","operationId":"api_custom-domains_revoke_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253},"reason":{"type":"string","maxLength":1000}},"additionalProperties":false,"required":["domain"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"detached":{"type":"number"}},"additionalProperties":false,"required":["detached"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/custom-domains/suppressions/{domain}":{"delete":{"tags":["Custom Domains"],"summary":"Remove a domain from the suppression list.","description":"Admin-only. The domain becomes attachable again. It is NOT restored to whichever service previously held it — revoking detached it, and re-attaching is the tenant's action, which also means it has to pass ownership verification again.","operationId":"api_custom-domains_suppressions_domain_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/balancer/insights":{"get":{"tags":["Balancer"],"summary":"Cluster balancer insights (admin-only).","description":"Returns pending containers, overcommitted nodes, top rebalancer picks, and a per-container, per-node breakdown of the placement score. Read-only — does not change scheduler state.","operationId":"api_balancer_insights_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"weights":{"type":"object","properties":{"region":{"type":"number"},"nodeSpread":{"type":"number"},"spread":{"type":"number"},"balance":{"type":"number"},"cost":{"type":"number"},"autoProvisioned":{"type":"number"},"perfFit":{"type":"number"},"overloadPenalty":{"type":"number"},"kataReserve":{"type":"number"},"nearRegion":{"type":"number"},"nearNode":{"type":"number"}},"additionalProperties":false,"required":["region","nodeSpread","spread","balance","cost","autoProvisioned","perfFit","overloadPenalty","kataReserve","nearRegion","nearNode"]},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"region":{"type":"string"},"cpu":{"type":"integer"},"memory":{"type":"integer"},"storage":{"type":"object","additionalProperties":{"type":"integer"}},"perfScore":{"type":"number"},"cpuReserve":{"type":"integer"},"memoryReserve":{"type":"integer"},"storageReserve":{"type":"integer"},"isControlPlane":{"type":"boolean"},"providerAccountId":{"type":"string"},"autoProvisioned":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"taints":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","address","region","cpu","memory","storage","perfScore","cpuReserve","memoryReserve","storageReserve","isControlPlane","autoProvisioned","tags","taints"]}},"pending":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"cpu":{"type":"integer"},"memory":{"type":"integer"},"pendingSince":{"type":"string","format":"date-time"},"pendingSeconds":{"type":"integer"},"isPlaceholder":{"type":"boolean"},"migrationSourceId":{"type":"string"}},"additionalProperties":false,"required":["id","serviceName","cpu","memory","pendingSince","pendingSeconds","isPlaceholder"]}},"overcommittedNodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"region":{"type":"string"},"overloads":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string"},"used":{"type":"number"},"capacity":{"type":"number"},"overBy":{"type":"number"}},"additionalProperties":false,"required":["dimension","used","capacity","overBy"]}}},"additionalProperties":false,"required":["id","address","region","overloads"]}},"topMoves":{"type":"array","items":{"type":"object","properties":{"containerId":{"type":"string"},"containerAddress":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"currentNodeId":{"type":"string"},"currentNodeAddress":{"type":"string"},"targetNodeId":{"type":"string"},"targetNodeAddress":{"type":"string"},"currentScore":{"type":"number"},"bestScore":{"type":"number"},"improvement":{"type":"number"},"threshold":{"type":"number"},"margin":{"type":"number"}},"additionalProperties":false,"required":["containerId","containerAddress","serviceId","serviceName","currentNodeId","currentNodeAddress","targetNodeId","targetNodeAddress","currentScore","bestScore","improvement","threshold","margin"]}},"containers":{"type":"array","items":{"type":"object","properties":{"containerId":{"type":"string"},"containerAddress":{"type":"string"},"serviceId":{"type":"string"},"serviceName":{"type":"string"},"projectId":{"type":"string"},"projectName":{"type":"string"},"currentNodeId":{"type":"string"},"regionAffinity":{"type":"integer"},"requiredTags":{"type":"array","items":{"type":"string"}},"tolerations":{"type":"array","items":{"type":"string"}},"minPerfScore":{"type":"number"},"cpu":{"type":"integer"},"memory":{"type":"integer"},"volumes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"storage":{"type":"integer"},"diskType":{"type":"string"}},"additionalProperties":false,"required":["name","storage","diskType"]}},"migrationThreshold":{"type":"number"},"perNode":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"isCurrent":{"type":"boolean"},"admits":{"type":"boolean"},"fits":{"type":"boolean"},"failureReason":{"type":"string"},"breakdown":{"type":"object","properties":{"regionScore":{"type":"number"},"regionContribution":{"type":"number"},"nodeSpreadScore":{"type":"number"},"nodeSpreadContribution":{"type":"number"},"spreadScore":{"type":"number"},"spreadContribution":{"type":"number"},"balanceScore":{"type":"number"},"balanceContribution":{"type":"number"},"costBias":{"type":"number"},"kataReserveBias":{"type":"number"},"nearBias":{"type":"number"},"perfFitPenalty":{"type":"number"},"total":{"type":"number"}},"additionalProperties":false,"required":["regionScore","regionContribution","nodeSpreadScore","nodeSpreadContribution","spreadScore","spreadContribution","balanceScore","balanceContribution","costBias","kataReserveBias","nearBias","perfFitPenalty","total"]}},"additionalProperties":false,"required":["nodeId","isCurrent","admits","fits"]}}},"additionalProperties":false,"required":["containerId","containerAddress","serviceId","serviceName","projectId","projectName","currentNodeId","regionAffinity","requiredTags","tolerations","minPerfScore","cpu","memory","volumes","migrationThreshold","perNode"]}}},"additionalProperties":false,"required":["weights","nodes","pending","overcommittedNodes","topMoves","containers"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/regions":{"get":{"tags":["Regions"],"summary":"List regions.","description":"Every region of the cluster with its node count and the provider locations mapped to it. A node's region must be one of these.","operationId":"api_regions_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"regions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"The region's id. Never changes; this is what nodes reference, what `$placement.region` resolves to, and the `region` label on metrics and logs."},"name":{"type":"string","description":"Display name, e.g. 'Falkenstein, DE'."},"nodeCount":{"type":"integer"},"locations":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","description":"Provider type, e.g. hetzner, hetzner-robot, scaleway."},"location":{"type":"string"}},"additionalProperties":false,"required":["provider","location"]},"description":"Provider locations mapped to this region: a node bought there joins it."}},"additionalProperties":false,"required":["slug","name","nodeCount","locations"]}}},"additionalProperties":false,"required":["regions"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"post":{"tags":["Regions"],"summary":"Create a region.","operationId":"api_regions_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","description":"Lowercase letters, digits and hyphens. Cannot be changed later."},"name":{"type":"string"}},"additionalProperties":false,"required":["slug","name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"}},"additionalProperties":false,"required":["slug"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/regions/locations":{"put":{"tags":["Regions"],"summary":"Map a provider location to a region.","description":"A node bought at this location (by an admin or the cluster autoscaler) joins this region. Nodes already bought there keep their region.","operationId":"api_regions_locations_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"location":{"type":"string"},"region":{"type":"string"}},"additionalProperties":false,"required":["provider","location","region"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/regions/locations/{provider}/{location}":{"delete":{"tags":["Regions"],"summary":"Remove a provider location's region mapping.","description":"Buying a node there then needs a region chosen again, and the cluster autoscaler stops provisioning there.","operationId":"api_regions_locations_provider_location_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string"}},{"name":"location","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/regions/{slug}":{"put":{"tags":["Regions"],"summary":"Rename a region.","description":"Changes the display name only. The slug, and with it `$placement.region` and every metric label, stays as it is.","operationId":"api_regions_slug_put","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"delete":{"tags":["Regions"],"summary":"Delete an empty region.","description":"Refused while any node is in the region or a node is on order for it. Provider locations mapped to it lose their mapping.","operationId":"api_regions_slug_delete","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/regions/{slug}/merge":{"post":{"tags":["Regions"],"summary":"Merge a region into another.","description":"Moves every node, pending node order and provider location of this region into `into`, then deletes this region. Containers on the moved nodes that use `$placement.region` are redeployed to pick up the new value, and the nodes' telemetry config is rebuilt. A control plane's own metrics carry the new region from its next restart.","operationId":"api_regions_slug_merge_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"into":{"type":"string"}},"additionalProperties":false,"required":["into"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"movedNodes":{"type":"integer"},"redeployedContainers":{"type":"integer"}},"additionalProperties":false,"required":["movedNodes","redeployedContainers"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/regions/{slug}/change-id":{"post":{"tags":["Regions"],"summary":"Change a region's id.","description":"Creates a region with the new id and this region's name, moves every node, pending node order and provider location into it, and deletes the old id. As after a merge, containers on the moved nodes that use `$placement.region` are redeployed and the nodes' telemetry config is rebuilt; a control plane's own metrics carry the new id from its next restart. Refused when the new id already exists (merge instead).","operationId":"api_regions_slug_change-id_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"}},"additionalProperties":false,"required":["slug"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"movedNodes":{"type":"integer"},"redeployedContainers":{"type":"integer"}},"additionalProperties":false,"required":["movedNodes","redeployedContainers"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/.well-known/autoconfig/mail/config-v1.1.xml":{"get":{"tags":["Misc"],"summary":"Thunderbird autoconfig.","operationId":".well-known_autoconfig_mail_config-v1.1.xml_get","security":[],"parameters":[{"name":"emailaddress","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/autodiscover/autodiscover.xml":{"post":{"tags":["Misc"],"summary":"Outlook Autodiscover.","operationId":"autodiscover_autodiscover.xml_post","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/.well-known/status":{"get":{"tags":["Status"],"summary":"Get the public status of the service served on this domain.","operationId":".well-known_status_get","security":[],"parameters":[{"name":"host","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"status":{"type":"string"},"service":{"type":"object","properties":{"domain":{"type":"string"},"status":{"type":"string"},"latencyMs":{"type":"number"},"uptime90d":{"type":"number"},"latencyTimeline":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"integer"},"latencyMs":{"type":"number"}},"additionalProperties":false,"required":["timestamp","latencyMs"]}},"history":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"status":{"type":"string"},"uptime":{"type":"number"},"latencyMs":{"type":"number"}},"additionalProperties":false,"required":["date","status","uptime"]}}},"additionalProperties":false,"required":["domain","status","uptime90d","latencyTimeline","history"]},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"closedAt":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"message":{"type":"string"}},"additionalProperties":false,"required":["timestamp","message"]}}},"additionalProperties":false,"required":["id","title","severity","status","createdAt","events"]}}},"additionalProperties":false,"required":["domain","status","service","incidents"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/.well-known/csp-reports":{"post":{"tags":["Misc"],"summary":"Receive CSP / Reporting API violation reports.","operationId":".well-known_csp-reports_post","security":[],"parameters":[{"name":"host","in":"header","required":true,"schema":{"type":"string"}},{"name":"user-agent","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}},"additionalProperties":false,"required":["ok"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/.well-known/security.txt":{"get":{"tags":["Misc"],"summary":"security.txt for the requested host.","operationId":".well-known_security.txt_get","security":[],"parameters":[{"name":"host","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/security/{file}":{"get":{"tags":["Misc"],"summary":"PGP public key for a vulnerability-report address.","operationId":"security_file_get","security":[],"parameters":[{"name":"file","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/.well-known/openpgpkey/{domain}/hu/{hash}":{"get":{"tags":["Misc"],"summary":"OpenPGP key from an email domain's Web Key Directory.","operationId":".well-known_openpgpkey_domain_hu_hash_get","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"hash","in":"path","required":true,"schema":{"type":"string"}},{"name":"l","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/.well-known/openpgpkey/{domain}/policy":{"get":{"tags":["Misc"],"summary":"Web Key Directory policy file for an email domain.","operationId":".well-known_openpgpkey_domain_policy_get","security":[],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/chargeback/summary":{"get":{"tags":["Chargeback"],"summary":"Project cost summary (current burn, MTD, last month).","operationId":"api_chargeback_summary_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","description":"Project ID.","required":true,"schema":{"type":"string","description":"Project ID."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"burnPerMonth":{"type":"number","description":"Monthly cost at current reservations and cluster rates — computed live, does not depend on sample history."},"monthToDate":{"type":"number","description":"Accumulated cost this calendar month."},"projectedMonth":{"type":"number","description":"Projected total for this calendar month (MTD + burn for remaining time)."},"lastMonth":{"type":"number","description":"Total cost for the previous calendar month."}},"additionalProperties":false,"required":["burnPerMonth","monthToDate","projectedMonth","lastMonth"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/chargeback/breakdown":{"get":{"tags":["Chargeback"],"summary":"Per-service cost breakdown at current cluster rates.","operationId":"api_chargeback_breakdown_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","description":"Project ID.","required":true,"schema":{"type":"string","description":"Project ID."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"services":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"cpuCost":{"type":"number"},"memoryCost":{"type":"number"},"storageCost":{"type":"number"},"total":{"type":"number"}},"additionalProperties":false,"required":["id","name","cpuCost","memoryCost","storageCost","total"]}},"ratesReady":{"type":"boolean","description":"False if no node is priced yet — all costs will read as 0."}},"additionalProperties":false,"required":["services","ratesReady"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/chargeback/history":{"get":{"tags":["Chargeback"],"summary":"Project monthly cost history (last 12 months).","operationId":"api_chargeback_history_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","description":"Project ID.","required":true,"schema":{"type":"string","description":"Project ID."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"months":{"type":"array","items":{"type":"object","properties":{"yearMonth":{"type":"string","description":"e.g. 2026-04, UTC calendar month."},"cost":{"type":"number"}},"additionalProperties":false,"required":["yearMonth","cost"]}}},"additionalProperties":false,"required":["months"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/chargeback/cluster":{"get":{"tags":["Chargeback"],"summary":"Cluster-wide chargeback overview (admin).","operationId":"api_chargeback_cluster_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rates":{"type":"object","properties":{"cpuPerEcuMonth":{"type":"number","description":"Canonical billing rate: cost per ECU per month. Containers reserve in ECU (perf-normalized), so this is what actually drives a project's CPU bill."},"cpuPerCoreMonth":{"type":"number","description":"Display rate: cost per raw core per month. Weighted average across the cluster — equals cpuPerEcuMonth on homogeneous clusters, diverges on mixed-perf clusters."},"memoryPerGibMonth":{"type":"number"},"storagePerGibMonthByDisk":{"type":"object","additionalProperties":{"type":"number"}},"totalMonthlyCost":{"type":"number"},"pricedNodeCount":{"type":"integer"}},"additionalProperties":false,"required":["cpuPerEcuMonth","cpuPerCoreMonth","memoryPerGibMonth","storagePerGibMonthByDisk","totalMonthlyCost","pricedNodeCount"]},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"address":{"type":"string"},"monthlyCost":{"type":"number"},"allocatedPerMonth":{"type":"number"},"unallocatedPerMonth":{"type":"number"}},"additionalProperties":false,"required":["id","address","allocatedPerMonth","unallocatedPerMonth"]}},"topProjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"monthToDate":{"type":"number"},"burnPerMonth":{"type":"number","description":"Live monthly cost at current reservations and cluster rates."}},"additionalProperties":false,"required":["id","name","monthToDate","burnPerMonth"]}}},"additionalProperties":false,"required":["rates","nodes","topProjects"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vulnerabilities/project":{"get":{"tags":["Vulnerabilities"],"summary":"Project-wide vulnerability rollup.","operationId":"api_vulnerabilities_project_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","description":"Project ID.","required":true,"schema":{"type":"string","description":"Project ID."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"servicesScanned":{"type":"integer"},"servicesWithoutSbom":{"type":"integer"},"servicesNeverScanned":{"type":"integer"},"critical":{"type":"integer"},"high":{"type":"integer"},"medium":{"type":"integer"},"low":{"type":"integer"},"negligible":{"type":"integer"},"unknown":{"type":"integer"}},"additionalProperties":false,"required":["servicesScanned","servicesWithoutSbom","servicesNeverScanned","critical","high","medium","low","negligible","unknown"]},"services":{"type":"array","items":{"type":"object","properties":{"serviceId":{"type":"string"},"serviceName":{"type":"string"},"image":{"type":"string"},"imageDigest":{"type":"string"},"sbomAvailable":{"type":"boolean"},"lastScannedAt":{"type":"string","format":"date-time"},"critical":{"type":"integer"},"high":{"type":"integer"},"medium":{"type":"integer"},"low":{"type":"integer"},"negligible":{"type":"integer"},"unknown":{"type":"integer"},"scanError":{"type":"string"}},"additionalProperties":false,"required":["serviceId","serviceName","image","imageDigest","sbomAvailable","critical","high","medium","low","negligible","unknown"]}}},"additionalProperties":false,"required":["summary","services"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vulnerabilities/findings":{"get":{"tags":["Vulnerabilities"],"summary":"List a project's vulnerability findings with their triage.","description":"One entry per service and finding (vulnerability + package), with every version of the package the service's image carries. Findings fixed in the last 30 days are included with state `fixed`. In the Infrastructure project, when the scan of oneDeploy itself is on, oneDeploy's own findings are included under a `serviceId` of `platform:control-plane`, and each node's operating-system findings under `platform:host:<node id>`.","operationId":"api_vulnerabilities_findings_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"project","in":"query","description":"Project ID.","required":true,"schema":{"type":"string","description":"Project ID."}},{"name":"service","in":"query","description":"Only this service's findings.","required":false,"schema":{"type":"string","description":"Only this service's findings."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"findings":{"type":"array","items":{"type":"object","properties":{"serviceId":{"type":"string"},"serviceName":{"type":"string"},"vulnId":{"type":"string"},"packageName":{"type":"string"},"packageType":{"type":"string"},"versions":{"type":"array","items":{"type":"string"}},"severity":{"type":"string"},"fixVersions":{"type":"array","items":{"type":"string"}},"fixState":{"type":"string"},"description":{"type":"string"},"dataSource":{"type":"string"},"urls":{"type":"array","items":{"type":"string"}},"state":{"type":"string","enum":["new","acknowledged","in_progress","not_affected","risk_accepted","fixed"]},"assignee":{"type":"string"},"reason":{"type":"string"},"acceptedUntil":{"type":"string","format":"date-time"},"stale":{"type":"boolean","description":"The service runs a newer image than the scan this comes from (its new image has no SBOM, or is not scanned yet)."},"firstSeenAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"fixedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"type":"string"}},"additionalProperties":false,"required":["serviceId","serviceName","vulnId","packageName","packageType","versions","severity","fixVersions","urls","state","stale","firstSeenAt","lastSeenAt"]}}},"additionalProperties":false,"required":["findings"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vulnerabilities/platform":{"get":{"tags":["Vulnerabilities"],"summary":"Whether oneDeploy's own image is scanned, and the last scan.","operationId":"api_vulnerabilities_platform_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"running":{"type":"object","properties":{"version":{"type":"string"},"sbomAvailable":{"type":"boolean","description":"Whether the image answering this request carries an SBOM. Images built before the scan existed do not."},"sbomCreatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["sbomAvailable"]},"lastScan":{"type":"object","properties":{"version":{"type":"string"},"sbomCreatedAt":{"type":"string","format":"date-time"},"grypeDbBuiltAt":{"type":"string","format":"date-time"},"scannedAt":{"type":"string","format":"date-time"},"error":{"type":"string"}},"additionalProperties":false,"required":["scannedAt"]}},"additionalProperties":false,"required":["enabled","running"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}},"put":{"tags":["Vulnerabilities"],"summary":"Turn the scan of oneDeploy's own image on or off.","description":"When on, the leader matches the SBOM built into the control-plane image against Grype's database whenever the image or the database changes, and the findings appear in the Infrastructure project. Turning it off stops the scan and hides the findings; their triage is kept.","operationId":"api_vulnerabilities_platform_put","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false,"required":["enabled"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vulnerabilities/platform/sbom":{"get":{"tags":["Vulnerabilities"],"summary":"Download the SBOM of the oneDeploy image answering this request.","description":"CycloneDX JSON, made by Syft when the image was built. During a rolling upgrade control planes run different images, so the one answering may not be the one last scanned.","operationId":"api_vulnerabilities_platform_sbom_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vulnerabilities/hosts":{"get":{"tags":["Vulnerabilities"],"summary":"Each node's last operating-system vulnerability scan.","operationId":"api_vulnerabilities_hosts_get","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"kernelMinSeverity":{"type":"string","description":"Kernel findings below this severity are left out of the findings."},"nodes":{"type":"array","items":{"type":"object","properties":{"nodeId":{"type":"string"},"address":{"type":"string"},"isControlPlane":{"type":"boolean"},"version":{"type":"string","description":"Operating system and running kernel at the last successful read."},"collectedAt":{"type":"string","format":"date-time"},"scannedAt":{"type":"string","format":"date-time"},"grypeDbBuiltAt":{"type":"string","format":"date-time"},"error":{"type":"string"}},"additionalProperties":false,"required":["nodeId","address","isControlPlane"]}}},"additionalProperties":false,"required":["kernelMinSeverity","nodes"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vulnerabilities/hosts/rescan":{"post":{"tags":["Vulnerabilities"],"summary":"Read every node's packages again on the next scan tick.","description":"The leader reads a few nodes a minute, so on a large cluster this takes a few minutes to go through all of them.","operationId":"api_vulnerabilities_hosts_rescan_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vulnerabilities/findings/triage":{"post":{"tags":["Vulnerabilities"],"summary":"Triage one or more findings of a project.","description":"Sets the state, the assignee, or both, on every finding given. `not_affected` and `risk_accepted` need a reason; `risk_accepted` also needs `acceptedUntil`, at most 90 days ahead. A reason without a state is recorded as a comment. `fixed` cannot be set: a scan sets it. Each finding is changed on its own, so one that cannot be changed is reported and the others still change. With an API token, each request waits for its owner's approval.","operationId":"api_vulnerabilities_findings_triage_post","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string"},"findings":{"type":"array","items":{"type":"object","properties":{"serviceId":{"type":"string"},"vulnId":{"type":"string"},"packageName":{"type":"string"},"packageType":{"type":"string"}},"additionalProperties":false,"required":["serviceId","vulnId","packageName","packageType"]}},"state":{"type":"string","enum":["new","acknowledged","in_progress","not_affected","risk_accepted"]},"reason":{"type":"string"},"acceptedUntil":{"type":"string"},"assignee":{"type":["string","null"],"description":"A project member's username, or null to unassign."}},"additionalProperties":false,"required":["project","findings"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer"},"failed":{"type":"array","items":{"type":"object","properties":{"finding":{"type":"object","properties":{"serviceId":{"type":"string"},"vulnId":{"type":"string"},"packageName":{"type":"string"},"packageType":{"type":"string"}},"additionalProperties":false,"required":["serviceId","vulnId","packageName","packageType"]},"error":{"type":"string"}},"additionalProperties":false,"required":["finding","error"]}}},"additionalProperties":false,"required":["updated","failed"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vulnerabilities/findings/events":{"get":{"tags":["Vulnerabilities"],"summary":"The timeline of one finding: scans and people's decisions.","operationId":"api_vulnerabilities_findings_events_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"serviceId","in":"query","required":true,"schema":{"type":"string"}},{"name":"vulnId","in":"query","required":true,"schema":{"type":"string"}},{"name":"packageName","in":"query","required":true,"schema":{"type":"string"}},{"name":"packageType","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"actor":{"type":"string"},"kind":{"type":"string"},"data":{"type":"object","additionalProperties":{}}},"additionalProperties":false,"required":["id","createdAt","actor","kind","data"]}}},"additionalProperties":false,"required":["events"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vulnerabilities/services/{id}":{"get":{"tags":["Vulnerabilities"],"summary":"Get vulnerability scan results for a service.","operationId":"api_vulnerabilities_services_id_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string"},"imageDigest":{"type":"string"},"sbomAvailable":{"type":"boolean"},"sbomFormat":{"type":"string"},"sbomSource":{"type":"string","enum":["registry","generated"]},"sbomFetchError":{"type":"string"},"sbomGenerateError":{"type":"string"},"sbomGenerateAttemptedAt":{"type":"string","format":"date-time"},"sbomGenerateRetryAt":{"type":"string","format":"date-time"},"lastScannedAt":{"type":"string","format":"date-time"},"grypeDbBuiltAt":{"type":"string","format":"date-time"},"scanError":{"type":"string"},"findings":{"type":"array","items":{"type":"object","properties":{"vulnId":{"type":"string"},"severity":{"type":"string"},"packageName":{"type":"string"},"packageVersion":{"type":"string"},"packageType":{"type":"string"},"fixVersions":{"type":"array","items":{"type":"string"}},"fixState":{"type":"string"},"description":{"type":"string"},"dataSource":{"type":"string"},"urls":{"type":"array","items":{"type":"string"}},"firstSeenAt":{"type":"string","format":"date-time"},"state":{"type":"string","description":"Triage state for this service; absent until the finding is recorded."},"assignee":{"type":"string"}},"additionalProperties":false,"required":["vulnId","severity","packageName","packageVersion","packageType","fixVersions","urls","firstSeenAt"]}}},"additionalProperties":false,"required":["image","imageDigest","sbomAvailable","findings"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vulnerabilities/services/{id}/sbom":{"get":{"tags":["Vulnerabilities"],"summary":"Download the SBOM blob for a service.","operationId":"api_vulnerabilities_services_id_sbom_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vulnerabilities/services/{id}/sbom/generate":{"post":{"tags":["Vulnerabilities"],"summary":"Generate the SBOM of a service's image again.","description":"For an image with no SBOM attached whose generation failed. The scan loop retries within a minute, provided a container runs the image. Refused within 5 minutes of the last attempt, and for an image that already has an SBOM.","operationId":"api_vulnerabilities_services_id_sbom_generate_post","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}},"413":{"description":"Content Too Large","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/api/vulnerabilities/services/{id}/packages":{"get":{"tags":["Vulnerabilities"],"summary":"List packages catalogued in the SBOM for a service.","operationId":"api_vulnerabilities_services_id_packages_get","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"packages":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"ecosystem":{"type":"string"},"purl":{"type":"string"},"license":{"type":"string"}},"additionalProperties":false,"required":["name"]}}},"additionalProperties":false,"required":["packages"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/ical/{token}/oncall.ics":{"get":{"tags":["On-call"],"summary":"Download your own on-call shifts as a calendar (ICS).","operationId":"ical_token_oncall.ics_get","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/ical/{token}/oncall-all.ics":{"get":{"tags":["On-call"],"summary":"Download every on-call shift in your projects as a calendar (ICS).","operationId":"ical_token_oncall-all.ics_get","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/ntfy/v1/health":{"get":{"tags":["Ntfy"],"summary":"Ntfy health check.","operationId":"ntfy_v1_health_get","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"healthy":{"type":"boolean"}},"additionalProperties":false,"required":["healthy"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/ntfy/{topic}/auth":{"get":{"tags":["Ntfy"],"summary":"Verify credentials for a topic (used by the ntfy mobile apps).","operationId":"ntfy_topic_auth_get","security":[],"parameters":[{"name":"topic","in":"path","required":true,"schema":{"type":"string"}},{"name":"auth","in":"query","required":false,"schema":{"type":"string"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"additionalProperties":false,"required":["success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/ntfy/{topic}/json":{"get":{"tags":["Ntfy"],"summary":"Subscribe to notifications via JSON stream.","operationId":"ntfy_topic_json_get","security":[],"parameters":[{"name":"topic","in":"path","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string"}},{"name":"si","in":"query","required":false,"schema":{"type":"string"}},{"name":"poll","in":"query","required":false,"schema":{"type":"string"}},{"name":"po","in":"query","required":false,"schema":{"type":"string"}},{"name":"id","in":"query","required":false,"schema":{"type":"string"}},{"name":"i","in":"query","required":false,"schema":{"type":"string"}},{"name":"auth","in":"query","required":false,"schema":{"type":"string"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/ntfy/{topic}/sse":{"get":{"tags":["Ntfy"],"summary":"Subscribe to notifications via Server-Sent Events.","operationId":"ntfy_topic_sse_get","security":[],"parameters":[{"name":"topic","in":"path","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string"}},{"name":"si","in":"query","required":false,"schema":{"type":"string"}},{"name":"poll","in":"query","required":false,"schema":{"type":"string"}},{"name":"po","in":"query","required":false,"schema":{"type":"string"}},{"name":"id","in":"query","required":false,"schema":{"type":"string"}},{"name":"i","in":"query","required":false,"schema":{"type":"string"}},{"name":"auth","in":"query","required":false,"schema":{"type":"string"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}},"/up":{"get":{"tags":["Misc"],"summary":"Check health.","operationId":"up_get","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"number"},"errorMessage":{"type":"string"},"code":{"type":"string"}},"required":["status","errorMessage"]}}}}}}}}}