{"openapi":"3.1.0","info":{"title":"Dockerstation Control Plane","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Health","description":"Liveness check: the API process is up. Does not touch the database.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}}},"/health/db":{"get":{"tags":["health"],"summary":"Health Db","description":"Readiness check: confirms the API can reach and query PostgreSQL.","operationId":"health_db_health_db_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Db Health Db Get"}}}}}}},"/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/2fa/verify":{"post":{"tags":["auth"],"summary":"Verify Two Factor","description":"Issue #167: a sign-in's second step, the challenge from POST\n/auth/login (or the provider sign-in) plus a code. Wrong codes are\ncounted per account; enough in a row pause code entry for\nSettings.two_factor_lockout_minutes (429 two_factor_locked).","operationId":"verify_two_factor_auth_2fa_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFactorVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/2fa/setup":{"post":{"tags":["auth"],"summary":"Setup Two Factor","description":"A new secret (and its QR code) to add to an authenticator app. Not\non until POST /auth/2fa/enable sees a code from it. Verified email\nonly.","operationId":"setup_two_factor_auth_2fa_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFactorSetupRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/2fa/enable":{"post":{"tags":["auth"],"summary":"Enable Two Factor","description":"Turns it on with a first code from the app. Returns the recovery\ncodes (shown this once) and a fresh token: every other session is\nsigned out.","operationId":"enable_two_factor_auth_2fa_enable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFactorCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFactorEnabledRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/2fa/disable":{"post":{"tags":["auth"],"summary":"Disable Two Factor","description":"Turns it off. Needs a current code or a recovery code, not just a\nsession.","operationId":"disable_two_factor_auth_2fa_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFactorCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/2fa/recovery-codes":{"post":{"tags":["auth"],"summary":"Regenerate Recovery Codes","description":"Ten new recovery codes; the old ones stop working. Needs a current\ncode.","operationId":"regenerate_recovery_codes_auth_2fa_recovery_codes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFactorCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryCodesRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/me":{"get":{"tags":["auth"],"summary":"Read Current User","operationId":"read_current_user_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["auth"],"summary":"Update Current User","operationId":"update_current_user_auth_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/accept-terms":{"post":{"tags":["auth"],"summary":"Accept Terms Endpoint","description":"Issue #6 follow-up: the OAuth-signup counterpart to UserCreate's\nown accept_terms gate -- called exactly once by the frontend's\nRequireAuth interstitial, the real server-side record (User.\nterms_accepted_at) that this specific account agreed, not just that\nsome UI checkbox was checked.","operationId":"accept_terms_endpoint_auth_accept_terms_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/change-email":{"post":{"tags":["auth"],"summary":"Change Email Endpoint","description":"Resets email_verified_at and sends a fresh verification email to the\nnew address -- see change_email's own docstring (app/services/auth.py)\nfor why the old address's verified status never carries over.","operationId":"change_email_endpoint_auth_change_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/change-password":{"post":{"tags":["auth"],"summary":"Change Password Endpoint","description":"Signs out every other session (User.sessions_valid_after) and\nreturns a fresh token for this one.","operationId":"change_password_endpoint_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/request-deletion":{"post":{"tags":["auth"],"summary":"Request Deletion Endpoint","description":"Issue #120, Profile page danger zone: suspends the account and\ndeletes it once Settings.account_deletion_grace_period_hours have\npassed (account_deletion.py's module docstring). Signs out every\nsession, this one included; signing back in reaches only the\npending-deletion screen, where it can be cancelled. Idempotent:\nrequesting again leaves the original deadline alone.","operationId":"request_deletion_endpoint_auth_request_deletion_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/delete-account-now":{"post":{"tags":["auth"],"summary":"Delete Account Now Endpoint","description":"Profile page danger zone, \"Delete right now\": the whole account is\ntorn down at once, skipping the grace period (account_deletion.py's\ndelete_account_now). Irreversible, so dashboard sessions only, never\nan API key. The session stops working as soon as this returns.","operationId":"delete_account_now_endpoint_auth_delete_account_now_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeleteNowRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/cancel-deletion":{"post":{"tags":["auth"],"summary":"Cancel Deletion Endpoint","description":"Undoes a pending request_deletion_endpoint call -- available any\ntime before finalize_requested_deletions actually runs, no password\nconfirmation needed since this only ever makes the account safer.","operationId":"cancel_deletion_endpoint_auth_cancel_deletion_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email Endpoint","description":"No auth required -- the token itself (emailed to the address being\nproven) is the credential, the same way an OAuth callback's `code` is.\nRate-limited by IP anyway, as defense in depth against a client\nhammering this with junk tokens, even though a valid one is\ninfeasible to guess (see create_email_verification_token).","operationId":"verify_email_endpoint_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","operationId":"resend_verification_auth_resend_verification_post","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/auth/oauth/{provider}/login":{"get":{"tags":["auth"],"summary":"Oauth Login","operationId":"oauth_login_auth_oauth__provider__login_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"login_hint","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Login Hint"}},{"name":"choose_account","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Choose Account"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/{provider}/callback":{"get":{"tags":["auth"],"summary":"Oauth Callback","operationId":"oauth_callback_auth_oauth__provider__callback_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/session":{"get":{"tags":["auth"],"summary":"Oauth Session","operationId":"oauth_session_auth_oauth_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthSessionRead"}}}}}}},"/projects/suggested-region":{"get":{"tags":["projects"],"summary":"Suggested Region","description":"Issue #69: a best-effort region suggestion for the create-project\nform's region picker, derived from the caller's own IP -- see\napp/services/geolocation.py's own docstring for why this is never\nauthoritative. `current_user` is unused beyond requiring\nauthentication (same surface every other /projects route needs\nanyway); this reads nothing project-specific.\n\nEvery dashboard request arrives through frontend/nginx.conf's own\nreverse proxy (browser -> that nginx -> this backend), so\nrequest.client.host here is nginx's own docker-network address, not\nthe visitor's -- always a private IP, which the geolocation lookup\ncan never resolve, which is exactly the bug a real customer hit\n(always \"no preference\" pre-selected, never a real suggestion).\nnginx.conf sets X-Real-IP unconditionally from $remote_addr (not a\nclient-supplied header it forwards verbatim), so it reliably carries\nthe real visitor IP for that one documented hop -- read it first,\nfalling back to request.client.host for any other deployment shape\n(e.g. no reverse proxy at all) where it won't be present.\n\nDeliberately NOT the same trust stance app/api/deps.py's\nrate_limited_by_client_ip takes (that dependency explicitly refuses\nto honor a forwarded-IP header, since forging it would let an\nattacker bypass a rate limit). There's no equivalent attacker\nincentive here: this is a non-authoritative suggestion the customer\nmust still explicitly confirm before it's ever written to\nProject.preferred_region, so a forged header in the worst case only\never pre-checks the \"wrong\" radio option for someone to notice and\ncorrect.","operationId":"suggested_region_projects_suggested_region_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestedRegionRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/projects":{"post":{"tags":["projects"],"summary":"Create","operationId":"create_projects_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["projects"],"summary":"List Mine","operationId":"list_mine_projects_get","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectRead"},"title":"Response List Mine Projects Get"}}}}}}},"/projects/{project_id}":{"get":{"tags":["projects"],"summary":"Get","operationId":"get_projects__project_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["projects"],"summary":"Update","operationId":"update_projects__project_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["projects"],"summary":"Delete","operationId":"delete_projects__project_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/access-protection":{"put":{"tags":["projects"],"summary":"Protect","description":"Password-protects the project's endpoints, custom domains and open\npreviews (docs/password-protection.md), replacing any earlier\nusername and password. Takes effect on the next ingress refresh.\nPaid plan only; removing protection (below) is allowed on every plan.","operationId":"protect_projects__project_id__access_protection_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessProtectionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["projects"],"summary":"Unprotect","description":"Makes the project's endpoints (and its previews') public again.","operationId":"unprotect_projects__project_id__access_protection_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/park":{"post":{"tags":["projects"],"summary":"Park","description":"Issue #125: kicks off parking -- see app/services/parking.py's own\nmodule docstring for the full, background-driven sequence this\nrequest only starts (ProjectRead.parking_in_progress reflects that\nin-flight window; status itself only flips to \"parked\" once teardown\nactually finishes).","operationId":"park_projects__project_id__park_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/unpark":{"post":{"tags":["projects"],"summary":"Unpark","description":"Issue #125: reverses park() in one call -- see app/services/\nparking.py's own request_unpark_project for why no second,\nbackground-driven phase is needed here (unlike parking itself).","operationId":"unpark_projects__project_id__unpark_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/resume":{"post":{"tags":["projects"],"summary":"Resume","description":"Issue #132: lifts a suspension made because the account dropped to\nthe free plan with too many running projects -- never an operator's.","operationId":"resume_projects__project_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/previews":{"get":{"tags":["projects"],"summary":"List Previews","description":"Issue #36: every ephemeral preview environment app/services/\npreviews.py has created for this project's open pull requests, newest\nPR first -- each one a real Project in its own right (ProjectRead's\nown project_kind/pr_number fields), so the frontend can link straight\nto its existing /projects/{id} detail page rather than this endpoint\nneeding to duplicate any of what that page already shows.\n\nWith each one's latest deployment state and host reachability, the\nsame as the project list: without them every preview read as\n\"Deploying\" for good, however long it had been live.","operationId":"list_previews_projects__project_id__previews_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectRead"},"title":"Response List Previews Projects  Project Id  Previews Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/endpoints":{"get":{"tags":["projects"],"summary":"List Endpoints","description":"Task 41: every externally reachable hostname assigned to this\nproject's services -- one per Compose service that publishes a TCP\nport, stable across redeploys. `ready` is false until a \"deploy\" job\nhas actually reported that service's real bound host port at least\nonce (see app/services/ingress.py).","operationId":"list_endpoints_projects__project_id__endpoints_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServiceEndpointRead"},"title":"Response List Endpoints Projects  Project Id  Endpoints Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/activity":{"get":{"tags":["projects"],"summary":"List Activity","description":"Issue #5: this project's lifecycle history across every one of its\ndeployments, newest first -- when it was paused/started/stopped/\nfailed/etc, without the caller needing to already know which\ndeployment to look at (see app/api/deployments.py's own\nlist_deployment_jobs for the single-deployment version this widens).","operationId":"list_activity_projects__project_id__activity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectActivityItemRead"},"title":"Response List Activity Projects  Project Id  Activity Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/deployments":{"post":{"tags":["deployments"],"summary":"Create Deployment","operationId":"create_deployment_projects__project_id__deployments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["deployments"],"summary":"List Deployments","operationId":"list_deployments_projects__project_id__deployments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentRead"},"title":"Response List Deployments Projects  Project Id  Deployments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/deployments/validate":{"post":{"tags":["deployments"],"summary":"Validate Deployment","description":"A dry run of POST /projects/{id}/deployments for agents and CI: runs\nevery check a real deploy would (parsing, normalization, security and\nresource policy including the per-project size ceiling, container\nquota) against this project, and reports what would be ignored or\nchanged -- without creating a deployment or charging anything.","operationId":"validate_deployment_projects__project_id__deployments_validate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeValidationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/deployments/{deployment_id}":{"get":{"tags":["deployments"],"summary":"Get Deployment","operationId":"get_deployment_projects__project_id__deployments__deployment_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/deployments/{deployment_id}/compose":{"get":{"tags":["deployments"],"summary":"Get Deployment Compose","description":"Issue #98: lets a customer verify how their own Compose submission\nwas modified/processed before this platform ran it -- see\nDeploymentComposeRead's own docstring for what each field is and why\nit's always safe to return verbatim.","operationId":"get_deployment_compose_projects__project_id__deployments__deployment_id__compose_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentComposeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/deployments/{deployment_id}/stop":{"post":{"tags":["deployments"],"summary":"Stop Deployment","description":"Issue #43: lets an owner stop their own deployment directly --\npreviously only ever driven by the platform itself (idle-timeout) or\nan admin (suspend_project), never a customer's own request.","operationId":"stop_deployment_projects__project_id__deployments__deployment_id__stop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/deployments/{deployment_id}/start":{"post":{"tags":["deployments"],"summary":"Start Deployment","description":"Issue #43: the counterpart to stop_deployment above -- also doubles\nas \"wake my own idle-paused deployment early\" since reconcile_\ndeployment's own corrective-job logic already picks \"resume\" for that\ncase (see request_deployment_start's own docstring).","operationId":"start_deployment_projects__project_id__deployments__deployment_id__start_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/deployments/{deployment_id}/rollback":{"post":{"tags":["deployments"],"summary":"Rollback Deployment","description":"One-click rollback (docs/rollback.md): deploys this earlier version\nagain as the project's next version, which replaces the live one once\nit's up. Returns the new version. A repeat with the same Idempotency-Key\nreturns the version the first request made (200).","operationId":"rollback_deployment_projects__project_id__deployments__deployment_id__rollback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Idempotency-Key"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/deployments/{deployment_id}/restart":{"post":{"tags":["deployments"],"summary":"Restart Deployment","description":"Issue #43: dispatches a one-off \"restart\" job for a deployment\nthat's currently running -- see request_deployment_restart's own\ndocstring for why this can't just be a desired_state change the way\nstop/start above are. Progress is tracked the same way as any other\nlifecycle job, via GET .../jobs (\"restart\" is already one of\n_PROGRESS_JOB_TYPES above).","operationId":"restart_deployment_projects__project_id__deployments__deployment_id__restart_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/deployments/services/{service_name}/resources":{"post":{"tags":["deployments"],"summary":"Override Service Resources Endpoint","description":"Issue #68 follow-up: a newcomer-facing per-service CPU/memory/\nstorage override, for an owner who doesn't know how (or doesn't want)\nto hand-edit their docker-compose.yml. Project-scoped rather than\ndeployment-scoped (unlike every other endpoint in this router) since\nthis always acts on the project's *current* deployment, whichever\nversion that happens to be -- the caller never names a deployment_id,\nthe same reasoning app/services/resource_usage.py's and backup.py's\nown \"current deployment\" endpoints already follow.","operationId":"override_service_resources_endpoint_projects__project_id__deployments_services__service_name__resources_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"service_name","in":"path","required":true,"schema":{"type":"string","title":"Service Name"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceResourceOverrideRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/deployments/{deployment_id}/jobs":{"get":{"tags":["deployments"],"summary":"List Deployment Jobs","description":"This deployment's lifecycle job history, newest first -- what a\ndashboard polls to render a live \"what's happening right now\" progress\nview (queued -> assigned -> acknowledged -> running -> succeeded/\nfailed), since a Job's own fields update in real time rather than\nwaiting on the next reconciliation pass the way Deployment.status\ndoes.\n\n`limit`/`offset` exist because this list has no natural bound the way\nevery other list endpoint in this API does (a project's deployments,\nan account's workers, a project's backups all stay small on their\nown) -- a deployment stuck failing its corrective \"deploy\" job every\nreconciliation pass accumulates one row per attempt, indefinitely.\nThe frontend's own live-progress poll only ever needs the single most\nrecent job (`limit=1`); its separate \"show more\" history list pages\nthrough the rest.","operationId":"list_deployment_jobs_projects__project_id__deployments__deployment_id__jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentJobRead"},"title":"Response List Deployment Jobs Projects  Project Id  Deployments  Deployment Id  Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/deployments/{deployment_id}/logs":{"post":{"tags":["deployments"],"summary":"Request Logs","description":"Dispatches a one-shot log fetch to whatever worker currently runs\nthis deployment. Workers connect outbound only (no control-plane ->\nworker channel), so this can't return the logs synchronously -- the\ncaller polls GET .../logs/{job_id} until status is \"succeeded\" or\n\"failed\".","operationId":"request_logs_projects__project_id__deployments__deployment_id__logs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentLogsJobRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/deployments/{deployment_id}/logs/{job_id}":{"get":{"tags":["deployments"],"summary":"Get Logs","operationId":"get_logs_projects__project_id__deployments__deployment_id__logs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Deployment Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentLogsJobRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/env-vars":{"get":{"tags":["env-vars"],"summary":"List Env Vars","operationId":"list_env_vars_projects__project_id__env_vars_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectEnvVarRead"},"title":"Response List Env Vars Projects  Project Id  Env Vars Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/env-vars/{key}":{"put":{"tags":["env-vars"],"summary":"Set Env Var","operationId":"set_env_var_projects__project_id__env_vars__key__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectEnvVarSetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectEnvVarRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["env-vars"],"summary":"Delete Env Var","operationId":"delete_env_var_projects__project_id__env_vars__key__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/autoscaling":{"get":{"tags":["autoscaling"],"summary":"Get Autoscaling","description":"Each service's live-resize setting, current and declared size, and\nthe latest changes autoscaling made.","operationId":"get_autoscaling_projects__project_id__autoscaling_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoscalingRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/autoscaling/{service_name}":{"put":{"tags":["autoscaling"],"summary":"Update Autoscaling","description":"Turns live resizing on or off for one service, with its maxima.\nTurning it on needs the paid plan. Memory and CPU headroom reaches a\nrunning version with its next deploy; storage, and turning it off,\napply right away.","operationId":"update_autoscaling_projects__project_id__autoscaling__service_name__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"service_name","in":"path","required":true,"schema":{"type":"string","title":"Service Name"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAutoscaleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoscalingRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/custom-domains":{"get":{"tags":["custom-domains"],"summary":"List Domains","operationId":"list_domains_projects__project_id__custom_domains_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomDomainRead"},"title":"Response List Domains Projects  Project Id  Custom Domains Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["custom-domains"],"summary":"Create Domain","operationId":"create_domain_projects__project_id__custom_domains_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/custom-domains/{domain_id}":{"delete":{"tags":["custom-domains"],"summary":"Delete Domain","operationId":"delete_domain_projects__project_id__custom_domains__domain_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Domain Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/backups":{"post":{"tags":["backups"],"summary":"Request Backup","operationId":"request_backup_projects__project_id__backups_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["backups"],"summary":"List Backups","operationId":"list_backups_projects__project_id__backups_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BackupRead"},"title":"Response List Backups Projects  Project Id  Backups Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/backups/{backup_id}":{"get":{"tags":["backups"],"summary":"Get Backup","operationId":"get_backup_projects__project_id__backups__backup_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"backup_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Backup Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackupRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workers/register":{"post":{"tags":["workers"],"summary":"Register","operationId":"register_workers_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workers/me":{"get":{"tags":["workers"],"summary":"Read Self","operationId":"read_self_workers_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/workers/me/heartbeat":{"post":{"tags":["workers"],"summary":"Heartbeat","operationId":"heartbeat_workers_me_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerHeartbeatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/workers/me/orphans":{"post":{"tags":["workers"],"summary":"Check Orphans","description":"The orphan sweep: which of the deployments this host has containers\nfor are placed elsewhere (app/services/orphans.py).","operationId":"check_orphans_workers_me_orphans_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrphanCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrphanCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/workers/me/credentials/rotate":{"post":{"tags":["workers"],"summary":"Rotate Credential","operationId":"rotate_credential_workers_me_credentials_rotate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerCredentialRotateResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/workers/me/jobs":{"get":{"tags":["jobs"],"summary":"List My Jobs","operationId":"list_my_jobs_workers_me_jobs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/JobRead"},"type":"array","title":"Response List My Jobs Workers Me Jobs Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/workers/me/jobs/{job_id}/ack":{"post":{"tags":["jobs"],"summary":"Acknowledge","operationId":"acknowledge_workers_me_jobs__job_id__ack_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workers/me/jobs/{job_id}/status":{"post":{"tags":["jobs"],"summary":"Report Status","operationId":"report_status_workers_me_jobs__job_id__status_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/physical-hosts":{"get":{"tags":["admin"],"summary":"List Hosts","operationId":"list_hosts_admin_physical_hosts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PhysicalHostRead"},"type":"array","title":"Response List Hosts Admin Physical Hosts Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin"],"summary":"Create Host","operationId":"create_host_admin_physical_hosts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/physical-hosts/{host_id}":{"get":{"tags":["admin"],"summary":"Get Host","description":"Mainly for polling one host's bootstrap_status/bootstrap_error/\nbootstrap_steps after POST /physical-hosts/bootstrap hands the actual\nprovisioning off to a background thread -- see that endpoint's own\ndocstring for why. list_hosts above would also show the same fields,\nbut re-fetching the whole fleet just to watch one host's progress is\nwasteful once there's more than a handful of hosts.","operationId":"get_host_admin_physical_hosts__host_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Host Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Destroy Host","description":"Permanently removes the PhysicalHost row (its worker cascades away\nwith it -- app/models/worker.py's cascade=\"all, delete-orphan\"). This\nis purely a control-plane bookkeeping operation: it does not reach out\nover SSH to the host itself (there's no VM to tear down anymore, and\nunenrolling/decommissioning the box itself is a separate, deliberately\nout-of-scope operator action).\n\ninvalidate_host_destruction runs first, while Deployment/ServiceEndpoint\nrows still point at this host (Issue #21) -- once the row below is\nactually deleted, those FKs SET NULL automatically and there would be\nnothing left to find them by.","operationId":"destroy_host_admin_physical_hosts__host_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Host Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/physical-hosts/bootstrap":{"post":{"tags":["admin"],"summary":"Bootstrap Host Endpoint","description":"An admin hands over SSH access to a freshly-installed Ubuntu/Debian\nbox and this turns it into a working PhysicalHost with its own Worker\nAgent already running -- LVM-backed storage, Docker, Kata Containers,\nand the worker agent enrolled with this control plane -- rather than\nan operator following docs/host-bootstrap.md by hand.\n\nEverything up through opening the SSH connection happens synchronously\n(so a bad credential, a duplicate address, or a misconfigured control\nplane still comes back as an immediate 4xx/5xx exactly as before); the\nactual provisioning -- apt installs, a multi-GB Kata Containers\ntarball, Docker, the worker agent, WireGuard, Traefik -- then runs in\na background thread, and this returns 202 with bootstrap_status\n\"running\" rather than waiting for it. On real hardware that sequence\nroutinely takes several minutes, which a request held open that long\ndoes not reliably survive: Cloudflare (and most reverse proxies) kill\nan in-flight request around 100s with a 524, even though the backend\nkeeps working and the bootstrap itself succeeds. An admin now polls\nGET /physical-hosts/{id} for bootstrap_status/bootstrap_error/\nbootstrap_steps instead of depending on one long-lived response.\n\nThe PhysicalHost row (and its enrollment token) are created *first*,\nbefore the SSH session ever runs a single command: the worker agent\nneeds that token to register with on first boot, so there's no way\naround creating the row before bootstrap can succeed. See\napp/services/bootstrap/host_bootstrap.py's own module docstring for\nexactly what this does and doesn't do, and the known gap that\nordering leaves: a bootstrap that fails partway through leaves this\nrow behind rather than cleaning it up automatically.\n\nSame unverified-against-real-hardware-from-this-sandbox caveat as\nevery other provisioning operation this project has had --\napp/services/bootstrap/ssh_executor.py's own module docstring.","operationId":"bootstrap_host_endpoint_admin_physical_hosts_bootstrap_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostBootstrapRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/physical-hosts/check":{"post":{"tags":["admin"],"summary":"Check Host Endpoint","description":"A non-destructive dry run for `/physical-hosts/bootstrap` above --\nopens the same SSH connection and checks the same preconditions\nhost_bootstrap.py's own preflight/kvm-verify steps do (OS, CPU\nvirtualization, volume group existence and free space, outbound\nreachability, ...), but never installs anything, never writes\nanything, and never creates a PhysicalHost row. Meant to be called\n(and re-called) freely while getting a new box ready, before\ncommitting to the real bootstrap call -- which is slow and leaves a\nrow behind even on failure (see that endpoint's own docstring).\n\nIf the request gives neither ssh_password nor ssh_private_key, this\nre-checks an *already-bootstrapped* host using the control plane's\nown stored identity (the dockerstation-ctl account bootstrap's last\nstep already trusted there) rather than asking an admin to re-enter\na credential. A missing control-plane key surfaces as a failed \"SSH\nconnection\" check, same as any other connection failure, rather\nthan a 500 -- consistent with every other check here never raising.\n\nSee app/services/bootstrap/host_check.py's own module docstring for\nthe full list of checks and why each one never aborts the rest.","operationId":"check_host_endpoint_admin_physical_hosts_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostCheckRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/workers":{"get":{"tags":["admin"],"summary":"List All Workers","operationId":"list_all_workers_admin_workers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkerRead"},"type":"array","title":"Response List All Workers Admin Workers Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/workers/{worker_id}/quarantine":{"post":{"tags":["admin"],"summary":"Quarantine","operationId":"quarantine_admin_workers__worker_id__quarantine_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Worker Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/workers/{worker_id}/release":{"post":{"tags":["admin"],"summary":"Release","description":"Lifts a quarantine (app/services/worker.py's\nrelease_worker_from_quarantine).","operationId":"release_admin_workers__worker_id__release_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Worker Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/projects/{project_id}":{"get":{"tags":["admin"],"summary":"Get Project","description":"An admin-scoped project lookup by id -- deliberately not the\ncustomer-facing GET /projects/{id} (Task 7's get_owned_project), which\n404s for a project the caller doesn't own. There is no \"list every\nproject\" admin endpoint (an unbounded, unpaginated dump of every\ncustomer's projects has no real operational use yet); an operator\nlooks one up by the id a customer reports, the same starting point\nsupport tooling usually has.","operationId":"get_project_admin_projects__project_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/projects/{project_id}/suspend":{"post":{"tags":["admin"],"summary":"Suspend","description":"Task 52: pulls a project out of service (abuse, non-payment, an\nincident under investigation) without deleting it -- stops every live\ndeployment for real and blocks new ones (create_deployment_from_compose)\nand further scheduling (schedule_project) until unsuspended.\n\nIssue #42: `payload`/`payload.reason` are optional (a bare POST with no\nbody at all still works, same \"every field optional\" shape\nProjectUpdate's own always_on already has) -- the reason is surfaced\nback to the owner in the activity-feed entry and notification email\nthis now sends (suspend_project).","operationId":"suspend_admin_projects__project_id__suspend_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProjectSuspendRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/projects/{project_id}/assign-host":{"post":{"tags":["admin"],"summary":"Assign Host","description":"Issue #2: an admin picks exactly which PhysicalHost a not-yet-\nscheduled project lands on, overriding the background loop's normal\nleast-loaded-healthy-host placement (app/services/scheduler.py) --\nfor deliberately testing a specific host. 409s if the project is\nalready scheduled (see assign_project_host's own docstring for why\nthis never reassigns an already-placed project).","operationId":"assign_host_admin_projects__project_id__assign_host_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectHostAssignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/physical-hosts/{host_id}/dedicate":{"patch":{"tags":["admin"],"summary":"Dedicate","description":"Issue #19 (Fleet plan): reserves this host for the exclusive use of\nwhichever team `user_email` belongs to, or (user_email omitted/null)\nclears an existing reservation, reverting it to ordinary shared\ncapacity.","operationId":"dedicate_admin_physical_hosts__host_id__dedicate_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Host Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostDedicateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/physical-hosts/{host_id}/tier":{"patch":{"tags":["admin"],"summary":"Set Tier","description":"Tier-based scheduling (docs/fleet-tiers.md): tags this host\n\"standard\" or \"economy\" for scheduling purposes. Settable regardless\nof Settings.tier_based_scheduling_enabled, so hosts can be pre-tagged\nbefore that flag is ever turned on.","operationId":"set_tier_admin_physical_hosts__host_id__tier_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Host Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostTierRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/physical-hosts/{host_id}/region":{"patch":{"tags":["admin"],"summary":"Set Region","description":"Region pinning (Issue #69, docs/regions.md): tags this host with a\nregion (GET /admin/regions) or \"unassigned\". Tagging a region's first\nhost opens it to customers, unless it's hidden.","operationId":"set_region_admin_physical_hosts__host_id__region_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Host Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostRegionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhysicalHostRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/regions":{"get":{"tags":["admin"],"summary":"List Regions","description":"Each region (docs/regions.md, \"Adding a region\"): live, coming soon\n(no host tagged with it yet) or hidden by an operator.","operationId":"list_regions_admin_regions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RegionRead"},"type":"array","title":"Response List Regions Admin Regions Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin"],"summary":"Add Region","description":"A new region: coming soon everywhere until its first host is tagged\nwith it. Regions are never deleted (projects and status history point\nat them); hide one instead.","operationId":"add_region_admin_regions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RegionRead"},"type":"array","title":"Response Add Region Admin Regions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/regions/{region}":{"patch":{"tags":["admin"],"summary":"Edit Region","description":"Renames, re-describes or re-maps a region's countries, or hides it\nfrom customers (no new projects there; shown as coming soon) and opens\nit again. Projects already there keep running.","operationId":"edit_region_admin_regions__region__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"region","in":"path","required":true,"schema":{"type":"string","title":"Region"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RegionRead"},"title":"Response Edit Region Admin Regions  Region  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/projects/{project_id}/unsuspend":{"post":{"tags":["admin"],"summary":"Unsuspend","operationId":"unsuspend_admin_projects__project_id__unsuspend_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/usage/top":{"get":{"tags":["admin"],"summary":"Usage Leaderboard","description":"The accounts using the most CPU, memory, storage, data transfer or\ncontainers, from data already in the database (app/services/\nusage_leaderboard.py): no worker is asked for anything.","operationId":"usage_leaderboard_admin_usage_top_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_by","in":"query","required":false,"schema":{"type":"string","default":"cpu","title":"Order By"}},{"name":"window_hours","in":"query","required":false,"schema":{"type":"number","default":24.0,"title":"Window Hours"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageLeaderboardRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users":{"get":{"tags":["admin"],"summary":"Get User","description":"Issue #83: an admin-scoped user lookup by email -- same \"look it up\nby what a customer reports, no bulk listing\" posture GET /admin/\nprojects/{id}'s own docstring already explains, just keyed by email\n(the one thing support actually starts from) rather than an id.","operationId":"get_user_admin_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/impersonate":{"post":{"tags":["admin"],"summary":"Impersonate","description":"Issue #83: lets an admin log in *as* another user's account for\nsupport, without needing that user's password. Returns the exact same\nshape /auth/login does (an access token), so the frontend's existing\nlogin-session handling (AuthContext) needs no special case to apply\nit -- it's \"log in as this account,\" just minted a different way.\n\n`admin` is redeclared here (not just the router-level dependency)\npurely to get the admin's own User object for impersonate_user's audit\nlog -- FastAPI resolves get_current_admin_user once per request either\nway, so this doesn't re-run the auth check.","operationId":"impersonate_admin_users__user_id__impersonate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/routing-hash/{hash_value}":{"get":{"tags":["admin"],"summary":"Decode Routing Hash","description":"Issue #95: the admin-dashboard \"unpack\" side of the `cargo-routing-thru`\nresponse header -- an engineer pastes in whatever hash they saw on a\nlive response and gets the decoded step list back. See\napp/services/ingress.py's resolve_routing_config and\napp/services/routing_hash.py for how that header gets its value in\nthe first place. 404s for a hash nobody ever generated (including a\nsimple typo), not a 200 with an empty step list.\n\nA host or ServiceEndpoint since removed shows as \"since removed\"\nrather than failing the whole lookup -- a hash already shared in a\nsupport ticket stays decodable, the same \"no record left pointing at\ninfrastructure that no longer exists, but nothing else breaks because\nof it\" tradeoff RoutingPathHash's own docstring explains.","operationId":"decode_routing_hash_admin_routing_hash__hash_value__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hash_value","in":"path","required":true,"schema":{"type":"string","title":"Hash Value"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingPathDecodeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingress/routes":{"get":{"tags":["ingress"],"summary":"Get Routes","description":"Task 41: a Traefik-compatible HTTP dynamic-configuration document\n(https://doc.traefik.io/traefik/providers/http/) an operator's reverse\nproxy polls to learn which hostname routes to which live backend.\nNever verified against a real Traefik instance -- see docs/ingress.md.\n\n`physical_host_id` (Issue #95) is which host's own Traefik instance is\ndoing the polling -- app/api/admin.py's bootstrap_host_endpoint bakes\neach host's own id into the URL it's bootstrapped with, as a query\nparam on this same endpoint. Omitted entirely by a host bootstrapped\nbefore this feature existed, which just means no cargo-routing-thru\nheader for that host's requests until it's re-bootstrapped -- see\nresolve_routing_config's own docstring.","operationId":"get_routes_ingress_routes_get","parameters":[{"name":"physical_host_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Physical Host Id"}},{"name":"x-ingress-config-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ingress-Config-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Routes Ingress Routes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/wake-status":{"get":{"tags":["wake"],"summary":"Wake Status","description":"The interstitial page's (_starting_page) own poll target -- called\ndirectly from the visitor's browser against this control plane's\npublic address, deliberately *not* routed back through the paused\nhostname's own Traefik/DNS (which is exactly what the blocking\n/wake/{full_path:path} handler has to do, and exactly what stacks up\ninto a front-door timeout for a slow cold start -- see this module's\nown docstring). A plain, instant state read: no resume is triggered\nhere (the original /wake request already did that) and nothing is\never held open. CORS is deliberately wide open (any origin, no\ncredentials) -- the single bit of information this leaks, \"is this\npublicly-DNS'd hostname's deployment currently running,\" is no more\nsensitive than a plain request to the hostname itself would already\nreveal, and the caller is an arbitrary customer-owned hostname this\ncontrol plane can't enumerate in advance.","operationId":"wake_status_wake_status_get","parameters":[{"name":"host","in":"query","required":true,"schema":{"type":"string","title":"Host"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/wake/{full_path}":{"get":{"tags":["wake"],"summary":"Wake","description":"This handler's own URL is always the same fixed address\n(Settings.provisioning_control_plane_url + \"/wake/...\") -- a different\nhostname from the one the visitor actually typed, so the real target\nhostname arrives via WAKE_ORIGINAL_HOST_HEADER instead of the ordinary\nHost header (see app/services/ingress.py's resolve_routing_config, the\n\"Host header vs TLS SNI\" paragraph, for why the Host header itself\ncan't be trusted for this once something like Cloudflare sits in front\nof both this control plane's own hostname and the paused deployment's\none -- falls back to Host for any request that arrives some other way\n(direct testing, no such front door in the way). Flips the deployment\nback on, waits (bounded) for it to actually come up, then redirects the\nvisitor back to retry the exact same request -- see this module's own\ndocstring for why a redirect, not a proxied response.","operationId":"wake_wake__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"tags":["wake"],"summary":"Wake","description":"This handler's own URL is always the same fixed address\n(Settings.provisioning_control_plane_url + \"/wake/...\") -- a different\nhostname from the one the visitor actually typed, so the real target\nhostname arrives via WAKE_ORIGINAL_HOST_HEADER instead of the ordinary\nHost header (see app/services/ingress.py's resolve_routing_config, the\n\"Host header vs TLS SNI\" paragraph, for why the Host header itself\ncan't be trusted for this once something like Cloudflare sits in front\nof both this control plane's own hostname and the paused deployment's\none -- falls back to Host for any request that arrives some other way\n(direct testing, no such front door in the way). Flips the deployment\nback on, waits (bounded) for it to actually come up, then redirects the\nvisitor back to retry the exact same request -- see this module's own\ndocstring for why a redirect, not a proxied response.","operationId":"wake_wake__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["wake"],"summary":"Wake","description":"This handler's own URL is always the same fixed address\n(Settings.provisioning_control_plane_url + \"/wake/...\") -- a different\nhostname from the one the visitor actually typed, so the real target\nhostname arrives via WAKE_ORIGINAL_HOST_HEADER instead of the ordinary\nHost header (see app/services/ingress.py's resolve_routing_config, the\n\"Host header vs TLS SNI\" paragraph, for why the Host header itself\ncan't be trusted for this once something like Cloudflare sits in front\nof both this control plane's own hostname and the paused deployment's\none -- falls back to Host for any request that arrives some other way\n(direct testing, no such front door in the way). Flips the deployment\nback on, waits (bounded) for it to actually come up, then redirects the\nvisitor back to retry the exact same request -- see this module's own\ndocstring for why a redirect, not a proxied response.","operationId":"wake_wake__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["wake"],"summary":"Wake","description":"This handler's own URL is always the same fixed address\n(Settings.provisioning_control_plane_url + \"/wake/...\") -- a different\nhostname from the one the visitor actually typed, so the real target\nhostname arrives via WAKE_ORIGINAL_HOST_HEADER instead of the ordinary\nHost header (see app/services/ingress.py's resolve_routing_config, the\n\"Host header vs TLS SNI\" paragraph, for why the Host header itself\ncan't be trusted for this once something like Cloudflare sits in front\nof both this control plane's own hostname and the paused deployment's\none -- falls back to Host for any request that arrives some other way\n(direct testing, no such front door in the way). Flips the deployment\nback on, waits (bounded) for it to actually come up, then redirects the\nvisitor back to retry the exact same request -- see this module's own\ndocstring for why a redirect, not a proxied response.","operationId":"wake_wake__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["wake"],"summary":"Wake","description":"This handler's own URL is always the same fixed address\n(Settings.provisioning_control_plane_url + \"/wake/...\") -- a different\nhostname from the one the visitor actually typed, so the real target\nhostname arrives via WAKE_ORIGINAL_HOST_HEADER instead of the ordinary\nHost header (see app/services/ingress.py's resolve_routing_config, the\n\"Host header vs TLS SNI\" paragraph, for why the Host header itself\ncan't be trusted for this once something like Cloudflare sits in front\nof both this control plane's own hostname and the paused deployment's\none -- falls back to Host for any request that arrives some other way\n(direct testing, no such front door in the way). Flips the deployment\nback on, waits (bounded) for it to actually come up, then redirects the\nvisitor back to retry the exact same request -- see this module's own\ndocstring for why a redirect, not a proxied response.","operationId":"wake_wake__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"tags":["wake"],"summary":"Wake","description":"This handler's own URL is always the same fixed address\n(Settings.provisioning_control_plane_url + \"/wake/...\") -- a different\nhostname from the one the visitor actually typed, so the real target\nhostname arrives via WAKE_ORIGINAL_HOST_HEADER instead of the ordinary\nHost header (see app/services/ingress.py's resolve_routing_config, the\n\"Host header vs TLS SNI\" paragraph, for why the Host header itself\ncan't be trusted for this once something like Cloudflare sits in front\nof both this control plane's own hostname and the paused deployment's\none -- falls back to Host for any request that arrives some other way\n(direct testing, no such front door in the way). Flips the deployment\nback on, waits (bounded) for it to actually come up, then redirects the\nvisitor back to retry the exact same request -- see this module's own\ndocstring for why a redirect, not a proxied response.","operationId":"wake_wake__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["wake"],"summary":"Wake","description":"This handler's own URL is always the same fixed address\n(Settings.provisioning_control_plane_url + \"/wake/...\") -- a different\nhostname from the one the visitor actually typed, so the real target\nhostname arrives via WAKE_ORIGINAL_HOST_HEADER instead of the ordinary\nHost header (see app/services/ingress.py's resolve_routing_config, the\n\"Host header vs TLS SNI\" paragraph, for why the Host header itself\ncan't be trusted for this once something like Cloudflare sits in front\nof both this control plane's own hostname and the paused deployment's\none -- falls back to Host for any request that arrives some other way\n(direct testing, no such front door in the way). Flips the deployment\nback on, waits (bounded) for it to actually come up, then redirects the\nvisitor back to retry the exact same request -- see this module's own\ndocstring for why a redirect, not a proxied response.","operationId":"wake_wake__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/github/connect/start":{"get":{"tags":["github"],"summary":"Start Github Connect","description":"Returns the GitHub authorize URL instead of redirecting to it directly:\nget_owned_project needs this request's Authorization: Bearer header to know\nwhich project is connecting, and only an authenticated fetch() call can send\nthat header -- a raw browser navigation (window.location.href pointed\nstraight at this endpoint) never carries it, so the frontend must call this\nvia fetch() first and then navigate itself to the returned authorize_url.","operationId":"start_github_connect_projects__project_id__github_connect_start_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"login_hint","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}],"title":"Login Hint"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubConnectStartRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/github/connect/callback":{"get":{"tags":["github"],"summary":"Github Connect Callback","operationId":"github_connect_callback_github_connect_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/github/account":{"get":{"tags":["github"],"summary":"Get Connecting Account","description":"Issue #128: whose repos the picker is about to list.","operationId":"get_connecting_account_projects__project_id__github_account_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubAccountRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/github/repos":{"get":{"tags":["github"],"summary":"List Connectable Repos","operationId":"list_connectable_repos_projects__project_id__github_repos_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GithubRepoRead"},"title":"Response List Connectable Repos Projects  Project Id  Github Repos Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/github/repos/{repo_id}/branches":{"get":{"tags":["github"],"summary":"List Connectable Repo Branches","description":"Populates the connect flow's branch picker (Issue #64 -- connecting\na repo used to always register against GitHub's own reported default\nbranch, with no way to pick a different one). Same \"re-derive the repo\nfrom this token's own admin-rights listing\" guard as finish_github_connect\nbelow -- repo_id is client-supplied, so it's matched against list_repos\nrather than trusted to name a repo this token can actually see.","operationId":"list_connectable_repo_branches_projects__project_id__github_repos__repo_id__branches_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"integer","title":"Repo Id"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response List Connectable Repo Branches Projects  Project Id  Github Repos  Repo Id  Branches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/github/connect":{"post":{"tags":["github"],"summary":"Finish Github Connect","operationId":"finish_github_connect_projects__project_id__github_connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubConnectRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/github/connection":{"get":{"tags":["github"],"summary":"Get Github Connection","operationId":"get_github_connection_projects__project_id__github_connection_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["github"],"summary":"Update Github Connection","operationId":"update_github_connection_projects__project_id__github_connection_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubConnectionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["github"],"summary":"Delete Github Connection","operationId":"delete_github_connection_projects__project_id__github_connection_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/github/deploy-now":{"post":{"tags":["github"],"summary":"Deploy Github Connection Now","description":"The dashboard's manual trigger -- available on every plan, unlike\nautomatic deploy-on-push (quotas.py's check_push_to_deploy_allowed,\nenforced in app/api/github_webhooks.py's push handler, not here): this\nis how a free-plan account tries the connected-repo pipeline at all,\nand how any plan redeploys the current head without needing a real\npush.","operationId":"deploy_github_connection_now_projects__project_id__github_deploy_now_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/github/webhook":{"post":{"tags":["github"],"summary":"Receive Github Webhook","operationId":"receive_github_webhook_github_webhook_post","parameters":[{"name":"x-hub-signature-256","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Hub-Signature-256"}},{"name":"x-github-event","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Github-Event"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Receive Github Webhook Github Webhook Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/gitlab/connect/start":{"get":{"tags":["gitlab"],"summary":"Start Gitlab Connect","description":"Returns the GitLab authorize URL instead of redirecting to it directly --\nsame reasoning as github_connections.py's start_github_connect.","operationId":"start_gitlab_connect_projects__project_id__gitlab_connect_start_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitlabConnectStartRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/gitlab/connect/callback":{"get":{"tags":["gitlab"],"summary":"Gitlab Connect Callback","operationId":"gitlab_connect_callback_gitlab_connect_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/gitlab/account":{"get":{"tags":["gitlab"],"summary":"Get Connecting Account","description":"Issue #128: whose projects the picker is about to list.","operationId":"get_connecting_account_projects__project_id__gitlab_account_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitlabAccountRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/gitlab/repos":{"get":{"tags":["gitlab"],"summary":"List Connectable Repos","operationId":"list_connectable_repos_projects__project_id__gitlab_repos_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GitlabRepoRead"},"title":"Response List Connectable Repos Projects  Project Id  Gitlab Repos Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/gitlab/connect":{"post":{"tags":["gitlab"],"summary":"Finish Gitlab Connect","operationId":"finish_gitlab_connect_projects__project_id__gitlab_connect_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitlabConnectRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitlabConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/gitlab/connection":{"get":{"tags":["gitlab"],"summary":"Get Gitlab Connection","operationId":"get_gitlab_connection_projects__project_id__gitlab_connection_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitlabConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["gitlab"],"summary":"Update Gitlab Connection","operationId":"update_gitlab_connection_projects__project_id__gitlab_connection_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitlabConnectionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitlabConnectionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["gitlab"],"summary":"Delete Gitlab Connection","operationId":"delete_gitlab_connection_projects__project_id__gitlab_connection_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/gitlab/deploy-now":{"post":{"tags":["gitlab"],"summary":"Deploy Gitlab Connection Now","description":"The dashboard's manual trigger -- same reasoning as\ngithub_connections.py's own deploy_github_connection_now: available\non every plan, unlike automatic deploy-on-push (quotas.py's\ncheck_push_to_deploy_allowed, enforced in app/api/gitlab_webhooks.py's\npush handler, not here).","operationId":"deploy_gitlab_connection_now_projects__project_id__gitlab_deploy_now_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/gitlab/webhook":{"post":{"tags":["gitlab"],"summary":"Receive Gitlab Webhook","operationId":"receive_gitlab_webhook_gitlab_webhook_post","parameters":[{"name":"x-gitlab-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Gitlab-Token"}},{"name":"x-gitlab-event","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Gitlab-Event"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Receive Gitlab Webhook Gitlab Webhook Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/upgrade":{"post":{"tags":["billing"],"summary":"Start Upgrade","description":"Creates a Stripe customer for this account if it doesn't have one\nyet, then a Setup Intent against it. Returns only a client_secret for\nthe frontend's own Stripe Elements flow -- nothing here touches\nAccount.plan.","operationId":"start_upgrade_billing_upgrade_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/status":{"get":{"tags":["billing"],"summary":"Get Billing Status","operationId":"get_billing_status_billing_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/portal":{"post":{"tags":["billing"],"summary":"Open Billing Portal","description":"Issue #46: where a customer's invoices actually live -- Stripe's own\nhosted Billing Portal, not a listing this dashboard builds and\nmaintains itself (see create_billing_portal_session's own docstring).\n422s with a plain \"no invoices yet\" rather than ever attempting a\nportal session for an account that's never upgraded (no Stripe\ncustomer exists yet to open a portal session against).","operationId":"open_billing_portal_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/cancel-impact":{"get":{"tags":["billing"],"summary":"Get Cancel Impact","description":"Issue #132: exactly what cancel_plan below would take away, computed\nby the same code app/services/plan_downgrade.py runs on the real\ndowngrade, so the warning never drifts from what actually happens.","operationId":"get_cancel_impact_billing_cancel_impact_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelImpactRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/cancel":{"post":{"tags":["billing"],"summary":"Cancel Plan","description":"Cancels this account's Stripe subscription immediately -- there's no\nprepaid month to protect by deferring to period end, since this is\npure metered usage billing, not a flat recurring fee. Account.plan\nitself never flips here, same \"only a webhook does that\" split\nstart_upgrade already follows: canceling fires Stripe's own\ncustomer.subscription.deleted event, and that webhook's existing\nhandler (app/api/stripe_webhooks.py) already does the full clean reset\nback to the free tier.\n\nGitHub issue #59: flushes this account's own outstanding usage delta\n(flush_account_usage_before_cancel) before canceling -- otherwise\nwhatever cost accrued since the last periodic report_stripe_usage pass\n(up to ~Settings.reconciliation_interval_seconds) is never billed at\nall, since Stripe has no open billing period left to report it against\nonce the subscription is canceled.","operationId":"cancel_plan_billing_cancel_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/spend-cap":{"put":{"tags":["billing"],"summary":"Update Spend Cap","description":"Lets a customer lower their own hard spend-cap safety net, or raise it\nback up -- but never past the platform's own current ceiling\n(Settings.default_paid_spend_cap_cents), which is also what a newly\nupgraded account starts out with. Takes effect on the next spend-cap\ncheck (app/services/quotas.py's check_spend_cap / app/services/usage.py's\npause_accounts_over_spend_cap), not retroactively against the current\nperiod's already-ticked cost.","operationId":"update_spend_cap_billing_spend_cap_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendCapUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/usage":{"get":{"tags":["billing"],"summary":"Get Billing Usage","description":"Per-dimension cost-so-far for the current billing period --\nAccount.current_period_cost_cents only ever stores the combined total,\nso this sums the ledger (DeploymentUsageTick) directly, scoped to ticks\nsince the period started (the same window reset_elapsed_billing_periods\nitself anchors to).\n\nidle_storage_cost_cents is a second sum over the same window, scoped to\nis_storage_only_tick -- the slice of storage_cost_cents billed for a\ndeployment that was \"paused\"/\"stopped\" rather than \"running\" (its\nvolumes are still occupying real disk either way, see\ntick_deployment_usage's own docstring). A subset of storage_cost_cents,\nnot additional to it.","operationId":"get_billing_usage_billing_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingUsageRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/profile":{"get":{"tags":["billing"],"summary":"Get Billing Profile","operationId":"get_billing_profile_billing_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileRead"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["billing"],"summary":"Update Billing Profile","description":"Always saves locally first (so this works pre-upgrade, when there's\nno Stripe customer yet, and still works if Stripe sync itself fails\nbelow) -- the Stripe push, when there is a customer to push to, is\nbest-effort on top, never a precondition for saving the user's own\nrecord of their billing details.","operationId":"update_billing_profile_billing_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/stripe/webhook":{"post":{"tags":["stripe"],"summary":"Receive Stripe Webhook","operationId":"receive_stripe_webhook_stripe_webhook_post","parameters":[{"name":"stripe-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Receive Stripe Webhook Stripe Webhook Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/activity/recent":{"get":{"tags":["activity"],"summary":"List Recent","description":"Issue #8: the dashboard's \"Recents\" section -- the top `limit` most\nrecent actions across this account (project creation, deployment\nlifecycle jobs, billing plan changes), newest first, each linking to\nwhere that action's result actually lives.","operationId":"list_recent_activity_recent_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecentActivityItemRead"},"title":"Response List Recent Activity Recent Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/activity/events":{"get":{"tags":["activity"],"summary":"List Events","description":"Issue #15: the full, paginated, filterable \"Events\" page -- every\naction this account's owner(s) can see, not just the dashboard's top-5\nRecents widget (same underlying feed, just without that endpoint's own\n`le=20` ceiling and with `offset` for paging back through history).\n\"A team admin should see every team member's actions, not just their\nown\" (the issue's own words) falls out of this for free once Issue\n#18 (teams) lands -- list_account_recent_activity already aggregates\nacross every User sharing this caller's Account, not just the caller\nthemselves; today that's just one person, but no code here changes\nwhen that stops being true.\n\n`event_type`/`project_id`/`since`/`until` are the follow-up filter row\nthe issue asked for (type, project, date range). An arbitrary\n`project_id` the caller doesn't actually own just yields zero matches\n-- list_account_recent_activity only ever filters within the caller's\nown already-scoped project set, so this can't leak another account's\nactivity.","operationId":"list_events_activity_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecentActivityItemRead"},"title":"Response List Events Activity Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api-keys":{"get":{"tags":["api-keys"],"summary":"List Mine","operationId":"list_mine_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyRead"},"type":"array","title":"Response List Mine Api Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["api-keys"],"summary":"Create","operationId":"create_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api-keys/{api_key_id}":{"patch":{"tags":["api-keys"],"summary":"Update Limits","description":"Change a key's spend/container limits without rotating it. Raising\na reached spend limit lets its paused deployments wake again.","operationId":"update_limits_api_keys__api_key_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Api Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyLimitsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["api-keys"],"summary":"Revoke","operationId":"revoke_api_keys__api_key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Api Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/requests/{request_id}":{"get":{"tags":["oauth"],"summary":"Read Request","operationId":"read_request_oauth_requests__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthRequestRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/requests/{request_id}/approve":{"post":{"tags":["oauth"],"summary":"Approve","description":"Creates the connection's API key and a one-time code the app trades\nfor tokens at /token.","operationId":"approve_oauth_requests__request_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthApproveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDecisionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/requests/{request_id}/deny":{"post":{"tags":["oauth"],"summary":"Deny","operationId":"deny_oauth_requests__request_id__deny_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDecisionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/metrics":{"get":{"tags":["admin"],"summary":"Read Metrics","operationId":"read_metrics_admin_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Read Metrics Admin Metrics Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/templates":{"get":{"tags":["templates"],"summary":"List Published","operationId":"list_published_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ComposeTemplateRead"},"type":"array","title":"Response List Published Templates Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/templates":{"get":{"tags":["admin"],"summary":"List All","operationId":"list_all_admin_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ComposeTemplateRead"},"type":"array","title":"Response List All Admin Templates Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin"],"summary":"Create","operationId":"create_admin_templates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeTemplateWrite"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeTemplateRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/templates/check":{"post":{"tags":["admin"],"summary":"Check","operationId":"check_admin_templates_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeTemplateCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeTemplateCheckRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/templates/restore-builtins":{"post":{"tags":["admin"],"summary":"Restore Builtins","description":"Adds back the built-in templates that were deleted. Returns them.","operationId":"restore_builtins_admin_templates_restore_builtins_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ComposeTemplateRead"},"type":"array","title":"Response Restore Builtins Admin Templates Restore Builtins Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/templates/{template_id}/reset":{"post":{"tags":["admin"],"summary":"Reset","description":"Puts an edited built-in template back to its original text.","operationId":"reset_admin_templates__template_id__reset_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeTemplateRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/templates/{template_id}":{"put":{"tags":["admin"],"summary":"Update","operationId":"update_admin_templates__template_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeTemplateWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeTemplateRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete","operationId":"delete_admin_templates__template_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/maintenance":{"get":{"tags":["maintenance"],"summary":"Read Maintenance","operationId":"read_maintenance_maintenance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceRead"}}}}}}},"/admin/maintenance":{"put":{"tags":["admin"],"summary":"Update Maintenance","operationId":"update_maintenance_admin_maintenance_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/team":{"get":{"tags":["teams"],"summary":"Get My Team","operationId":"get_my_team_team_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/team/invites":{"get":{"tags":["teams"],"summary":"List Sent Invites","operationId":"list_sent_invites_team_invites_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InviteRead"},"type":"array","title":"Response List Sent Invites Team Invites Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["teams"],"summary":"Create Invite","operationId":"create_invite_team_invites_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/team/members/{user_id}":{"delete":{"tags":["teams"],"summary":"Remove Team Member","operationId":"remove_team_member_team_members__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/leave":{"post":{"tags":["teams"],"summary":"Leave My Team","operationId":"leave_my_team_team_leave_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/invites/mine":{"get":{"tags":["teams"],"summary":"List My Invites","operationId":"list_my_invites_invites_mine_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InviteRead"},"type":"array","title":"Response List My Invites Invites Mine Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/invites/{invite_id}/accept":{"post":{"tags":["teams"],"summary":"Accept My Invite","operationId":"accept_my_invite_invites__invite_id__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invites/{invite_id}/decline":{"post":{"tags":["teams"],"summary":"Decline My Invite","operationId":"decline_my_invite_invites__invite_id__decline_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/resource-usage":{"get":{"tags":["resource-usage"],"summary":"Read Project Resource Usage","operationId":"read_project_resource_usage_projects__project_id__resource_usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResourceUsageRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/resource-usage/history":{"get":{"tags":["resource-usage"],"summary":"Read Project Resource Usage History","operationId":"read_project_resource_usage_history_projects__project_id__resource_usage_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":24,"title":"Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResourceUsageHistoryBucketRead"},"title":"Response Read Project Resource Usage History Projects  Project Id  Resource Usage History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/containers":{"get":{"tags":["containers"],"summary":"List My Containers","operationId":"list_my_containers_containers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ContainerOverviewRead"},"type":"array","title":"Response List My Containers Containers Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/referrals":{"get":{"tags":["referrals"],"summary":"Get Referrals","operationId":"get_referrals_referrals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralSummaryRead"}}}}},"security":[{"HTTPBearer":[]}]}},"/referrals/claim":{"post":{"tags":["referrals"],"summary":"Claim","description":"Attributes the caller's new account to the referral code it signed\nup with (the dashboard calls this once, right after sign-in).","operationId":"claim_referrals_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralClaim"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/status/events":{"get":{"tags":["status"],"summary":"Read Status Events","operationId":"read_status_events_status_events_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RegionStatusEventRead"},"type":"array","title":"Response Read Status Events Status Events Get"}}}}}}},"/status/summary":{"get":{"tags":["status"],"summary":"Read Status Summary","description":"Each component's current state, for the status site's Worker\n(docs/status-page.md). Unauthenticated for the same reason as\n/status/events; a handful of indexed reads, and nothing that names a\nhost.","operationId":"read_status_summary_status_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusSummaryRead"}}}}}}}},"components":{"schemas":{"AccessProtectionUpdate":{"properties":{"username":{"type":"string","maxLength":64,"minLength":1,"title":"Username"},"password":{"type":"string","maxLength":72,"minLength":8,"title":"Password"}},"type":"object","required":["username","password"],"title":"AccessProtectionUpdate","description":"PUT /projects/{id}/access-protection: the username and password\nevery visitor of the project's endpoints is asked for."},"AccountDeleteNowRequest":{"properties":{"current_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Password"},"confirmation":{"type":"string","const":"DELETE","title":"Confirmation"}},"type":"object","required":["confirmation"],"title":"AccountDeleteNowRequest","description":"POST /auth/delete-account-now: no grace period, no undo. The typed\nword is a deliberate second step on top of the password (and the only\none for an account that signs in with GitHub/GitLab/Google alone)."},"AccountDeletionRequest":{"properties":{"current_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Password"}},"type":"object","title":"AccountDeletionRequest"},"AccountUsageRead":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"plan":{"type":"string","title":"Plan"},"emails":{"items":{"type":"string"},"type":"array","title":"Emails"},"projects":{"type":"integer","title":"Projects"},"containers_running":{"type":"integer","title":"Containers Running"},"containers_total":{"type":"integer","title":"Containers Total"},"cpu_core_hours":{"type":"number","title":"Cpu Core Hours"},"avg_cpu_cores":{"type":"number","title":"Avg Cpu Cores"},"memory_gb_hours":{"type":"number","title":"Memory Gb Hours"},"avg_memory_gb":{"type":"number","title":"Avg Memory Gb"},"storage_gb":{"type":"number","title":"Storage Gb"},"data_transfer_gb":{"type":"number","title":"Data Transfer Gb"}},"type":"object","required":["account_id","plan","emails","projects","containers_running","containers_total","cpu_core_hours","avg_cpu_cores","memory_gb_hours","avg_memory_gb","storage_gb","data_transfer_gb"],"title":"AccountUsageRead","description":"One account in the admin's usage leaderboard (app/services/\nusage_leaderboard.py): what its projects used over the window, from\ndata already in the database."},"ApiKeyCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"scope":{"type":"string","enum":["full","deploy","read"],"title":"Scope","default":"deploy"},"expires_in_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Expires In Days","default":90},"monthly_spend_limit_cents":{"anyOf":[{"type":"integer","maximum":100000000.0,"minimum":0.0},{"type":"null"}],"title":"Monthly Spend Limit Cents"},"max_containers":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Max Containers"}},"type":"object","required":["name"],"title":"ApiKeyCreateRequest"},"ApiKeyCreateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"token":{"type":"string","title":"Token"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"scope":{"type":"string","enum":["full","deploy","read"],"title":"Scope"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"monthly_spend_limit_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Spend Limit Cents"},"max_containers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Containers"}},"type":"object","required":["id","name","token","created_at","scope","expires_at","monthly_spend_limit_cents","max_containers"],"title":"ApiKeyCreateResponse"},"ApiKeyLimitsUpdate":{"properties":{"monthly_spend_limit_cents":{"anyOf":[{"type":"integer","maximum":100000000.0,"minimum":0.0},{"type":"null"}],"title":"Monthly Spend Limit Cents"},"max_containers":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Max Containers"}},"type":"object","title":"ApiKeyLimitsUpdate","description":"Only the fields sent change; send null to remove a limit."},"ApiKeyRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"scope":{"type":"string","enum":["full","deploy","read"],"title":"Scope"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"monthly_spend_limit_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Spend Limit Cents"},"max_containers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Containers"},"spend_this_period_cents":{"type":"integer","title":"Spend This Period Cents"},"running_containers":{"type":"integer","title":"Running Containers"},"connected_app":{"type":"boolean","title":"Connected App"}},"type":"object","required":["id","name","created_at","last_used_at","revoked_at","scope","expires_at","monthly_spend_limit_cents","max_containers","spend_this_period_cents","running_containers","connected_app"],"title":"ApiKeyRead","description":"Never includes the token itself -- see ApiKeyCreateResponse."},"AutoscaleEventRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"service_name":{"type":"string","title":"Service Name"},"direction":{"type":"string","title":"Direction"},"reason":{"type":"string","title":"Reason"},"from_memory_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"From Memory Mb"},"to_memory_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"To Memory Mb"},"from_cpu":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"From Cpu"},"to_cpu":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"To Cpu"},"from_storage_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"From Storage Gb"},"to_storage_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"To Storage Gb"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","service_name","direction","reason","from_memory_mb","to_memory_mb","from_cpu","to_cpu","from_storage_gb","to_storage_gb","status","error","created_at"],"title":"AutoscaleEventRead"},"AutoscalingRead":{"properties":{"available":{"type":"boolean","title":"Available"},"plan_max_memory_mb":{"type":"integer","title":"Plan Max Memory Mb"},"plan_max_cpu":{"type":"number","title":"Plan Max Cpu"},"plan_max_storage_gb":{"type":"number","title":"Plan Max Storage Gb"},"services":{"items":{"$ref":"#/components/schemas/ServiceAutoscaleRead"},"type":"array","title":"Services"},"events":{"items":{"$ref":"#/components/schemas/AutoscaleEventRead"},"type":"array","title":"Events"}},"type":"object","required":["available","plan_max_memory_mb","plan_max_cpu","plan_max_storage_gb","services","events"],"title":"AutoscalingRead"},"BackupRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"status":{"type":"string","title":"Status"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"has_volume_data":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Volume Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"}},"type":"object","required":["id","project_id","status","size_bytes","error","created_at","expires_at","download_url"],"title":"BackupRead"},"BillingPortalRead":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"BillingPortalRead"},"BillingProfileRead":{"properties":{"billing_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Name"},"billing_vat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Vat Id"},"billing_address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Address Line1"},"billing_address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Address Line2"},"billing_address_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Address City"},"billing_address_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Address State"},"billing_address_postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Address Postal Code"},"billing_address_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Address Country"}},"type":"object","required":["billing_name","billing_vat_id","billing_address_line1","billing_address_line2","billing_address_city","billing_address_state","billing_address_postal_code","billing_address_country"],"title":"BillingProfileRead","description":"The company/VAT-invoice details a business customer wants reflected\non their Stripe invoice -- see Account's own fields for why these live\nthere, not on User. from_attributes=True so app/api/billing.py can\nbuild this directly off the Account row (BillingProfileRead.\nmodel_validate(account)) rather than listing every field twice."},"BillingProfileUpdate":{"properties":{"billing_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Billing Name"},"billing_vat_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Billing Vat Id"},"billing_address_line1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Billing Address Line1"},"billing_address_line2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Billing Address Line2"},"billing_address_city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Billing Address City"},"billing_address_state":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Billing Address State"},"billing_address_postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Billing Address Postal Code"},"billing_address_country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Billing Address Country"}},"type":"object","title":"BillingProfileUpdate"},"BillingStatusRead":{"properties":{"plan":{"type":"string","title":"Plan"},"payment_status":{"type":"string","title":"Payment Status"},"current_period_cost_cents":{"type":"integer","title":"Current Period Cost Cents"},"monthly_spend_cap_cents":{"type":"integer","title":"Monthly Spend Cap Cents"},"max_spend_cap_cents":{"type":"integer","title":"Max Spend Cap Cents"},"monthly_awake_budget_seconds":{"type":"integer","title":"Monthly Awake Budget Seconds"},"current_period_awake_seconds_used":{"type":"integer","title":"Current Period Awake Seconds Used"},"has_billing_history":{"type":"boolean","title":"Has Billing History"},"current_period_data_transfer_gb_used":{"type":"number","title":"Current Period Data Transfer Gb Used","default":0.0},"included_data_transfer_gb":{"type":"number","title":"Included Data Transfer Gb","default":0.0}},"type":"object","required":["plan","payment_status","current_period_cost_cents","monthly_spend_cap_cents","max_spend_cap_cents","monthly_awake_budget_seconds","current_period_awake_seconds_used","has_billing_history"],"title":"BillingStatusRead"},"BillingUsageRead":{"properties":{"cpu_cost_cents":{"type":"integer","title":"Cpu Cost Cents"},"ram_cost_cents":{"type":"integer","title":"Ram Cost Cents"},"storage_cost_cents":{"type":"integer","title":"Storage Cost Cents"},"idle_storage_cost_cents":{"type":"integer","title":"Idle Storage Cost Cents"},"data_transfer_cost_cents":{"type":"integer","title":"Data Transfer Cost Cents","default":0}},"type":"object","required":["cpu_cost_cents","ram_cost_cents","storage_cost_cents","idle_storage_cost_cents"],"title":"BillingUsageRead"},"CancelImpactRead":{"properties":{"project_limit":{"type":"integer","title":"Project Limit"},"custom_domains":{"items":{"type":"string"},"type":"array","title":"Custom Domains"},"preview_environment_count":{"type":"integer","title":"Preview Environment Count"},"projects_to_suspend":{"items":{"type":"string"},"type":"array","title":"Projects To Suspend"},"parked_projects":{"items":{"type":"string"},"type":"array","title":"Parked Projects"},"api_keys":{"items":{"type":"string"},"type":"array","title":"Api Keys","default":[]}},"type":"object","required":["project_limit","custom_domains","preview_environment_count","projects_to_suspend","parked_projects"],"title":"CancelImpactRead","description":"Issue #132: what canceling the paid plan would take away right now,\nshown in the cancel confirmation before anything is changed."},"ChangeEmailRequest":{"properties":{"new_email":{"type":"string","format":"email","title":"New Email"},"current_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Password"}},"type":"object","required":["new_email"],"title":"ChangeEmailRequest"},"ChangePasswordRequest":{"properties":{"current_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Password"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["new_password"],"title":"ChangePasswordRequest"},"ComposeTemplateCheckRead":{"properties":{"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"notices":{"items":{"type":"string"},"type":"array","title":"Notices"},"fits_free_plan":{"type":"boolean","title":"Fits Free Plan"},"free_plan_problem":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Free Plan Problem"}},"type":"object","required":["errors","notices","fits_free_plan","free_plan_problem"],"title":"ComposeTemplateCheckRead","description":"errors block saving; free_plan_problem only flags it."},"ComposeTemplateCheckRequest":{"properties":{"compose_yaml":{"type":"string","maxLength":200000,"minLength":1,"title":"Compose Yaml"}},"type":"object","required":["compose_yaml"],"title":"ComposeTemplateCheckRequest"},"ComposeTemplateRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"compose_yaml":{"type":"string","title":"Compose Yaml"},"is_published":{"type":"boolean","title":"Is Published"},"sort_order":{"type":"integer","title":"Sort Order"},"fits_free_plan":{"type":"boolean","title":"Fits Free Plan"},"builtin_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Builtin Key"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","description","compose_yaml","is_published","sort_order","fits_free_plan","created_at","updated_at"],"title":"ComposeTemplateRead"},"ComposeTemplateWrite":{"properties":{"name":{"type":"string","maxLength":60,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":300,"title":"Description","default":""},"compose_yaml":{"type":"string","maxLength":200000,"minLength":1,"title":"Compose Yaml"},"is_published":{"type":"boolean","title":"Is Published","default":false},"sort_order":{"type":"integer","maximum":1000.0,"minimum":-1000.0,"title":"Sort Order","default":0}},"type":"object","required":["name","compose_yaml"],"title":"ComposeTemplateWrite"},"ComposeValidationRead":{"properties":{"valid":{"type":"boolean","title":"Valid"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"notices":{"items":{"type":"string"},"type":"array","title":"Notices"},"processed_spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Processed Spec"}},"type":"object","required":["valid","errors","notices","processed_spec"],"title":"ComposeValidationRead","description":"POST /projects/{id}/deployments/validate: what deploying this compose\nfile to this project would do, without deploying it. Always 200 --\n`valid` carries the verdict, so an agent iterating on a compose file\nreads one shape whether it passed or not.\n\n`errors` is what would make the deploy itself fail (validation stops at\nthe first one, like a real deploy). `notices` are parts of the file that\nwould be accepted but not applied as written (app/services/compose/\nnotices.py). `processed_spec` is what would actually run, when valid."},"ContainerOverviewRead":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"deployment_id":{"type":"string","format":"uuid","title":"Deployment Id"},"service_name":{"type":"string","title":"Service Name"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"image_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Label"},"state":{"type":"string","enum":["running","restarting","crash_looping","stopped_by_platform","paused","stopped","starting","failed"],"title":"State"},"exit_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exit Code"},"cpu_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Percent"},"cpu_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Limit"},"memory_usage_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Memory Usage Mb"},"memory_limit_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Memory Limit Mb"},"storage_used_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Storage Used Mb"},"storage_limit_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Storage Limit Gb"},"hostnames":{"items":{"type":"string"},"type":"array","title":"Hostnames","default":[]},"dns_unconfigured":{"type":"boolean","title":"Dns Unconfigured","default":false},"reported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reported At"}},"type":"object","required":["project_id","project_name","deployment_id","service_name","image","image_label","state","cpu_percent","cpu_limit","memory_usage_mb","memory_limit_mb","storage_used_mb","storage_limit_gb","reported_at"],"title":"ContainerOverviewRead"},"ContainerResourceUsageRead":{"properties":{"service_name":{"type":"string","title":"Service Name"},"cpu_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Percent"},"cpu_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cpu Limit"},"memory_usage_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Memory Usage Mb"},"memory_limit_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Memory Limit Mb"},"storage_limit_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Storage Limit Gb"},"storage_used_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Storage Used Mb"},"state":{"type":"string","enum":["running","restarting","crash_looping","stopped_by_platform","paused","stopped","starting","failed"],"title":"State","default":"starting"},"exit_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exit Code"},"data_transfer_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Transfer Bytes"},"fragile":{"type":"boolean","title":"Fragile","default":false},"fragile_source":{"anyOf":[{"type":"string","enum":["volume","declared"]},{"type":"null"}],"title":"Fragile Source"}},"type":"object","required":["service_name","cpu_percent","cpu_limit","memory_usage_mb","memory_limit_mb","storage_limit_gb","storage_used_mb"],"title":"ContainerResourceUsageRead","description":"One running service container's live usage alongside its own\ndeclared ceiling (the same limit app/services/compose/normalizer.py\nalready enforces or defaults -- see Phase 4a). `cpu_percent`/\n`memory_usage_mb`/`storage_used_mb` are None when no worker has\nreported live stats for this container yet (e.g. it only just\nstarted) -- `storage_used_mb` is also None for a service that simply\ndeclares no persistent volume, since there's nothing to measure."},"CustomDomainCreate":{"properties":{"service_name":{"type":"string","maxLength":255,"minLength":1,"title":"Service Name"},"hostname":{"type":"string","maxLength":255,"minLength":1,"title":"Hostname"}},"type":"object","required":["service_name","hostname"],"title":"CustomDomainCreate"},"CustomDomainRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"service_name":{"type":"string","title":"Service Name"},"hostname":{"type":"string","title":"Hostname"},"target_hostname":{"type":"string","title":"Target Hostname"},"acme_challenge_record_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acme Challenge Record Name"},"acme_challenge_target_hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acme Challenge Target Hostname"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"},"last_check_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Check Error"},"cert_issued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cert Issued At"},"cert_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cert Expires At"},"cert_last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cert Last Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","service_name","hostname","target_hostname","acme_challenge_record_name","acme_challenge_target_hostname","verified_at","last_checked_at","last_check_error","cert_issued_at","cert_expires_at","cert_last_error","created_at"],"title":"CustomDomainRead"},"DeploymentComposeRead":{"properties":{"submitted_yaml":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submitted Yaml"},"processed_spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Processed Spec"},"notices":{"items":{"type":"string"},"type":"array","title":"Notices","default":[]}},"type":"object","required":["submitted_yaml","processed_spec"],"title":"DeploymentComposeRead","description":"Issue #98: \"verify how we modified it and processed it before\nrunning it\" -- `submitted_yaml` is the exact text this deployment was\nbuilt from (null for a deployment predating this column, see\nDeployment.submitted_compose_yaml's own docstring); `processed_spec`\nis the already-parsed, normalized, policy-checked DeploymentSpec this\nplatform actually runs (Deployment.compose_spec verbatim -- never\ncontains a decrypted Issue #29 secret value, only ever a blank/absent\nkey a worker fills in at deploy time, see\napp/services/env_vars.py's apply_project_env_vars docstring for why\nthat's safe to return here)."},"DeploymentCreateRequest":{"properties":{"compose_yaml":{"type":"string","title":"Compose Yaml"}},"type":"object","required":["compose_yaml"],"title":"DeploymentCreateRequest"},"DeploymentJobRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Assigned At"},"acknowledged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Acknowledged At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"}},"type":"object","required":["id","job_type","status","created_at","assigned_at","acknowledged_at","started_at","completed_at","last_error"],"title":"DeploymentJobRead","description":"One entry in a deployment's lifecycle job history (app/api/\ndeployments.py's list_deployment_jobs) -- the raw material for a\nCloudflare-style \"what's happening right now\" progress view, since a\nJob's own status/timestamps update the moment a worker acts, rather\nthan waiting on the next reconciliation sweep the way Deployment.status\ndoes (see reconciliation.py's own module docstring)."},"DeploymentLogsJobRead":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"status":{"type":"string","title":"Status"},"logs":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Logs"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["job_id","status","logs","error"],"title":"DeploymentLogsJobRead","description":"The status of one log-fetch request (a \"fetch_logs\" Job) -- not the\nlogs themselves until `status == \"succeeded\"`. `logs` is a service\nname -> log text mapping (one entry per service in the deployment's\nspec, whichever containers the worker could actually find), null until\nthe job succeeds. `error` is populated only if the job failed."},"DeploymentRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"version":{"type":"integer","title":"Version"},"status":{"type":"string","title":"Status"},"desired_state":{"type":"string","title":"Desired State"},"actual_state":{"type":"string","title":"Actual State"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"degraded_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Degraded Reason"},"last_failure":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Failure"},"last_failure_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Failure At"},"dns_unconfigured_services":{"items":{"type":"string"},"type":"array","title":"Dns Unconfigured Services","default":[]},"host_unreachable":{"type":"boolean","title":"Host Unreachable","default":false},"rollback_of_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rollback Of Version"},"can_roll_back":{"type":"boolean","title":"Can Roll Back","default":false}},"type":"object","required":["id","project_id","version","status","desired_state","actual_state","created_at"],"title":"DeploymentRead"},"EmailVerificationRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"EmailVerificationRequest"},"GithubAccountRead":{"properties":{"username":{"type":"string","title":"Username"}},"type":"object","required":["username"],"title":"GithubAccountRead","description":"Issue #128: the GitHub account the in-progress connect authorized."},"GithubConnectRequest":{"properties":{"repo_id":{"type":"integer","title":"Repo Id"},"repo_full_name":{"type":"string","title":"Repo Full Name"},"default_branch":{"type":"string","title":"Default Branch"},"compose_path":{"type":"string","title":"Compose Path","default":"docker-compose.yml"},"watch_paths":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Watch Paths"}},"type":"object","required":["repo_id","repo_full_name","default_branch"],"title":"GithubConnectRequest"},"GithubConnectStartRead":{"properties":{"authorize_url":{"type":"string","title":"Authorize Url"}},"type":"object","required":["authorize_url"],"title":"GithubConnectStartRead","description":"start_github_connect's response -- a URL for the frontend's own\nwindow.location.href to navigate to. That endpoint can't itself\nredirect the browser there: get_owned_project needs this request's\nAuthorization: Bearer header to know which project is connecting, and\na raw browser navigation (window.location.href pointed straight at\nthe backend) can never carry that header, only an authenticated\nfetch() call can -- see start_github_connect's own docstring."},"GithubConnectionRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"repo_full_name":{"type":"string","title":"Repo Full Name"},"default_branch":{"type":"string","title":"Default Branch"},"compose_path":{"type":"string","title":"Compose Path"},"preview_environments_enabled":{"type":"boolean","title":"Preview Environments Enabled"},"previews_paused_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previews Paused Reason"},"previews_paused_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Previews Paused At"},"watch_paths":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Watch Paths"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","repo_full_name","default_branch","compose_path","preview_environments_enabled","watch_paths","created_at"],"title":"GithubConnectionRead"},"GithubConnectionUpdate":{"properties":{"preview_environments_enabled":{"type":"boolean","title":"Preview Environments Enabled"},"watch_paths":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Watch Paths"}},"type":"object","required":["preview_environments_enabled","watch_paths"],"title":"GithubConnectionUpdate"},"GithubRepoRead":{"properties":{"id":{"type":"integer","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"default_branch":{"type":"string","title":"Default Branch"}},"type":"object","required":["id","full_name","default_branch"],"title":"GithubRepoRead","description":"One repo in the connect picker -- GithubApi.GithubRepo, reshaped\nfor the API response (field names the frontend can render directly)."},"GitlabAccountRead":{"properties":{"username":{"type":"string","title":"Username"}},"type":"object","required":["username"],"title":"GitlabAccountRead","description":"Issue #128: the GitLab account the in-progress connect authorized."},"GitlabConnectRequest":{"properties":{"repo_id":{"type":"integer","title":"Repo Id"},"repo_full_name":{"type":"string","title":"Repo Full Name"},"default_branch":{"type":"string","title":"Default Branch"},"compose_path":{"type":"string","title":"Compose Path","default":"docker-compose.yml"},"watch_paths":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Watch Paths"}},"type":"object","required":["repo_id","repo_full_name","default_branch"],"title":"GitlabConnectRequest"},"GitlabConnectStartRead":{"properties":{"authorize_url":{"type":"string","title":"Authorize Url"}},"type":"object","required":["authorize_url"],"title":"GitlabConnectStartRead","description":"start_gitlab_connect's response -- a URL for the frontend's own\nwindow.location.href to navigate to. That endpoint can't itself\nredirect the browser there: get_owned_project needs this request's\nAuthorization: Bearer header to know which project is connecting, and\na raw browser navigation (window.location.href pointed straight at\nthe backend) can never carry that header, only an authenticated\nfetch() call can -- see start_gitlab_connect's own docstring."},"GitlabConnectionRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"repo_full_name":{"type":"string","title":"Repo Full Name"},"default_branch":{"type":"string","title":"Default Branch"},"compose_path":{"type":"string","title":"Compose Path"},"watch_paths":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Watch Paths"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","repo_full_name","default_branch","compose_path","watch_paths","created_at"],"title":"GitlabConnectionRead"},"GitlabConnectionUpdate":{"properties":{"watch_paths":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Watch Paths"}},"type":"object","required":["watch_paths"],"title":"GitlabConnectionUpdate","description":"The GitLab counterpart to GithubConnectionUpdate -- watch_paths is\nthe only setting GitLab connections have that's editable after connect\n(no preview_environments_enabled equivalent exists for GitLab yet)."},"GitlabRepoRead":{"properties":{"id":{"type":"integer","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"default_branch":{"type":"string","title":"Default Branch"}},"type":"object","required":["id","full_name","default_branch"],"title":"GitlabRepoRead","description":"One project in the connect picker -- GitlabApi.GitlabRepo, reshaped\nfor the API response (field names the frontend can render directly)."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InviteCreateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"InviteCreateRequest"},"InviteRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"responded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Responded At"}},"type":"object","required":["id","email","status","created_at","responded_at"],"title":"InviteRead"},"JobRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"deployment_id":{"type":"string","format":"uuid","title":"Deployment Id"},"volume_namespace":{"type":"string","format":"uuid","title":"Volume Namespace"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","title":"Status"},"correlation_id":{"type":"string","title":"Correlation Id"},"attempt_count":{"type":"integer","title":"Attempt Count"},"max_attempts":{"type":"integer","title":"Max Attempts"},"timed_out":{"type":"boolean","title":"Timed Out"},"assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Assigned At"},"acknowledged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Acknowledged At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"deployment_spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Deployment Spec"},"source":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Source"},"github_access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Access Token"},"gitlab_access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gitlab Access Token"},"backup_upload_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backup Upload Url"},"restore_download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Restore Download Url"}},"type":"object","required":["id","deployment_id","volume_namespace","job_type","status","correlation_id","attempt_count","max_attempts","timed_out","assigned_at","acknowledged_at","started_at","completed_at","last_error","deployment_spec","source","github_access_token","gitlab_access_token","backup_upload_url","restore_download_url"],"title":"JobRead"},"JobStatusUpdateRequest":{"properties":{"status":{"type":"string","enum":["running","succeeded","failed"],"title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"}},"type":"object","required":["status"],"title":"JobStatusUpdateRequest"},"LoginRead":{"properties":{"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"two_factor_required":{"type":"boolean","title":"Two Factor Required","default":false},"challenge_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Challenge Token"}},"type":"object","title":"LoginRead","description":"POST /auth/login. With two-factor sign-in on (issue #167), no token\nyet: `two_factor_required` and a `challenge_token` to send with a code\nto POST /auth/2fa/verify."},"MaintenanceRead":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"message":{"type":"string","title":"Message"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"}},"type":"object","required":["enabled","message","started_at"],"title":"MaintenanceRead"},"MaintenanceUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"message":{"type":"string","maxLength":500,"title":"Message","default":""}},"type":"object","required":["enabled"],"title":"MaintenanceUpdate"},"OAuthApproveRequest":{"properties":{"scope":{"type":"string","enum":["full","deploy","read"],"title":"Scope","default":"deploy"},"monthly_spend_limit_cents":{"anyOf":[{"type":"integer","maximum":100000000.0,"minimum":0.0},{"type":"null"}],"title":"Monthly Spend Limit Cents"},"max_containers":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Max Containers"}},"type":"object","title":"OAuthApproveRequest"},"OAuthDecisionRead":{"properties":{"redirect_url":{"type":"string","title":"Redirect Url"}},"type":"object","required":["redirect_url"],"title":"OAuthDecisionRead","description":"Where the browser goes next: back to the app, with a code or an\naccess_denied error."},"OAuthRequestRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Uri"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"redirect_host":{"type":"string","title":"Redirect Host"},"requested_scope":{"type":"string","enum":["full","deploy","read"],"title":"Requested Scope"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["id","client_name","client_uri","redirect_uri","redirect_host","requested_scope","expires_at"],"title":"OAuthRequestRead","description":"A pending MCP sign-in, for the dashboard's consent page."},"OAuthSessionRead":{"properties":{"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"two_factor_required":{"type":"boolean","title":"Two Factor Required","default":false},"challenge_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Challenge Token"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"account_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Label"}},"type":"object","title":"OAuthSessionRead","description":"GET /auth/oauth/session: the token (or, with two-factor sign-in on,\nthe challenge), plus (issue #148) which provider account just signed\nin, for the login page's \"last used\" hint."},"OrphanCheckRequest":{"properties":{"deployment_ids":{"items":{"type":"string"},"type":"array","maxItems":5000,"title":"Deployment Ids"}},"type":"object","title":"OrphanCheckRequest","description":"The deployments a worker's host has containers for (the orphan\nsweep, app/services/orphans.py)."},"OrphanCheckResponse":{"properties":{"orphaned":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Orphaned"}},"type":"object","required":["orphaned"],"title":"OrphanCheckResponse"},"PhysicalHostBootstrapRequest":{"properties":{"hostname":{"type":"string","maxLength":255,"minLength":1,"title":"Hostname"},"ssh_host":{"type":"string","minLength":1,"title":"Ssh Host"},"ssh_port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Ssh Port","default":22},"ssh_username":{"type":"string","minLength":1,"title":"Ssh Username","default":"root"},"ssh_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssh Password"},"ssh_private_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssh Private Key"},"volume_group":{"type":"string","minLength":1,"title":"Volume Group","default":"vg0"},"disk_pool_size_gb":{"type":"integer","minimum":10.0,"title":"Disk Pool Size Gb","default":350}},"type":"object","required":["hostname","ssh_host"],"title":"PhysicalHostBootstrapRequest","description":"An admin hands over SSH access to a freshly-installed Ubuntu/Debian\nbox and this drives the whole host_bootstrap.py sequence against it in\none call: install Docker + Kata Containers, register both the\n`kata-dragonball` (this platform's default runtime) and `kata-clh`\n(dual-registered fallback) Docker runtimes, install the worker agent,\nand enroll it with this control plane. ssh_password/ssh_private_key\nare used once, for this\ncall only -- never persisted (the resulting worker instead\nauthenticates with its own issued bearer credential; see\nhost_bootstrap.py's own module docstring).\n\nLeaving both ssh_password and ssh_private_key unset means \"authenticate\nas the control plane's own identity\" -- useful when an admin has\nalready added this control plane's public key\n(`Settings.provisioning_ssh_private_key_path` + `.pub`) to the box's\n`authorized_keys` by hand ahead of time, rather than pasting a\none-off credential into this call. Same relaxed-from-exactly-one rule\nPhysicalHostCheckRequest already uses, and the same resolution\napp/api/admin.py's bootstrap_host_endpoint does for it -- at most one\nof the two may still be given explicitly; both would be ambiguous."},"PhysicalHostCheckItem":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["pass","warn","fail"],"title":"Status"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["name","status","detail"],"title":"PhysicalHostCheckItem"},"PhysicalHostCheckRead":{"properties":{"checks":{"items":{"$ref":"#/components/schemas/PhysicalHostCheckItem"},"type":"array","title":"Checks"},"ready":{"type":"boolean","title":"Ready"}},"type":"object","required":["checks","ready"],"title":"PhysicalHostCheckRead"},"PhysicalHostCheckRequest":{"properties":{"ssh_host":{"type":"string","minLength":1,"title":"Ssh Host"},"ssh_port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Ssh Port","default":22},"ssh_username":{"type":"string","minLength":1,"title":"Ssh Username","default":"root"},"ssh_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssh Password"},"ssh_private_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssh Private Key"},"volume_group":{"type":"string","minLength":1,"title":"Volume Group","default":"vg0"},"disk_pool_size_gb":{"type":"integer","minimum":10.0,"title":"Disk Pool Size Gb","default":350}},"type":"object","required":["ssh_host"],"title":"PhysicalHostCheckRequest","description":"The same SSH/volume-group fields PhysicalHostBootstrapRequest\ntakes, minus `hostname` -- this never creates a PhysicalHost row, so\nthere's nothing to name. Deliberately a separate schema rather than\ninheriting from PhysicalHostBootstrapRequest: the two requests are\nconceptually different actions (a read-only probe vs. an\nirreversible install) that just happen to need overlapping\nconnection info.\n\nUnlike the bootstrap request, a credential here is optional: leaving\nboth ssh_password and ssh_private_key unset means \"authenticate as\nthe control plane's own trust identity\" (the dockerstation-ctl\naccount host_bootstrap.py's own last step already installed on a\npreviously-bootstrapped host) -- see app/api/admin.py's\ncheck_host_endpoint, which resolves that case. Still at most one of\nthe two may be given explicitly; both would be ambiguous."},"PhysicalHostCreate":{"properties":{"hostname":{"type":"string","maxLength":255,"minLength":1,"title":"Hostname"}},"type":"object","required":["hostname"],"title":"PhysicalHostCreate"},"PhysicalHostDedicateRequest":{"properties":{"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"}},"type":"object","title":"PhysicalHostDedicateRequest","description":"Issue #19: an admin dedicates (or, with user_email omitted/null,\nun-dedicates) a host to whichever team `user_email` belongs to --\nresolved by email, not a raw account id, since that's the only\nidentifier an admin actually has for a customer (see\napp/services/admin.py's dedicate_host for why)."},"PhysicalHostRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"hostname":{"type":"string","title":"Hostname"},"status":{"type":"string","title":"Status"},"ssh_host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssh Host"},"ssh_port":{"type":"integer","title":"Ssh Port","default":22},"mesh_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mesh Ip"},"bootstrap_status":{"type":"string","title":"Bootstrap Status"},"bootstrap_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bootstrap Error"},"bootstrap_steps":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bootstrap Steps"},"dedicated_account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Dedicated Account Id"},"tier":{"type":"string","title":"Tier","default":"standard"},"region":{"type":"string","title":"Region","default":"unassigned"}},"type":"object","required":["id","hostname","status","bootstrap_status"],"title":"PhysicalHostRead"},"PhysicalHostRegionRequest":{"properties":{"region":{"type":"string","maxLength":24,"title":"Region"}},"type":"object","required":["region"],"title":"PhysicalHostRegionRequest","description":"Region pinning (Issue #69, docs/regions.md): tags which of the two\ndeployed regions this host actually sits in. Always settable -- there's\nno \"off\" flag the way tier-based scheduling has one, since this only\never excludes a host from a project that explicitly requested a\nregion, never changes any existing project's placement by itself."},"PhysicalHostTierRequest":{"properties":{"tier":{"type":"string","enum":["standard","economy"],"title":"Tier"}},"type":"object","required":["tier"],"title":"PhysicalHostTierRequest","description":"Tier-based scheduling: sets which cost tier a host belongs to.\nTakes effect in scheduling decisions only once\nSettings.tier_based_scheduling_enabled is also true (see that\nsetting's own docstring) -- settable ahead of time regardless."},"ProjectActivityItemRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"deployment_id":{"type":"string","format":"uuid","title":"Deployment Id"},"deployment_version":{"type":"integer","title":"Deployment Version"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","title":"Status"},"initiated_by":{"type":"string","title":"Initiated By"},"api_key_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Name"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"}},"type":"object","required":["id","deployment_id","deployment_version","job_type","status","initiated_by","created_at","completed_at","last_error"],"title":"ProjectActivityItemRead","description":"One entry in a project's activity feed (Issue #5: \"see when a\nproject is paused/started/stopped/failed\") -- the same shape as\nDeploymentJobRead below, widened across every deployment the project\nhas ever had (app/services/activity.py's list_project_activity) and\ncarrying deployment_id/deployment_version since a project-wide feed,\nunlike a single deployment's own job list, has to say *which*\ndeployment each entry belongs to."},"ProjectCreate":{"properties":{"name":{"type":"string","title":"Name"},"preferred_region":{"anyOf":[{"type":"string","maxLength":24},{"type":"null"}],"title":"Preferred Region"}},"type":"object","required":["name"],"title":"ProjectCreate"},"ProjectEnvVarRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"key":{"type":"string","title":"Key"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","project_id","key","created_at","updated_at"],"title":"ProjectEnvVarRead","description":"Never includes the value itself -- see ProjectEnvVar's own\ndocstring on why this is write-only, the same way ApiKeyRead never\nincludes a key's token."},"ProjectEnvVarSetRequest":{"properties":{"value":{"type":"string","maxLength":65536,"title":"Value"}},"type":"object","required":["value"],"title":"ProjectEnvVarSetRequest"},"ProjectHostAssignRequest":{"properties":{"physical_host_id":{"type":"string","format":"uuid","title":"Physical Host Id"}},"type":"object","required":["physical_host_id"],"title":"ProjectHostAssignRequest","description":"Issue #2: an admin-only override of Task 27's normal scheduler\nplacement, so an operator can pick exactly which PhysicalHost a\nproject lands on (testing a specific host, rather than whichever one\npick_least_loaded_healthy_host would have chosen)."},"ProjectRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"physical_host_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Physical Host Id"},"always_on":{"type":"boolean","title":"Always On"},"block_crawlers_on_wake":{"type":"boolean","title":"Block Crawlers On Wake"},"browser_only_wake":{"type":"boolean","title":"Browser Only Wake"},"access_protected":{"type":"boolean","title":"Access Protected","default":false},"access_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Username"},"parked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Parked At"},"parking_in_progress":{"type":"boolean","title":"Parking In Progress"},"suspended_for_plan_limit":{"type":"boolean","title":"Suspended For Plan Limit","default":false},"has_persistent_volumes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Persistent Volumes"},"preferred_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Region"},"project_kind":{"type":"string","title":"Project Kind"},"parent_project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Project Id"},"pr_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pr Number"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deployment_actual_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Actual State"},"host_unreachable":{"type":"boolean","title":"Host Unreachable","default":false}},"type":"object","required":["id","name","status","owner_id","physical_host_id","always_on","block_crawlers_on_wake","browser_only_wake","parking_in_progress","project_kind","parent_project_id","pr_number","created_at","updated_at"],"title":"ProjectRead"},"ProjectResourceUsageRead":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"reported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reported At"},"total_cpu_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cpu Percent"},"total_memory_usage_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Memory Usage Mb"},"total_memory_limit_mb":{"type":"integer","title":"Total Memory Limit Mb"},"total_storage_limit_gb":{"type":"number","title":"Total Storage Limit Gb"},"storage_used_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Storage Used Mb"},"data_transfer_bytes":{"type":"integer","title":"Data Transfer Bytes","default":0},"containers":{"items":{"$ref":"#/components/schemas/ContainerResourceUsageRead"},"type":"array","title":"Containers"}},"type":"object","required":["project_id","reported_at","total_cpu_percent","total_memory_usage_mb","total_memory_limit_mb","total_storage_limit_gb","storage_used_mb","containers"],"title":"ProjectResourceUsageRead","description":"A project-wide rollup (every currently-running container's usage\nsummed) plus the per-container breakdown Issue #26 also asked for.\n`reported_at` is the worker's own last heartbeat time -- None means\nthis project has never been deployed, or its worker has never\nreported in, so every usage figure below is also None/empty."},"ProjectSuspendRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ProjectSuspendRequest","description":"Issue #42: an optional admin-facing note on *why* a project is\nbeing suspended -- surfaced back to the owner both in the\nactivity-feed entry this creates and in the notification email sent\nto them (app/services/admin.py's suspend_project)."},"ProjectUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"always_on":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Always On"},"block_crawlers_on_wake":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Block Crawlers On Wake"},"browser_only_wake":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Browser Only Wake"},"preferred_region":{"anyOf":[{"type":"string","maxLength":24},{"type":"null"}],"title":"Preferred Region"}},"type":"object","title":"ProjectUpdate"},"RecentActivityItemRead":{"properties":{"kind":{"type":"string","title":"Kind"},"event_type":{"type":"string","title":"Event Type"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"label":{"type":"string","title":"Label"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"link":{"type":"string","title":"Link"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"initiated_by":{"type":"string","title":"Initiated By"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"api_key_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Name"}},"type":"object","required":["kind","event_type","status","label","occurred_at","link","project_id","project_name","initiated_by"],"title":"RecentActivityItemRead","description":"One entry in the dashboard's \"Recents\" section (Issue #8) -- see\napp/services/activity.py's RecentActivityItem for why this spans three\nunrelated source tables behind one flat shape, and for `event_type`/\n`status`/`project_id`/`project_name` (Issue #15 follow-up: the Events\npage's type column, color coding, and filters)."},"RecoveryCodesRead":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"}},"type":"object","required":["recovery_codes"],"title":"RecoveryCodesRead"},"ReferralClaim":{"properties":{"code":{"type":"string","maxLength":32,"minLength":1,"title":"Code"}},"type":"object","required":["code"],"title":"ReferralClaim"},"ReferralCreditRead":{"properties":{"role":{"type":"string","title":"Role"},"amount_cents":{"type":"integer","title":"Amount Cents"},"status":{"type":"string","title":"Status"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"void_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Void Reason"}},"type":"object","required":["role","amount_cents","status","expires_at","granted_at","void_reason"],"title":"ReferralCreditRead"},"ReferralRead":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At"},"status":{"type":"string","title":"Status"},"reward_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reward After"}},"type":"object","required":["created_at","status","reward_after"],"title":"ReferralRead","description":"Someone who signed up through this account's link. Deliberately no\nemail or name: the link is shareable, so who used it stays private."},"ReferralSummaryRead":{"properties":{"code":{"type":"string","title":"Code"},"link":{"type":"string","title":"Link"},"credit_cents":{"type":"integer","title":"Credit Cents"},"min_paid_cents":{"type":"integer","title":"Min Paid Cents"},"hold_days":{"type":"integer","title":"Hold Days"},"credit_valid_days":{"type":"integer","title":"Credit Valid Days"},"max_rewards_per_year":{"type":"integer","title":"Max Rewards Per Year"},"referrals":{"items":{"$ref":"#/components/schemas/ReferralRead"},"type":"array","title":"Referrals"},"credits":{"items":{"$ref":"#/components/schemas/ReferralCreditRead"},"type":"array","title":"Credits"},"referred_by":{"anyOf":[{"$ref":"#/components/schemas/ReferredByRead"},{"type":"null"}]},"granted_cents":{"type":"integer","title":"Granted Cents"},"pending_cents":{"type":"integer","title":"Pending Cents"}},"type":"object","required":["code","link","credit_cents","min_paid_cents","hold_days","credit_valid_days","max_rewards_per_year","referrals","credits","referred_by","granted_cents","pending_cents"],"title":"ReferralSummaryRead"},"ReferredByRead":{"properties":{"status":{"type":"string","title":"Status"},"paid_cents":{"type":"integer","title":"Paid Cents"},"reward_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reward After"}},"type":"object","required":["status","paid_cents","reward_after"],"title":"ReferredByRead","description":"This account's own referral, when it signed up through a link."},"RegionCreate":{"properties":{"id":{"type":"string","maxLength":24,"minLength":2,"title":"Id"},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"},"description":{"type":"string","maxLength":160,"title":"Description","default":""},"countries":{"items":{"type":"string"},"type":"array","maxItems":300,"title":"Countries"}},"type":"object","required":["id","label"],"title":"RegionCreate","description":"POST /admin/regions: a new region, coming soon until its first host\nis tagged with it."},"RegionOptionRead":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"}},"type":"object","required":["id","label","description"],"title":"RegionOptionRead","description":"One region in a picker: its id, name and one-line description."},"RegionRead":{"properties":{"region":{"type":"string","title":"Region"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"state":{"type":"string","enum":["live","coming_soon","hidden"],"title":"State"},"hidden":{"type":"boolean","title":"Hidden"},"host_count":{"type":"integer","title":"Host Count"},"healthy_host_count":{"type":"integer","title":"Healthy Host Count"}},"type":"object","required":["region","label","description","countries","state","hidden","host_count","healthy_host_count"],"title":"RegionRead","description":"GET /admin/regions (docs/regions.md, \"Adding a region\")."},"RegionStatusEventRead":{"properties":{"region":{"type":"string","title":"Region"},"is_planned":{"type":"boolean","title":"Is Planned"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"recovered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recovered At"}},"type":"object","required":["region","is_planned","started_at","recovered_at"],"title":"RegionStatusEventRead"},"RegionUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Description"},"countries":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":300},{"type":"null"}],"title":"Countries"},"hidden":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hidden"}},"type":"object","title":"RegionUpdate","description":"PATCH /admin/regions/{id}: what's given changes; the id never does."},"ResourceUsageHistoryBucketRead":{"properties":{"bucket_start":{"type":"string","format":"date-time","title":"Bucket Start"},"has_data":{"type":"boolean","title":"Has Data"},"avg_cpu_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Cpu Percent"},"avg_memory_usage_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Memory Usage Mb"},"avg_storage_used_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Storage Used Mb"}},"type":"object","required":["bucket_start","has_data","avg_cpu_percent","avg_memory_usage_mb","avg_storage_used_mb"],"title":"ResourceUsageHistoryBucketRead","description":"Issue #26 follow-up: one hour of app/services/resource_usage.py's\nget_project_resource_usage_history. `has_data=False` means the project\nhad no running, reporting deployment at all during this hour (paused,\nstopped, or never deployed yet) -- every average is None in that case,\nand the dashboard renders the hour as an empty bar rather than a\nzero-height one, so a customer can tell \"idle\" apart from \"measured\nand genuinely near zero."},"RoutingPathDecodeRead":{"properties":{"hash":{"type":"string","title":"Hash"},"steps":{"items":{"$ref":"#/components/schemas/RoutingPathStepRead"},"type":"array","title":"Steps"}},"type":"object","required":["hash","steps"],"title":"RoutingPathDecodeRead"},"RoutingPathStepRead":{"properties":{"label":{"type":"string","title":"Label"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["label"],"title":"RoutingPathStepRead","description":"Issue #95: one hop in a decoded cargo-routing-thru path -- the same\n\"ordered list of labeled steps\" shape ProjectDetailPage.tsx's own\nDeploymentProgress component already renders for a deploy job, reused\nhere for a routing path instead. `detail` is None for a step that's\njust a fixed label with nothing further to say (e.g. \"CF\")."},"ServiceAutoscaleRead":{"properties":{"service_name":{"type":"string","title":"Service Name"},"enabled":{"type":"boolean","title":"Enabled"},"max_memory_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Memory Mb"},"max_cpu":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Cpu"},"max_storage_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Storage Gb"},"current_memory_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Memory Mb"},"current_cpu":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Cpu"},"current_storage_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Storage Gb"},"declared_memory_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Declared Memory Mb"},"declared_cpu":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Declared Cpu"},"declared_storage_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Declared Storage Gb"},"applies_on_next_deploy":{"type":"boolean","title":"Applies On Next Deploy"}},"type":"object","required":["service_name","enabled","max_memory_mb","max_cpu","max_storage_gb","current_memory_mb","current_cpu","current_storage_gb","declared_memory_mb","declared_cpu","declared_storage_gb","applies_on_next_deploy"],"title":"ServiceAutoscaleRead"},"ServiceAutoscaleUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"max_memory_mb":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Memory Mb"},"max_cpu":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Cpu"},"max_storage_gb":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Storage Gb"}},"type":"object","required":["enabled"],"title":"ServiceAutoscaleUpdate","description":"PUT /projects/{id}/autoscaling/{service}. A max left out (null) keeps\nthat dimension at the declared size."},"ServiceEndpointRead":{"properties":{"service_name":{"type":"string","title":"Service Name"},"hostname":{"type":"string","title":"Hostname"},"container_port":{"type":"integer","title":"Container Port"},"protocol":{"type":"string","title":"Protocol"},"ready":{"type":"boolean","title":"Ready"},"starting":{"type":"boolean","title":"Starting","default":false},"not_answering":{"type":"boolean","title":"Not Answering","default":false}},"type":"object","required":["service_name","hostname","container_port","protocol","ready"],"title":"ServiceEndpointRead"},"ServiceResourceOverrideRequest":{"properties":{"cpu_limit":{"type":"number","title":"Cpu Limit"},"memory_limit_mb":{"type":"integer","title":"Memory Limit Mb"},"storage_limit_gb":{"type":"number","title":"Storage Limit Gb"}},"type":"object","required":["cpu_limit","memory_limit_mb","storage_limit_gb"],"title":"ServiceResourceOverrideRequest","description":"A newcomer-facing alternative to hand-editing docker-compose.yml's\nown `deploy.resources.limits` block (Issue #68 follow-up): all three\nfields are required, the same \"resend the full form\" convention\nGithubConnectionUpdate/GitlabConnectionUpdate already established this\nsession, rather than partial-update semantics -- the frontend's own\nper-service card always has all three fields live at once, so there's\nno case where a caller legitimately wants to change just one and leave\nthe others silently untouched.\n\nNever touches the connected repo's real docker-compose.yml or git\nhistory (no write-back capability exists anywhere in this codebase,\nsee github_api.py/gitlab_api.py) -- this only ever edits the current\ndeployment's own already-parsed compose_spec, recreating containers via\nthe exact same \"redeploy = new Deployment version\" machinery a push or\na manual Deploy Now already uses. A later push or redeploy from the\nconnected repo's real compose file overwrites this override, same as\nit would overwrite any other field of the previous deployment's spec."},"SpendCapUpdate":{"properties":{"monthly_spend_cap_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Monthly Spend Cap Cents"}},"type":"object","required":["monthly_spend_cap_cents"],"title":"SpendCapUpdate"},"StatusComponentRead":{"properties":{"id":{"type":"string","title":"Id"},"state":{"type":"string","title":"State"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id","state","message"],"title":"StatusComponentRead","description":"One component on the public status page (app/services/\npublic_status.py): an id, its state, and a fixed, host-free message."},"StatusSummaryRead":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"components":{"items":{"$ref":"#/components/schemas/StatusComponentRead"},"type":"array","title":"Components"}},"type":"object","required":["generated_at","components"],"title":"StatusSummaryRead"},"SuggestedRegionRead":{"properties":{"suggested_region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Region"},"unavailable_regions":{"items":{"type":"string"},"type":"array","title":"Unavailable Regions","default":[]},"coming_soon_regions":{"items":{"type":"string"},"type":"array","title":"Coming Soon Regions","default":[]},"regions":{"items":{"$ref":"#/components/schemas/RegionOptionRead"},"type":"array","title":"Regions","default":[]}},"type":"object","title":"SuggestedRegionRead","description":"Issue #69: the response to GET /projects/suggested-region -- never\nauthoritative, see app/services/geolocation.py's own docstring."},"SwapReport":{"properties":{"zram_original_mb":{"type":"integer","title":"Zram Original Mb","default":0},"zram_compressed_mb":{"type":"integer","title":"Zram Compressed Mb","default":0},"zram_used_mb":{"type":"integer","title":"Zram Used Mb","default":0},"zram_size_mb":{"type":"integer","title":"Zram Size Mb","default":0},"disk_swap_total_mb":{"type":"integer","title":"Disk Swap Total Mb","default":0},"disk_swap_used_mb":{"type":"integer","title":"Disk Swap Used Mb","default":0}},"type":"object","title":"SwapReport","description":"Issue #164 (docs/zram.md): VM memory compressed into zram, and any\ndisk swap still on (a host set up for zram has none). All MB; see\nworker/agent/health/collector.py's _collect_swap."},"TeamMemberRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"account_role":{"type":"string","title":"Account Role"}},"type":"object","required":["id","email","account_role"],"title":"TeamMemberRead"},"TeamRead":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"plan":{"type":"string","title":"Plan"},"members":{"items":{"$ref":"#/components/schemas/TeamMemberRead"},"type":"array","title":"Members"}},"type":"object","required":["account_id","plan","members"],"title":"TeamRead"},"Token":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token"],"title":"Token"},"TwoFactorCodeRequest":{"properties":{"code":{"type":"string","maxLength":64,"minLength":1,"title":"Code"}},"type":"object","required":["code"],"title":"TwoFactorCodeRequest","description":"Enable (a code from the new secret), disable and new recovery codes\n(a current code or a recovery code)."},"TwoFactorEnabledRead":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"},"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["recovery_codes","access_token"],"title":"TwoFactorEnabledRead"},"TwoFactorSetupRead":{"properties":{"secret":{"type":"string","title":"Secret"},"otpauth_uri":{"type":"string","title":"Otpauth Uri"},"qr_svg":{"type":"string","title":"Qr Svg"}},"type":"object","required":["secret","otpauth_uri","qr_svg"],"title":"TwoFactorSetupRead"},"TwoFactorVerifyRequest":{"properties":{"challenge_token":{"type":"string","maxLength":2048,"title":"Challenge Token"},"code":{"type":"string","maxLength":64,"minLength":1,"title":"Code"}},"type":"object","required":["challenge_token","code"],"title":"TwoFactorVerifyRequest","description":"POST /auth/2fa/verify: the sign-in's second step."},"UpgradeRead":{"properties":{"client_secret":{"type":"string","title":"Client Secret"}},"type":"object","required":["client_secret"],"title":"UpgradeRead"},"UsageLeaderboardRead":{"properties":{"order_by":{"type":"string","title":"Order By"},"window_hours":{"type":"number","title":"Window Hours"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"accounts":{"items":{"$ref":"#/components/schemas/AccountUsageRead"},"type":"array","title":"Accounts"}},"type":"object","required":["order_by","window_hours","generated_at","accounts"],"title":"UsageLeaderboardRead"},"UserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"accept_terms":{"type":"boolean","title":"Accept Terms"}},"type":"object","required":["email","password","accept_terms"],"title":"UserCreate"},"UserLogin":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"UserLogin"},"UserProfileUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"}},"type":"object","title":"UserProfileUpdate","description":"PATCH /auth/me -- currently just the display name; email and\npassword changes go through their own dedicated endpoints below\n(change-email needs re-verification, change-password needs the\ncurrent one), not this general-purpose profile patch."},"UserRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"is_admin":{"type":"boolean","title":"Is Admin"},"terms_accepted":{"type":"boolean","title":"Terms Accepted"},"email_verified":{"type":"boolean","title":"Email Verified"},"account_role":{"type":"string","title":"Account Role"},"has_password":{"type":"boolean","title":"Has Password"},"deletion_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deletion Requested At"},"deletion_scheduled_for":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deletion Scheduled For"},"account_deletion_grace_period_hours":{"type":"integer","title":"Account Deletion Grace Period Hours"},"two_factor_enabled":{"type":"boolean","title":"Two Factor Enabled","default":false},"recovery_codes_remaining":{"type":"integer","title":"Recovery Codes Remaining","default":0}},"type":"object","required":["id","email","name","is_active","is_admin","terms_accepted","email_verified","account_role","has_password","deletion_requested_at","account_deletion_grace_period_hours"],"title":"UserRead"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkerCredentialRotateResponse":{"properties":{"credential":{"type":"string","title":"Credential"}},"type":"object","required":["credential"],"title":"WorkerCredentialRotateResponse"},"WorkerHealthReport":{"properties":{"cpu_percent":{"type":"number","title":"Cpu Percent"},"cpu_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cpu Count"},"memory_percent":{"type":"number","title":"Memory Percent"},"memory_available_mb":{"type":"integer","title":"Memory Available Mb"},"memory_total_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Memory Total Mb"},"disk_percent":{"type":"number","title":"Disk Percent"},"disk_free_mb":{"type":"integer","title":"Disk Free Mb"},"disk_total_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Total Mb"},"docker_storage_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Docker Storage Percent"},"docker_storage_free_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Docker Storage Free Mb"},"docker_storage_total_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Docker Storage Total Mb"},"load_average_1m":{"type":"number","title":"Load Average 1M"},"swap":{"anyOf":[{"$ref":"#/components/schemas/SwapReport"},{"type":"null"}]},"process_count":{"type":"integer","title":"Process Count"},"docker_available":{"type":"boolean","title":"Docker Available"},"running_container_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Running Container Count"},"traefik_service_activity":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Traefik Service Activity"},"traefik_service_response_bytes":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Traefik Service Response Bytes"},"container_resource_usage":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"object"},"type":"object"},{"type":"null"}],"title":"Container Resource Usage"},"volume_usage_mb":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Volume Usage Mb"},"unhealthy_service_containers":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Unhealthy Service Containers"},"container_disk_usage_mb":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Container Disk Usage Mb"},"running_service_ports":{"anyOf":[{"additionalProperties":{"additionalProperties":{"type":"integer"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Running Service Ports"},"dns_unconfigured_containers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Dns Unconfigured Containers"},"service_readiness":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Service Readiness"}},"type":"object","required":["cpu_percent","memory_percent","memory_available_mb","disk_percent","disk_free_mb","load_average_1m","process_count","docker_available"],"title":"WorkerHealthReport","description":"Task 19's normalized host-level health snapshot, as sent by the\nagent's collector alongside a heartbeat. Purely descriptive — nothing\nhere is validated against a policy; that's a future task's job, not the\nwire format's.\n\ncpu_count/memory_total_mb/disk_total_mb are static hardware capacity,\nnot usage -- optional (default None) so a not-yet-upgraded agent's\nheartbeat (missing these keys entirely) still validates, the same\nforward-compatible stance every other optional field here already\ntakes. running_container_count is the same story for a different\nreason: None means \"couldn't reach the Docker daemon\", distinct from a\nreal 0 (\"reachable, nothing running\")."},"WorkerHeartbeatRequest":{"properties":{"status":{"type":"string","enum":["provisioning","starting","healthy","degraded","unhealthy","offline","quarantined","rebuilding"],"title":"Status"},"health":{"anyOf":[{"$ref":"#/components/schemas/WorkerHealthReport"},{"type":"null"}]},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"}},"type":"object","required":["status"],"title":"WorkerHeartbeatRequest"},"WorkerRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"physical_host_id":{"type":"string","format":"uuid","title":"Physical Host Id"},"status":{"type":"string","title":"Status"},"effective_status":{"type":"string","title":"Effective Status"},"agent_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Version"},"last_heartbeat":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Heartbeat"},"last_health":{"anyOf":[{"$ref":"#/components/schemas/WorkerHealthReport"},{"type":"null"}]},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"}},"type":"object","required":["id","physical_host_id","status","effective_status","agent_version","last_heartbeat","last_health","ip_address"],"title":"WorkerRead","description":"The worker's view of itself. Never exposed to a customer-authenticated\nendpoint — only reachable via get_current_worker, a structurally separate\nauth scheme from customer JWTs (see app/api/deps.py)."},"WorkerRegisterRequest":{"properties":{"physical_host_id":{"type":"string","format":"uuid","title":"Physical Host Id"},"enrollment_token":{"type":"string","minLength":1,"title":"Enrollment Token"},"agent_version":{"type":"string","maxLength":100,"minLength":1,"title":"Agent Version"}},"type":"object","required":["physical_host_id","enrollment_token","agent_version"],"title":"WorkerRegisterRequest"},"WorkerRegisterResponse":{"properties":{"worker_id":{"type":"string","format":"uuid","title":"Worker Id"},"credential":{"type":"string","title":"Credential"}},"type":"object","required":["worker_id","credential"],"title":"WorkerRegisterResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}