{ "schemes": [ "http", "https" ], "swagger": "2.0", "info": { "description": "API for the Rack Gateway administration and proxy services.", "title": "Rack Gateway API", "contact": {}, "version": "1.0" }, "basePath": "/api/v1", "paths": { "/api-tokens": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns all API tokens configured in the system.", "produces": [ "application/json" ], "tags": [ "API Tokens" ], "summary": "List API tokens", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/db.APIToken" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Generates a new API token for automation or CI/CD use.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "API Tokens" ], "summary": "Create an API token", "parameters": [ { "description": "Token payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateAPITokenRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.CreateAPITokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api-tokens/permissions": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns the permission catalog and metadata used to build API token forms.", "produces": [ "application/json" ], "tags": [ "API Tokens" ], "summary": "Get token permission metadata", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.TokenPermissionMetadata" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api-tokens/{tokenID}": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns metadata for a specific API token.", "produces": [ "application/json" ], "tags": [ "API Tokens" ], "summary": "Get API token", "parameters": [ { "type": "string", "description": "Token ID", "name": "tokenID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/db.APIToken" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Updates token metadata such as name and permissions.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "API Tokens" ], "summary": "Update an API token", "parameters": [ { "type": "string", "description": "Token ID", "name": "tokenID", "in": "path", "required": true }, { "description": "Token update", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.UpdateAPITokenRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/db.APIToken" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Permanently removes an API token.", "tags": [ "API Tokens" ], "summary": "Delete an API token", "parameters": [ { "type": "string", "description": "Token ID", "name": "tokenID", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/apps/{app}/env": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns environment variables for a Convox app, masking secrets unless authorized.", "produces": [ "application/json" ], "tags": [ "Environment" ], "summary": "Get environment variables", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true }, { "type": "string", "description": "Specific key to fetch", "name": "key", "in": "query" }, { "type": "boolean", "description": "Include secret values", "name": "secrets", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.EnvValuesResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "502": { "description": "Bad Gateway", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "security": [ { "SessionCookie": [] } ], "description": "Applies environment variable changes for a Convox app by creating a new release. Secrets remain masked unless the user has secrets permissions.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Environment" ], "summary": "Update environment variables", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true }, { "description": "Environment update payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.UpdateEnvValuesRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.UpdateEnvValuesResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "502": { "description": "Bad Gateway", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/apps/{app}/settings": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns all settings for a specific app with their sources", "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Get all app settings", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Updates multiple app settings atomically and stores them in the database", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Update multiple app settings", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true }, { "description": "Map of setting keys to values", "name": "settings", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": true } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Deletes multiple app settings from the database, reverting to env or default values", "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Delete multiple app settings", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "Setting keys to delete", "name": "key", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/apps/{app}/settings/approved-deploy-commands": { "put": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Replaces the approved deploy commands for the specified app", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Update approved deploy commands", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true }, { "description": "Approved command list", "name": "body", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Removes approved deploy command overrides for the specified app", "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Delete approved deploy commands", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/apps/{app}/settings/protected-env-vars": { "put": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Replaces the list of protected environment variables for the specified app", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Update protected environment variables", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true }, { "description": "Protected environment variable names", "name": "body", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Removes protected environment variable overrides for the specified app", "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Delete protected environment variables", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/apps/{app}/settings/secret-env-vars": { "put": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Replaces the list of secret environment variables for the specified app", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Update secret environment variables", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true }, { "description": "Secret environment variable names", "name": "body", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Removes secret environment variable overrides for the specified app", "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Delete secret environment variables", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/apps/{app}/settings/service-image-patterns": { "put": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Replaces service image constraints for the specified app", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Update service image patterns", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true }, { "description": "Service image patterns", "name": "body", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": { "type": "string" } } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Removes service image pattern overrides for the specified app", "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Delete service image patterns", "parameters": [ { "type": "string", "description": "App name", "name": "app", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/audit-logs": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns paginated audit logs filtered by optional query parameters.", "produces": [ "application/json" ], "tags": [ "Audit" ], "summary": "List audit logs", "parameters": [ { "type": "string", "description": "Text search", "name": "search", "in": "query" }, { "type": "string", "description": "Action type filter", "name": "action_type", "in": "query" }, { "type": "string", "description": "Resource type filter", "name": "resource_type", "in": "query" }, { "type": "string", "description": "Status filter", "name": "status", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Page size", "name": "limit", "in": "query" }, { "type": "string", "description": "ISO8601 start time", "name": "start", "in": "query" }, { "type": "string", "description": "ISO8601 end time", "name": "end", "in": "query" }, { "type": "string", "description": "Relative range (e.g. 24h, 7d, custom)", "name": "range", "in": "query" }, { "type": "string", "description": "Filter by user email", "name": "user", "in": "query" }, { "type": "string", "description": "Filter by user ID", "name": "user_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AuditLogsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/audit-logs/export": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Streams the filtered audit log dataset as CSV.", "produces": [ "text/csv" ], "tags": [ "Audit" ], "summary": "Export audit logs as CSV", "parameters": [ { "type": "string", "description": "Text search", "name": "search", "in": "query" }, { "type": "string", "description": "Action type filter", "name": "action_type", "in": "query" }, { "type": "string", "description": "Resource type filter", "name": "resource_type", "in": "query" }, { "type": "string", "description": "Status filter", "name": "status", "in": "query" }, { "type": "string", "description": "ISO8601 start time", "name": "since", "in": "query" }, { "type": "string", "description": "ISO8601 end time", "name": "until", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "file" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/cli/callback": { "get": { "description": "Stores the OAuth authorization code for the CLI to finish login.", "tags": [ "Auth" ], "summary": "Complete CLI OAuth redirect", "parameters": [ { "type": "string", "description": "Authorization code", "name": "code", "in": "query", "required": true }, { "type": "string", "description": "State", "name": "state", "in": "query", "required": true } ], "responses": { "307": { "description": "Temporary Redirect", "schema": { "type": "string" } }, "400": { "description": "Missing parameters", "schema": { "type": "string" } } } } }, "/auth/cli/complete": { "post": { "description": "Exchanges the stored authorization code and PKCE verifier for a session token.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Finalize CLI OAuth login", "parameters": [ { "description": "CLI login payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CLILoginCompleteRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.CLILoginResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/cli/start": { "post": { "description": "Initiates the CLI OAuth flow and returns PKCE parameters.", "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Start CLI OAuth login", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/auth.LoginStartResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/backup-codes/regenerate": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Generates a new set of MFA backup codes. All prior codes become invalid.", "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Regenerate backup codes", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BackupCodesResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/enroll/totp/confirm": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Confirms the TOTP secret using a verification code and optionally trusts the device.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Confirm TOTP enrollment", "parameters": [ { "description": "Enrollment confirmation payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.ConfirmTOTPEnrollmentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.VerifyMFAResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/enroll/totp/start": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Generates a TOTP secret, provisioning URI, and backup codes for the authenticated user.", "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Start TOTP enrollment", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.StartTOTPEnrollmentResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/enroll/webauthn/confirm": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Completes WebAuthn credential registration with the client's credential response.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Confirm WebAuthn enrollment", "parameters": [ { "description": "WebAuthn credential", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.ConfirmWebAuthnEnrollmentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.WebAuthnEnrollmentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/enroll/webauthn/start": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Begins WebAuthn credential registration. Returns a challenge for the browser.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Start WebAuthn enrollment", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.StartWebAuthnEnrollmentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/enroll/yubiotp/start": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Enrolls a Yubikey using Yubico OTP. Touch your Yubikey to generate an OTP.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Start Yubico OTP enrollment", "parameters": [ { "description": "Yubikey OTP", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.StartYubiOTPEnrollmentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.StartYubiOTPEnrollmentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/methods/{methodID}": { "put": { "description": "Updates the label of an MFA method", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Update MFA method label", "parameters": [ { "type": "integer", "description": "MFA Method ID", "name": "methodID", "in": "path", "required": true }, { "description": "Update request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.UpdateMFAMethodRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.StatusResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Removes an existing MFA method for the current user.", "tags": [ "Auth" ], "summary": "Delete an MFA method", "parameters": [ { "type": "integer", "description": "MFA method ID", "name": "methodID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.StatusResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/preferred-method": { "put": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Sets the user's preferred MFA method for sign-in (totp or webauthn)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Update preferred MFA method", "parameters": [ { "description": "Preferred method", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.UpdatePreferredMFAMethodRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.StatusResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/status": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns enrollment state, configured methods, trusted devices, and backup code summary.", "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Get MFA status for current session", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.MFAStatusResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/trusted-devices/trust": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Marks the current browser session as trusted by minting a trusted device cookie.", "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Trust the current device", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.VerifyMFAResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/trusted-devices/{deviceID}": { "delete": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Revokes a trusted device, requiring MFA on next login from that device.", "tags": [ "Auth" ], "summary": "Revoke a trusted device", "parameters": [ { "type": "integer", "description": "Trusted device ID", "name": "deviceID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.StatusResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/verify": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Verifies a TOTP or backup code to satisfy the MFA step-up requirement.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Verify MFA step-up", "parameters": [ { "description": "Verification payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.VerifyMFARequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.VerifyMFAResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/webauthn/assertion/start": { "post": { "security": [ { "SessionCookie": [] } ], "description": "Begins a WebAuthn assertion ceremony for CLI login/step-up. Returns challenge and session data.", "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Start WebAuthn assertion for MFA", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.WebAuthnAssertionStartResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/mfa/webauthn/assertion/verify": { "post": { "security": [ { "SessionCookie": [] } ], "description": "Completes the WebAuthn assertion ceremony by validating the signed response.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Verify WebAuthn assertion for MFA", "parameters": [ { "description": "Assertion response and session data", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.VerifyWebAuthnAssertionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.VerifyMFAResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/auth/web/callback": { "get": { "description": "Validates the OAuth callback, issues a session cookie, and redirects to the SPA.", "tags": [ "Auth" ], "summary": "Complete web OAuth login", "parameters": [ { "type": "string", "description": "Authorization code", "name": "code", "in": "query", "required": true }, { "type": "string", "description": "State", "name": "state", "in": "query", "required": true } ], "responses": { "302": { "description": "Redirect to web UI", "schema": { "type": "string" } }, "400": { "description": "Invalid state", "schema": { "type": "string" } }, "401": { "description": "User not authorized", "schema": { "type": "string" } }, "500": { "description": "Authentication failure", "schema": { "type": "string" } } } } }, "/auth/web/login": { "get": { "description": "Redirects the browser to the identity provider for login.", "tags": [ "Auth" ], "summary": "Start web OAuth login", "responses": { "302": { "description": "Redirect to identity provider", "schema": { "type": "string" } } } } }, "/auth/web/logout": { "get": { "description": "Revokes the active session, clears the cookie, and redirects to the login screen.", "tags": [ "Auth" ], "summary": "Log out current session", "responses": { "302": { "description": "Redirect to login", "schema": { "type": "string" } } } } }, "/created-by": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns creator information for the supplied resource identifiers.", "produces": [ "application/json" ], "tags": [ "Metadata" ], "summary": "Get resource creator metadata", "parameters": [ { "enum": [ "app", "build", "release" ], "type": "string", "description": "Resource type", "name": "type", "in": "query", "required": true }, { "type": "string", "description": "Comma-separated resource IDs", "name": "ids", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/db.CreatorInfo" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/deploy-approval-requests": { "get": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Lists deploy approval requests (admin).", "produces": [ "application/json" ], "tags": [ "DeployApprovalRequests" ], "summary": "List deploy approvals", "parameters": [ { "type": "string", "description": "Filter by status", "name": "status", "in": "query" }, { "type": "boolean", "description": "Only pending/approved", "name": "only_open", "in": "query" }, { "type": "integer", "description": "Limit", "name": "limit", "in": "query" }, { "type": "integer", "description": "Offset", "name": "offset", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.DeployApprovalRequestList" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Creates a manual approval record tied to an API token.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "DeployApprovalRequests" ], "summary": "Request deploy approval", "parameters": [ { "description": "Deploy approval request payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateDeployApprovalRequestRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/handlers.DeployApprovalRequestResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "409": { "description": "Conflict - pending request already exists", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/deploy-approval-requests/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns the status of a deploy approval request.", "produces": [ "application/json" ], "tags": [ "DeployApprovalRequests" ], "summary": "Get deploy approval", "parameters": [ { "type": "string", "description": "Deploy approval request public ID (UUID)", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.DeployApprovalRequestResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/deploy-approval-requests/{id}/approve": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Approves a pending deploy approval request.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "DeployApprovalRequests" ], "summary": "Approve deploy approval request", "parameters": [ { "type": "string", "description": "Deploy approval request public ID (UUID)", "name": "id", "in": "path", "required": true }, { "description": "Approval notes", "name": "request", "in": "body", "schema": { "$ref": "#/definitions/handlers.UpdateDeployApprovalRequestStatusRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.DeployApprovalRequestResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/deploy-approval-requests/{id}/audit-logs": { "get": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Returns audit logs associated with a specific deploy approval request.", "produces": [ "application/json" ], "tags": [ "DeployApprovalRequests" ], "summary": "Get audit logs for deploy approval request", "parameters": [ { "type": "string", "description": "Deploy approval request public ID (UUID)", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "Limit (default 100)", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AuditLogsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/deploy-approval-requests/{id}/reject": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Rejects a pending deploy approval request.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "DeployApprovalRequests" ], "summary": "Reject deploy approval request", "parameters": [ { "type": "string", "description": "Deploy approval request public ID (UUID)", "name": "id", "in": "path", "required": true }, { "description": "Rejection notes", "name": "request", "in": "body", "schema": { "$ref": "#/definitions/handlers.UpdateDeployApprovalRequestStatusRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.DeployApprovalRequestResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/health": { "get": { "description": "Returns service health information.", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Health check", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.HealthResponse" } } } } }, "/info": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns user, rack, and integrations status in a single request for app bootstrap", "produces": [ "application/json" ], "tags": [ "Info" ], "summary": "Get gateway information", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.InfoResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/rack": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Proxies the rack /system endpoint returning the rack's metadata.", "produces": [ "application/json" ], "tags": [ "Rack" ], "summary": "Get rack system information", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "502": { "description": "Bad Gateway", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/roles": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns metadata and permissions for each gateway RBAC role.", "produces": [ "application/json" ], "tags": [ "Roles" ], "summary": "List RBAC roles", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/handlers.RoleDescriptor" } } } } } }, "/settings": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns all global settings with their sources (db, env, or default)", "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Get all global settings", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Updates multiple global settings atomically and stores them in the database", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Update multiple global settings", "parameters": [ { "description": "Map of setting keys to values", "name": "settings", "in": "body", "required": true, "schema": { "type": "object", "additionalProperties": true } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Deletes multiple global settings from the database, reverting to env or default values", "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Delete multiple global settings", "parameters": [ { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "Setting keys to delete", "name": "key", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/settings.Setting" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/settings/rack_tls_cert/refresh": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Fetches and stores the latest TLS certificate for the configured Convox rack.", "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Refresh rack TLS certificate", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/db.RackTLSCert" } }, "501": { "description": "Not Implemented", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "502": { "description": "Bad Gateway", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/settings/{key}": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns a single global setting with its source", "produces": [ "application/json" ], "tags": [ "Settings" ], "summary": "Get a specific global setting", "parameters": [ { "type": "string", "description": "Setting key", "name": "key", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/settings.Setting" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns every user configured in the gateway along with role assignments.", "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "List all gateway users", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/db.User" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Creates a new gateway user with the provided roles.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Create a user", "parameters": [ { "description": "User payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateUserRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/handlers.UserSummary" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/{email}": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns details for a single gateway user.", "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Get a user", "parameters": [ { "type": "string", "description": "User email", "name": "email", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/db.User" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Updates a user's email, name, and/or roles in a single request.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Update user", "parameters": [ { "type": "string", "description": "Current email", "name": "email", "in": "path", "required": true }, { "description": "User update payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.UpdateUserRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.UserSummary" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Removes a gateway user and revokes all sessions they own.", "tags": [ "Users" ], "summary": "Delete a user", "parameters": [ { "type": "string", "description": "User email", "name": "email", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/{email}/lock": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Locks a user account to prevent login", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Lock a user account", "parameters": [ { "type": "string", "description": "User email", "name": "email", "in": "path", "required": true }, { "description": "Lock reason", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.LockUserRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.StatusResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/{email}/name": { "put": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Updates only a user's display name.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Update user name", "parameters": [ { "type": "string", "description": "User email", "name": "email", "in": "path", "required": true }, { "description": "Name payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.UpdateUserNameRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.UserSummary" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/{email}/sessions": { "get": { "security": [ { "SessionCookie": [] } ], "description": "Returns the active (non-revoked) web sessions for the specified user.", "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "List active sessions for a user", "parameters": [ { "type": "string", "description": "User email", "name": "email", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.UserSessionResponse" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/{email}/sessions/revoke_all": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Revokes every active session belonging to the specified user.", "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Revoke all sessions for a user", "parameters": [ { "type": "string", "description": "User email", "name": "email", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.RevokeAllSessionsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/{email}/sessions/{sessionID}/revoke": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Revokes a single session for the specified user.", "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Revoke a user session", "parameters": [ { "type": "string", "description": "User email", "name": "email", "in": "path", "required": true }, { "type": "integer", "description": "Session ID", "name": "sessionID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.RevokeSessionResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/{email}/unlock": { "post": { "security": [ { "SessionCookie": [] }, { "CSRFToken": [] } ], "description": "Unlocks a previously locked user account", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin" ], "summary": "Unlock a user account", "parameters": [ { "type": "string", "description": "User email", "name": "email", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.StatusResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } } }, "definitions": { "auth.LoginStartResponse": { "type": "object", "required": [ "auth_url", "code_verifier", "state" ], "properties": { "auth_url": { "type": "string" }, "code_verifier": { "type": "string" }, "state": { "type": "string" } } }, "db.APIToken": { "type": "object", "properties": { "created_at": { "type": "string" }, "created_by_email": { "type": "string" }, "created_by_name": { "type": "string" }, "created_by_user_id": { "type": "integer" }, "expires_at": { "type": "string" }, "id": { "type": "integer" }, "last_used_at": { "type": "string" }, "name": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } }, "public_id": { "type": "string" }, "user_id": { "type": "integer" } } }, "db.AuditLogAggregated": { "type": "object", "properties": { "action": { "type": "string" }, "action_type": { "type": "string" }, "api_token_id": { "type": "integer" }, "api_token_name": { "type": "string" }, "avg_response_time_ms": { "type": "integer" }, "command": { "type": "string" }, "deploy_approval_request_id": { "type": "integer" }, "details": { "type": "string" }, "event_count": { "type": "integer" }, "first_event_id": { "type": "integer" }, "first_hash": { "type": "array", "items": { "type": "integer" } }, "first_seen": { "type": "string" }, "http_status": { "type": "integer" }, "id": { "type": "integer" }, "ip_address": { "type": "string" }, "last_event_id": { "type": "integer" }, "last_hash": { "type": "array", "items": { "type": "integer" } }, "last_seen": { "type": "string" }, "max_response_time_ms": { "type": "integer" }, "min_response_time_ms": { "type": "integer" }, "rbac_decision": { "type": "string" }, "resource": { "type": "string" }, "resource_type": { "type": "string" }, "status": { "type": "string" }, "user_agent": { "type": "string" }, "user_email": { "type": "string" }, "user_name": { "type": "string" } } }, "db.CreatorInfo": { "type": "object", "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "user_id": { "type": "integer" } } }, "db.RackTLSCert": { "type": "object", "properties": { "fetched_at": { "type": "string" }, "fingerprint": { "type": "string" }, "pem": { "type": "string" } } }, "db.User": { "type": "object", "properties": { "created_at": { "type": "string" }, "created_by_email": { "type": "string" }, "created_by_name": { "type": "string" }, "created_by_user_id": { "type": "integer" }, "email": { "type": "string" }, "id": { "type": "integer" }, "locked_at": { "type": "string" }, "locked_by_email": { "type": "string" }, "locked_by_name": { "type": "string" }, "locked_by_user_id": { "type": "integer" }, "locked_reason": { "type": "string" }, "mfa_enforced_at": { "type": "string" }, "mfa_enrolled": { "type": "boolean" }, "name": { "type": "string" }, "preferred_mfa_method": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "suspended": { "type": "boolean" }, "updated_at": { "type": "string" } } }, "handlers.AuditLogsResponse": { "type": "object", "required": [ "limit", "logs", "page", "total" ], "properties": { "limit": { "type": "integer" }, "logs": { "type": "array", "items": { "$ref": "#/definitions/db.AuditLogAggregated" } }, "page": { "type": "integer" }, "total": { "type": "integer" } } }, "handlers.BackupCodesResponse": { "type": "object", "required": [ "backup_codes" ], "properties": { "backup_codes": { "type": "array", "items": { "type": "string" } } } }, "handlers.CLILoginCompleteRequest": { "type": "object", "required": [ "code_verifier", "state" ], "properties": { "client_version": { "type": "string" }, "code_verifier": { "type": "string" }, "device_id": { "type": "string" }, "device_name": { "type": "string" }, "device_os": { "type": "string" }, "state": { "type": "string" } } }, "handlers.CLILoginResponse": { "type": "object", "properties": { "channel": { "type": "string" }, "device_id": { "type": "string" }, "device_name": { "type": "string" }, "email": { "type": "string" }, "enrollment_required": { "type": "boolean" }, "expires_at": { "type": "string" }, "mfa_required": { "type": "boolean" }, "mfa_verified": { "type": "boolean" }, "name": { "type": "string" }, "session_id": { "type": "integer" }, "token": { "type": "string" } } }, "handlers.ConfirmTOTPEnrollmentRequest": { "type": "object", "required": [ "code", "method_id" ], "properties": { "code": { "type": "string" }, "label": { "type": "string" }, "method_id": { "type": "integer" }, "trust_device": { "type": "boolean" } } }, "handlers.ConfirmWebAuthnEnrollmentRequest": { "type": "object", "required": [ "credential", "method_id" ], "properties": { "credential": {}, "label": { "type": "string" }, "method_id": { "type": "integer" } } }, "handlers.CreateAPITokenRequest": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "permissions": { "description": "Explicit permissions (overrides role)", "type": "array", "items": { "type": "string" } }, "role": { "description": "Role shortcut (viewer, ops, deployer, cicd, admin)", "type": "string" }, "user_email": { "type": "string" } } }, "handlers.CreateAPITokenResponse": { "type": "object", "required": [ "api_token", "id", "name", "permissions", "token" ], "properties": { "api_token": { "$ref": "#/definitions/db.APIToken" }, "id": { "type": "integer" }, "name": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } }, "token": { "type": "string" } } }, "handlers.CreateDeployApprovalRequestRequest": { "type": "object", "required": [ "app", "git_commit_hash", "message" ], "properties": { "app": { "type": "string" }, "ci_metadata": { "type": "object", "additionalProperties": true }, "git_branch": { "type": "string" }, "git_commit_hash": { "type": "string" }, "message": { "type": "string" }, "target_api_token": { "type": "string" }, "target_api_token_id": { "type": "string" } } }, "handlers.CreateUserRequest": { "type": "object", "required": [ "email", "name", "roles" ], "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "roles": { "type": "array", "minItems": 1, "items": { "type": "string" } } } }, "handlers.DeployApprovalRequestList": { "type": "object", "required": [ "deploy_approval_requests" ], "properties": { "deploy_approval_requests": { "type": "array", "items": { "$ref": "#/definitions/handlers.DeployApprovalRequestResponse" } } } }, "handlers.DeployApprovalRequestResponse": { "type": "object", "required": [ "created_at", "git_commit_hash", "message", "public_id", "status", "target_api_token_id", "updated_at" ], "properties": { "app": { "type": "string" }, "approval_expires_at": { "type": "string" }, "approval_notes": { "type": "string" }, "approved_at": { "type": "string" }, "approved_by_email": { "type": "string" }, "approved_by_name": { "type": "string" }, "build_id": { "type": "string" }, "ci_metadata": { "type": "object", "additionalProperties": true }, "created_at": { "type": "string" }, "created_by_api_token_id": { "type": "string" }, "created_by_api_token_name": { "type": "string" }, "created_by_email": { "type": "string" }, "created_by_name": { "type": "string" }, "exec_commands": { "type": "object", "additionalProperties": true }, "git_branch": { "type": "string" }, "git_commit_hash": { "type": "string" }, "message": { "type": "string" }, "object_url": { "type": "string" }, "pr_url": { "type": "string" }, "process_ids": { "type": "array", "items": { "type": "string" } }, "public_id": { "type": "string" }, "rejected_at": { "type": "string" }, "rejected_by_email": { "type": "string" }, "rejected_by_name": { "type": "string" }, "release_created_at": { "type": "string" }, "release_id": { "type": "string" }, "release_promoted_at": { "type": "string" }, "release_promoted_by_api_token_id": { "type": "integer" }, "status": { "type": "string" }, "target_api_token_id": { "type": "string" }, "target_api_token_name": { "type": "string" }, "updated_at": { "type": "string" } } }, "handlers.EnvValuesResponse": { "type": "object", "required": [ "env" ], "properties": { "env": { "type": "object", "additionalProperties": { "type": "string" } } } }, "handlers.ErrorResponse": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "string" } } }, "handlers.HealthResponse": { "type": "object", "required": [ "service", "status" ], "properties": { "service": { "type": "string" }, "status": { "type": "string" } } }, "handlers.InfoResponse": { "type": "object", "required": [ "integrations", "rack", "user" ], "properties": { "integrations": { "$ref": "#/definitions/handlers.IntegrationsInfo" }, "rack": { "$ref": "#/definitions/handlers.RackSummary" }, "user": { "$ref": "#/definitions/handlers.UserInfo" } } }, "handlers.IntegrationsInfo": { "type": "object", "required": [ "circleci", "github", "slack" ], "properties": { "circleci": { "type": "boolean" }, "github": { "type": "boolean" }, "slack": { "type": "boolean" } } }, "handlers.LockUserRequest": { "type": "object", "required": [ "reason" ], "properties": { "reason": { "type": "string" } } }, "handlers.MFABackupCodesSummary": { "type": "object", "required": [ "total", "unused" ], "properties": { "last_generated_at": { "type": "string" }, "last_used_at": { "type": "string" }, "total": { "type": "integer" }, "unused": { "type": "integer" } } }, "handlers.MFAMethodResponse": { "type": "object", "required": [ "created_at", "id", "type" ], "properties": { "confirmed_at": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "label": { "type": "string" }, "last_used_at": { "type": "string" }, "type": { "type": "string" } } }, "handlers.MFAStatusResponse": { "type": "object", "required": [ "backup_codes", "enrolled", "methods", "required", "trusted_devices", "webauthn_available" ], "properties": { "backup_codes": { "$ref": "#/definitions/handlers.MFABackupCodesSummary" }, "enrolled": { "type": "boolean" }, "methods": { "type": "array", "items": { "$ref": "#/definitions/handlers.MFAMethodResponse" } }, "preferred_method": { "type": "string" }, "recent_step_up_expires_at": { "type": "string" }, "required": { "type": "boolean" }, "trusted_devices": { "type": "array", "items": { "$ref": "#/definitions/handlers.TrustedDeviceResponse" } }, "webauthn_available": { "type": "boolean" } } }, "handlers.RackSummary": { "type": "object", "required": [ "alias", "host", "name" ], "properties": { "alias": { "type": "string" }, "host": { "type": "string" }, "name": { "type": "string" } } }, "handlers.RevokeAllSessionsResponse": { "type": "object", "required": [ "revoked_count" ], "properties": { "revoked_count": { "type": "integer" } } }, "handlers.RevokeSessionResponse": { "type": "object", "required": [ "revoked" ], "properties": { "revoked": { "type": "boolean" } } }, "handlers.RoleDescriptor": { "type": "object", "required": [ "description", "label", "name", "permissions" ], "properties": { "description": { "type": "string" }, "label": { "type": "string" }, "name": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } } } }, "handlers.StartTOTPEnrollmentResponse": { "type": "object", "required": [ "backup_codes", "method_id", "secret", "uri" ], "properties": { "backup_codes": { "type": "array", "items": { "type": "string" } }, "method_id": { "type": "integer" }, "secret": { "type": "string" }, "uri": { "type": "string" } } }, "handlers.StartWebAuthnEnrollmentResponse": { "type": "object", "required": [ "method_id", "public_key_options" ], "properties": { "backup_codes": { "type": "array", "items": { "type": "string" } }, "method_id": { "type": "integer" }, "public_key_options": {} } }, "handlers.StartYubiOTPEnrollmentRequest": { "type": "object", "required": [ "yubi_otp" ], "properties": { "label": { "type": "string" }, "yubi_otp": { "type": "string" } } }, "handlers.StartYubiOTPEnrollmentResponse": { "type": "object", "required": [ "method_id" ], "properties": { "backup_codes": { "type": "array", "items": { "type": "string" } }, "method_id": { "type": "integer" } } }, "handlers.StatusResponse": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string" } } }, "handlers.TokenPermissionMetadata": { "type": "object", "required": [ "default_permissions", "permissions", "roles", "user_permissions", "user_roles" ], "properties": { "default_permissions": { "type": "array", "items": { "type": "string" } }, "permissions": { "type": "array", "items": { "type": "string" } }, "roles": { "type": "array", "items": { "$ref": "#/definitions/handlers.RoleDescriptor" } }, "user_permissions": { "type": "array", "items": { "type": "string" } }, "user_roles": { "type": "array", "items": { "type": "string" } } } }, "handlers.TrustedDeviceResponse": { "type": "object", "required": [ "created_at", "expires_at", "id", "label" ], "properties": { "created_at": { "type": "string" }, "expires_at": { "type": "string" }, "id": { "type": "integer" }, "ip_address": { "type": "string" }, "label": { "type": "string" }, "last_used_at": { "type": "string" }, "revoked_at": { "type": "string" }, "revoked_reason": { "type": "string" }, "user_agent": { "type": "string" } } }, "handlers.UpdateAPITokenRequest": { "type": "object", "properties": { "name": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } } } }, "handlers.UpdateDeployApprovalRequestStatusRequest": { "type": "object", "properties": { "notes": { "type": "string" } } }, "handlers.UpdateEnvValuesRequest": { "type": "object", "properties": { "remove": { "type": "array", "items": { "type": "string" } }, "set": { "type": "object", "additionalProperties": { "type": "string" } } } }, "handlers.UpdateEnvValuesResponse": { "type": "object", "required": [ "env" ], "properties": { "env": { "type": "object", "additionalProperties": { "type": "string" } }, "release_id": { "type": "string" } } }, "handlers.UpdateMFAMethodRequest": { "type": "object", "required": [ "label" ], "properties": { "label": { "type": "string", "maxLength": 150 } } }, "handlers.UpdatePreferredMFAMethodRequest": { "type": "object", "properties": { "preferred_method": { "description": "\"totp\", \"webauthn\", or null to clear", "type": "string" } } }, "handlers.UpdateUserNameRequest": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "handlers.UpdateUserRequest": { "type": "object", "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } } } }, "handlers.UserInfo": { "type": "object", "required": [ "email", "has_trusted_device", "mfa_enrolled", "mfa_required", "name", "roles" ], "properties": { "email": { "type": "string" }, "has_trusted_device": { "type": "boolean" }, "mfa_enrolled": { "type": "boolean" }, "mfa_required": { "type": "boolean" }, "name": { "type": "string" }, "preferred_mfa_method": { "type": "string" }, "recent_step_up_expires_at": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } } } }, "handlers.UserSessionResponse": { "type": "object", "required": [ "channel", "created_at", "expires_at", "id", "last_seen_at" ], "properties": { "channel": { "type": "string" }, "created_at": { "type": "string" }, "expires_at": { "type": "string" }, "id": { "type": "integer" }, "ip_address": { "type": "string" }, "last_seen_at": { "type": "string" }, "metadata": {}, "user_agent": { "type": "string" } } }, "handlers.UserSummary": { "type": "object", "required": [ "email", "name", "roles" ], "properties": { "created_by_email": { "type": "string" }, "email": { "type": "string" }, "name": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } } } }, "handlers.VerifyMFARequest": { "type": "object", "required": [ "code" ], "properties": { "code": { "type": "string" }, "trust_device": { "type": "boolean" } } }, "handlers.VerifyMFAResponse": { "type": "object", "required": [ "mfa_verified_at", "recent_step_up_expires_at", "trusted_device_cookie" ], "properties": { "mfa_verified_at": { "type": "string" }, "recent_step_up_expires_at": { "type": "string" }, "trusted_device_cookie": { "type": "boolean" } } }, "handlers.VerifyWebAuthnAssertionRequest": { "type": "object", "required": [ "assertion_response", "session_data" ], "properties": { "assertion_response": { "type": "string" }, "session_data": { "type": "string" }, "trust_device": { "type": "boolean" } } }, "handlers.WebAuthnAssertionStartResponse": { "type": "object", "required": [ "options", "session_data" ], "properties": { "options": { "description": "protocol.CredentialAssertion" }, "session_data": { "description": "Serialized session to send back with verification", "type": "string" } } }, "handlers.WebAuthnEnrollmentResponse": { "type": "object", "required": [ "method_id", "status" ], "properties": { "method_id": { "type": "integer" }, "status": { "type": "string" } } }, "settings.Setting": { "type": "object", "properties": { "env_var": { "description": "e.g., \"RGW_SETTING_REQUIRE_MFA_ALL_USERS\"", "type": "string" }, "source": { "$ref": "#/definitions/settings.SettingSource" }, "value": {} } }, "settings.SettingSource": { "type": "string", "enum": [ "db", "env", "default", "global_default" ], "x-enum-varnames": [ "SourceDB", "SourceEnv", "SourceDefault", "SourceGlobalDefault" ] } }, "securityDefinitions": { "CSRFToken": { "description": "HMAC-derived CSRF token tied to the active session.", "type": "apiKey", "name": "X-CSRF-Token", "in": "header" }, "SessionCookie": { "description": "HttpOnly session cookie issued after OAuth login.", "type": "apiKey", "name": "Cookie", "in": "header" } } }