{"openapi":"3.1.0","info":{"title":"Prisma Postgres Management API","description":"REST API for managing Prisma Postgres projects, databases, backups, and workspaces.","version":"v1"},"tags":[{"name":"Projects"},{"name":"Databases"},{"name":"Databases Connections"},{"name":"Database Backups"},{"name":"Database Usage"},{"name":"Connections"},{"name":"Integrations"},{"name":"Workspaces"},{"name":"Regions"},{"name":"Misc"},{"name":"[Experimental]","description":"Experimental endpoints are in active development and may change at any time without notice."}],"security":[{"OAuth2":["workspace:admin","offline_access"]},{"Bearer":[]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","description":"OAuth2 authentication","flows":{"authorizationCode":{"authorizationUrl":"https://auth.prisma.io/authorize","tokenUrl":"https://auth.prisma.io/token","refreshUrl":"https://auth.prisma.io/token","scopes":{"workspace:admin":"Full access to workspace resources","offline_access":"Offline access"}}}},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth2 token for API authentication"}},"schemas":{}},"paths":{"/v1/apps":{"get":{"responses":{"200":{"description":"Returns the list of apps.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"app"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestDeploymentId":{"type":["string","null"]},"appEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","region","projectId","branchId","latestDeploymentId","appEndpointDomain","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed projectId filter).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Apps","tags":["[Experimental]"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}},{"in":"query","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},{"in":"query","name":"branchId","schema":{"anyOf":[{"type":"string","const":"unassigned"},{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}]}},{"in":"query","name":"branchGitName","schema":{"type":"string","minLength":1}}],"summary":"List apps","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all apps the token has access to, ordered by creation time (oldest first). Optionally filter by project ID. Supports cursor-based pagination.","x-prisma-stability":"experimental"},"post":{"responses":{"201":{"description":"App created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"app"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestDeploymentId":{"type":["string","null"]},"appEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","region","projectId","branchId","latestDeploymentId","appEndpointDomain","createdAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"An app with the same `displayName` already exists on the resolved branch. The body includes the existing app's id, name, and branch git name.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"app:already_exists"},"message":{"type":"string"},"existingAppId":{"type":"string"},"name":{"type":"string"},"branchGitName":{"type":"string"}},"required":["code","message","existingAppId","name","branchGitName"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. missing projectId, empty display name, or invalid region).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Apps","tags":["[Experimental]"],"parameters":[],"summary":"Create app","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new app under the specified project. The `projectId` is required in the request body. The app is placed in the given region, or the project's default region if omitted (falling back to us-east-1). Returns `409 Conflict` with the existing app's id, name, and branch if an app with the same name already exists on the resolved branch.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":256},"regionId":{"type":"string","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1"],"default":"us-east-1"},"branchId":{"type":["string","null"],"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchGitName":{"type":["string","null"],"minLength":1},"projectId":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},"required":["displayName","projectId"]}}}}}},"/v1/apps/{appId}":{"get":{"responses":{"200":{"description":"App retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"app"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestDeploymentId":{"type":["string","null"]},"appEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","region","projectId","branchId","latestDeploymentId","appEndpointDomain","createdAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1AppsByAppId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Get app","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns an app by ID, including its region and active promoted deployment reference.","x-prisma-stability":"experimental"},"patch":{"responses":{"200":{"description":"App updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"app"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestDeploymentId":{"type":["string","null"]},"appEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","region","projectId","branchId","latestDeploymentId","appEndpointDomain","createdAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. empty display name).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"patchV1AppsByAppId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Update app","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nUpdates the display name of an app.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":256},"branchId":{"type":["string","null"],"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchGitName":{"type":["string","null"],"minLength":1}}}}}}},"delete":{"responses":{"204":{"description":"App deleted."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A deployment could not be deleted, or a concurrent deployment was created while deleting the app.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1AppsByAppId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Delete app","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeletes an app. Deployments under the app are deleted before the app is deleted.","x-prisma-stability":"experimental"}},"/v1/apps/{appId}/promote":{"post":{"responses":{"200":{"description":"Deployment promoted to app endpoint. The `reassignedDomains` field indicates how many custom domains were moved from the previously-promoted deployment to the new one.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"appEndpointDomain":{"type":"string"},"reassignedDomains":{"type":"number"}},"required":["appEndpointDomain","reassignedDomains"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App or deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment is not running.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed app ID or missing deployment ID).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1AppsByAppIdPromote","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Promote deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nPromotes a deployment to be the active deployment behind the app's stable endpoint. The deployment must be running. Returns the app endpoint domain.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"deploymentId":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"versionId":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","deprecated":true,"description":"Deprecated: use `deploymentId` instead. Ignored when `deploymentId` is also present."}}}}}}}},"/v1/apps/{appId}/rollback":{"post":{"responses":{"200":{"description":"Deployment made live behind the app endpoint. The `reassignedDomains` field indicates how many custom domains were moved from the previously-live deployment to the new one.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"appEndpointDomain":{"type":"string"},"reassignedDomains":{"type":"number"}},"required":["appEndpointDomain","reassignedDomains"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App or deployment not found, or the deployment's Foundry artifact no longer exists.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment cannot be made live (e.g. it has no runnable artifact or is mid-teardown and cannot reach a running state).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed app ID or missing deployment ID).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1AppsByAppIdRollback","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Roll an app back to an existing deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nMakes any eligible existing deployment live behind the app's stable endpoint (rollback or roll-forward). Unlike promote, a stopped target is started and waited until it is running before the endpoint is switched, so the currently-live deployment keeps serving with zero downtime. Returns the app endpoint domain.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"deploymentId":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"versionId":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","deprecated":true,"description":"Deprecated: use `deploymentId` instead. Ignored when `deploymentId` is also present."}}}}}}}},"/v1/apps/{appId}/domains":{"get":{"responses":{"200":{"description":"List of custom domains.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown",null]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","const":false},"nextCursor":{"type":"null"}},"required":["hasMore","nextCursor"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1AppsByAppIdDomains","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"List custom domains for an app","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all custom domains attached to any deployment of the app. Domains are aggregated across all deployments since Foundry lists per deployment.","x-prisma-stability":"experimental"},"post":{"responses":{"200":{"description":"Custom domain already registered on this app.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown",null]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"required":["data"]}}}},"201":{"description":"Custom domain created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown",null]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"required":["data"]}}}},"400":{"description":"Invalid hostname or DNS verification failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Hostname already registered.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"App has no promoted deployment.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Domain quota exceeded or rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1AppsByAppIdDomains","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Create a custom domain","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRegisters a custom hostname for the app. The hostname must CNAME to the regional switchboard target before DNS verification can succeed. Returns 429 if the app has reached its domain quota (default: 3).","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z]{2,}$","minLength":1,"maxLength":253}},"required":["hostname"]}}}}}},"/v1/apps/{appId}/deployments":{"get":{"responses":{"200":{"description":"Returns the list of deployments.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"deployment"},"url":{"type":"string","format":"uri"},"foundryVersionId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","foundryVersionId","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1AppsByAppIdDeployments","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}}],"summary":"List deployments","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all deployments belonging to an app, ordered by creation time (newest first). Supports cursor-based pagination.","x-prisma-stability":"experimental"},"post":{"responses":{"201":{"description":"Deployment created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"deployment"},"url":{"type":"string","format":"uri"},"foundryVersionId":{"type":"string"},"uploadUrl":{"type":["string","null"]}},"required":["id","type","url","foundryVersionId","uploadUrl"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"App not found, or the app's attached Branch has been deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. `skipCodeUpload` without an active promoted deployment, or the app is not attached to a Branch — env-var resolution requires a Branch).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error while resolving the deploy-time env vars (e.g., a master-key rotation or storage corruption prevents the project's wrapped DEK or a per-value envelope from being decrypted). Not a client-fixable condition.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1AppsByAppIdDeployments","tags":["[Experimental]"],"parameters":[{"in":"path","name":"appId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Create deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new deployment under the specified app. Returns a pre-signed upload URL for the artifact unless `skipCodeUpload` is set (which forks the active promoted deployment's artifact). Environment variables are resolved automatically from the app's attached Branch (production-class templates for the production Branch; preview-class templates for preview Branches). Manage env vars via the `/v1/environment-variables` endpoints, not as part of the deploy payload.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"portMapping":{"type":"object","properties":{"http":{"anyOf":[{"type":"integer","minimum":1,"maximum":65535},{"type":"null"}]}}},"skipCodeUpload":{"type":"boolean"}},"additionalProperties":false}}}}}},"/v1/projects/{projectId}/branches":{"post":{"responses":{"201":{"description":"Created the Branch.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"branch"},"url":{"type":"string","format":"uri"},"gitName":{"type":"string"},"isDefault":{"type":"boolean"},"role":{"type":"string","enum":["production","preview"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"],"description":"Thin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/compute-services?branchId=<br_xxx> instead (see API design principles \"Flat and Hierarchical Coexistence\")."}},"required":["id","type","url","gitName","isDefault","role","createdAt","updatedAt","project"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A live Branch with the same gitName already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid gitName.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1ProjectsByProjectIdBranches","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Create a branch","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a Branch under the specified Project. The first Branch in a Project is always created with isDefault=true and role=production regardless of the body value. Later Branches are created with role=preview. Setting isDefault=true while another Branch already holds the default atomically swaps the default flag only.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gitName":{"type":"string","minLength":1},"isDefault":{"type":"boolean"}},"required":["gitName"],"additionalProperties":false}}}}},"get":{"responses":{"200":{"description":"Returned the list of Branches.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"branch"},"url":{"type":"string","format":"uri"},"gitName":{"type":"string"},"isDefault":{"type":"boolean"},"role":{"type":"string","enum":["production","preview"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"],"description":"Thin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/compute-services?branchId=<br_xxx> instead (see API design principles \"Flat and Hierarchical Coexistence\")."}},"required":["id","type","url","gitName","isDefault","role","createdAt","updatedAt","project"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Mutually exclusive filters specified together.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1ProjectsByProjectIdBranches","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}},{"in":"query","name":"gitName","schema":{"type":"string","minLength":1}},{"in":"query","name":"gitNameContains","schema":{"type":"string","minLength":1}}],"summary":"List branches in a project","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the live Branches of a Project. Supports two mutually exclusive filters: ?gitName= (exact match — at most one row), ?gitNameContains= (case-sensitive substring). Soft-deleted Branches are not returned. Ordered by createdAt ascending.","x-prisma-stability":"experimental"}},"/v1/branches/{branchId}":{"get":{"responses":{"200":{"description":"Returned the Branch.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"branch"},"url":{"type":"string","format":"uri"},"gitName":{"type":"string"},"isDefault":{"type":"boolean"},"role":{"type":"string","enum":["production","preview"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"],"description":"Thin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/compute-services?branchId=<br_xxx> instead (see API design principles \"Flat and Hierarchical Coexistence\")."}},"required":["id","type","url","gitName","isDefault","role","createdAt","updatedAt","project"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1BranchesByBranchId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Get a branch","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a single Branch by ID. Member resources are not inlined — list them via /v1/databases?branchId= and /v1/compute-services?branchId=.","x-prisma-stability":"experimental"},"patch":{"responses":{"200":{"description":"Branch updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"branch"},"url":{"type":"string","format":"uri"},"gitName":{"type":"string"},"isDefault":{"type":"boolean"},"role":{"type":"string","enum":["production","preview"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"],"description":"Thin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/compute-services?branchId=<br_xxx> instead (see API design principles \"Flat and Hierarchical Coexistence\")."}},"required":["id","type","url","gitName","isDefault","role","createdAt","updatedAt","project"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"gitName rename, role change, demote-default, or unknown field rejected.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"patchV1BranchesByBranchId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Update a branch","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nPromotes a Branch to be the Project's default. Only isDefault is mutable — gitName rename and role changes are rejected.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"isDefault":{"type":["boolean","null"]}},"additionalProperties":false}}}}},"delete":{"responses":{"204":{"description":"Branch soft-deleted."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Branch not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Branch still has live member resources.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Branch is the Project's current default or production Branch.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1BranchesByBranchId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Soft-delete a branch","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nSoft-deletes a Branch (sets deletedAt). Refuses if the Branch is the Project's current default, the Project's production Branch, or has live members.","x-prisma-stability":"experimental"}},"/v1/builds/{buildId}/logs":{"get":{"responses":{"200":{"description":"Build log stream (newline-delimited JSON; one `BuildLogNdjsonLine` per line).","content":{"application/x-ndjson":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"log"},"text":{"type":"string"},"level":{"type":"string","enum":["info","error"]},"source":{"type":"string","enum":["runner","stdout","stderr"]},"step":{"type":"string"},"cursor":{"type":"string"}},"required":["type","text","level","source","cursor"]},{"type":"object","properties":{"type":{"type":"string","const":"terminal"},"kind":{"type":"string","enum":["end","error"]},"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"cursor":{"type":["string","null"]}},"required":["type","kind","code","message","retryable","cursor"]}]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Build not found, or the caller's workspace does not own it (indistinguishable).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1BuildsByBuildIdLogs","tags":["[Experimental]"],"parameters":[{"in":"path","name":"buildId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"follow","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"cursor","schema":{"type":"string"}}],"summary":"Stream build logs","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nStreams the full build log for a build as newline-delimited JSON (`application/x-ndjson`). Each line is a JSON object discriminated by `type`: `log` (a build output line) or `terminal` (end-of-stream marker with a `cursor` for resumption). The default is a finite dump that ends once the stream is drained; pass `follow=true` to keep the connection open for an in-flight build, and `cursor` to resume from a prior terminal cursor.","x-prisma-stability":"experimental"}},"/v1/compute-services/versions/{versionId}/logs":{"get":{"responses":{"101":{"description":"WebSocket connection established. Each message is a JSON object discriminated by `type`."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute version not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"426":{"description":"Request must be a WebSocket upgrade.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Compute-servicesVersionsByVersionIdLogs","tags":["[Experimental]"],"parameters":[{"in":"path","name":"versionId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"tail","schema":{"type":"integer","minimum":1,"maximum":10000}},{"in":"query","name":"from_start","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"cursor","schema":{"type":"string","pattern":"^\\d+$"}}],"summary":"Stream compute version logs via WebSocket","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nUpgrades to a WebSocket connection that streams log output for the specified compute version. Each message is a JSON object with `type: \"log\"` (log text + byte metadata) or `type: \"terminal\"` (end-of-segment signal with reconnect cursor). The stream ends after 10 minutes; reconnect with the `cursor` query parameter to continue.","deprecated":true,"x-prisma-stability":"experimental"}},"/v1/compute-services":{"get":{"responses":{"200":{"description":"Returns the list of compute services.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"compute-service"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestVersionId":{"type":["string","null"]},"serviceEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","region","projectId","branchId","latestVersionId","serviceEndpointDomain","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed projectId filter).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Compute-services","tags":["[Experimental]"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}},{"in":"query","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},{"in":"query","name":"branchId","schema":{"anyOf":[{"type":"string","const":"unassigned"},{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}]}},{"in":"query","name":"branchGitName","schema":{"type":"string","minLength":1}}],"deprecated":true,"summary":"List compute services","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all compute services the token has access to, ordered by creation time (oldest first). Optionally filter by project ID. Supports cursor-based pagination.","x-prisma-stability":"experimental"},"post":{"responses":{"201":{"description":"Compute service created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"compute-service"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestVersionId":{"type":["string","null"]},"serviceEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","region","projectId","branchId","latestVersionId","serviceEndpointDomain","createdAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A compute service with the same `displayName` already exists on the resolved branch. The body includes the existing service's id, name, and branch git name.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"compute_service:already_exists"},"message":{"type":"string"},"existingServiceId":{"type":"string"},"name":{"type":"string"},"branchGitName":{"type":"string"}},"required":["code","message","existingServiceId","name","branchGitName"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. missing projectId, empty display name, or invalid region).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Compute-services","tags":["[Experimental]"],"parameters":[],"deprecated":true,"summary":"Create compute service","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new compute service under the specified project. The `projectId` is required in the request body. The service is placed in the given region, or the project's default region if omitted (falling back to us-east-1). Returns `409 Conflict` with the existing service's id, name, and branch if a service with the same name already exists on the resolved branch.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":256},"regionId":{"type":"string","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1"],"default":"us-east-1"},"branchId":{"type":["string","null"],"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchGitName":{"type":["string","null"],"minLength":1},"projectId":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},"required":["displayName","projectId"]}}}}}},"/v1/compute-services/versions/{versionId}":{"get":{"responses":{"200":{"description":"Compute version retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"compute-version"},"url":{"type":"string","format":"uri"},"foundryVersionId":{"type":"string"},"status":{"type":"string"},"previewDomain":{"type":["string","null"]},"envVars":{"type":"object","additionalProperties":{"type":"string","description":"Always \"[redacted]\". Compute version inspection endpoints expose env var names only; values are never returned.","example":"[redacted]"},"description":"Environment variable names present on this compute version. Values are always redacted as \"[redacted]\" and must not be treated as deployed secret values."},"portMapping":{"type":"object","properties":{"http":{"type":"number"}}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","foundryVersionId","status","previewDomain","createdAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute version not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Compute-servicesVersionsByVersionId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"versionId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Get compute version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a compute version by ID, including its current status derived from the underlying VM state.","x-prisma-stability":"experimental"},"delete":{"responses":{"204":{"description":"Compute version deleted."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute version not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment must be stopped before it can be deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1Compute-servicesVersionsByVersionId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"versionId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Delete compute version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nPermanently deletes the compute version, its metadata, and any associated VM. The version must be stopped or in the `new` state before it can be deleted.","x-prisma-stability":"experimental"}},"/v1/compute-services/versions/{versionId}/start":{"post":{"responses":{"200":{"description":"Start request accepted. The preview domain is returned immediately.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"previewDomain":{"type":"string"}},"required":["previewDomain"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute version not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The compute version is in a state that does not allow starting (e.g. artifact not uploaded, or already running).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Compute-servicesVersionsByVersionIdStart","tags":["[Experimental]"],"parameters":[{"in":"path","name":"versionId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Start compute version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRequests VM creation and startup for the compute version. The artifact must be uploaded before calling this endpoint. Returns a preview domain that becomes reachable once the VM is running. Poll the status endpoint until `running` is reached.","x-prisma-stability":"experimental"}},"/v1/compute-services/versions/{versionId}/stop":{"post":{"responses":{"204":{"description":"Stop request accepted."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute version not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The compute version must be running or provisioning to be stopped.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Compute-servicesVersionsByVersionIdStop","tags":["[Experimental]"],"parameters":[{"in":"path","name":"versionId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Stop compute version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRequests VM shutdown for the compute version. The version record and metadata are retained. Poll the status endpoint until `stopped` is reached.","x-prisma-stability":"experimental"}},"/v1/compute-services/{computeServiceId}":{"get":{"responses":{"200":{"description":"Compute service retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"compute-service"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestVersionId":{"type":["string","null"]},"serviceEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","region","projectId","branchId","latestVersionId","serviceEndpointDomain","createdAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Compute-servicesByComputeServiceId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"computeServiceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Get compute service","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a compute service by ID, including its region and active promoted version reference.","x-prisma-stability":"experimental"},"patch":{"responses":{"200":{"description":"Compute service updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"compute-service"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestVersionId":{"type":["string","null"]},"serviceEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","region","projectId","branchId","latestVersionId","serviceEndpointDomain","createdAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. empty display name).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"patchV1Compute-servicesByComputeServiceId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"computeServiceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Update compute service","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nUpdates the display name of a compute service.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":256},"branchId":{"type":["string","null"],"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchGitName":{"type":["string","null"],"minLength":1}}}}}}},"delete":{"responses":{"204":{"description":"Compute service deleted."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A compute version could not be deleted, or a concurrent version was created while deleting the service.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1Compute-servicesByComputeServiceId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"computeServiceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Delete compute service","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeletes a compute service. Compute versions under the service are deleted before the service is deleted.","x-prisma-stability":"experimental"}},"/v1/compute-services/{computeServiceId}/promote":{"post":{"responses":{"200":{"description":"Version promoted to service endpoint. The `reassignedDomains` field indicates how many custom domains were moved from the previously-promoted version to the new one.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"serviceEndpointDomain":{"type":"string"},"reassignedDomains":{"type":"number"}},"required":["serviceEndpointDomain","reassignedDomains"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute service or version not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The compute version is not running.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed compute service ID or missing version ID).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Compute-servicesByComputeServiceIdPromote","tags":["[Experimental]"],"parameters":[{"in":"path","name":"computeServiceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Promote compute version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nPromotes a compute version to be the active version behind the service's stable endpoint. The version must be running. Returns the service endpoint domain.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},"required":["versionId"]}}}}}},"/v1/compute-services/{computeServiceId}/rollback":{"post":{"responses":{"200":{"description":"Version made live behind the service endpoint. The `reassignedDomains` field indicates how many custom domains were moved from the previously-live version to the new one.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"serviceEndpointDomain":{"type":"string"},"reassignedDomains":{"type":"number"}},"required":["serviceEndpointDomain","reassignedDomains"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute service or version not found, or the version's Foundry artifact no longer exists.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The compute version cannot be made live (e.g. it has no runnable artifact or is mid-teardown and cannot reach a running state).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed compute service ID or missing version ID).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Compute-servicesByComputeServiceIdRollback","tags":["[Experimental]"],"parameters":[{"in":"path","name":"computeServiceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Roll a compute service back to an existing version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nMakes any eligible existing compute version live behind the service's stable endpoint (rollback or roll-forward). Unlike promote, a stopped target is started and waited until it is running before the endpoint is switched, so the currently-live version keeps serving with zero downtime. Returns the service endpoint domain.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},"required":["versionId"]}}}}}},"/v1/compute-services/{computeServiceId}/versions":{"get":{"responses":{"200":{"description":"Returns the list of compute versions.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"compute-version"},"url":{"type":"string","format":"uri"},"foundryVersionId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","foundryVersionId","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Compute-servicesByComputeServiceIdVersions","tags":["[Experimental]"],"parameters":[{"in":"path","name":"computeServiceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}}],"deprecated":true,"summary":"List compute versions","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all compute versions belonging to a compute service, ordered by creation time (newest first). Supports cursor-based pagination.","x-prisma-stability":"experimental"},"post":{"responses":{"201":{"description":"Compute version created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"compute-version"},"url":{"type":"string","format":"uri"},"foundryVersionId":{"type":"string"},"uploadUrl":{"type":["string","null"]}},"required":["id","type","url","foundryVersionId","uploadUrl"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute service not found, or the service's attached Branch has been deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. `skipCodeUpload` without an active promoted version, or the compute service is not attached to a Branch — env-var resolution requires a Branch).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error while resolving the deploy-time env vars (e.g., a master-key rotation or storage corruption prevents the project's wrapped DEK or a per-value envelope from being decrypted). Not a client-fixable condition.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Compute-servicesByComputeServiceIdVersions","tags":["[Experimental]"],"parameters":[{"in":"path","name":"computeServiceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Create compute version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new compute version under the specified compute service. Returns a pre-signed upload URL for the artifact unless `skipCodeUpload` is set (which forks the active promoted version's artifact). Environment variables are resolved automatically from the service's attached Branch (production-class templates for the production Branch; preview-class templates for preview Branches). Manage env vars via the `/v1/environment-variables` endpoints, not as part of the deploy payload.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"portMapping":{"type":"object","properties":{"http":{"anyOf":[{"type":"integer","minimum":1,"maximum":65535},{"type":"null"}]}}},"skipCodeUpload":{"type":"boolean"}},"additionalProperties":false}}}}}},"/v1/compute-services/{computeServiceId}/domains":{"get":{"responses":{"200":{"description":"List of custom domains.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown",null]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","const":false},"nextCursor":{"type":"null"}},"required":["hasMore","nextCursor"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Compute-servicesByComputeServiceIdDomains","tags":["[Experimental]"],"parameters":[{"in":"path","name":"computeServiceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"List custom domains for a compute service","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all custom domains attached to any version of the compute service. Domains are aggregated across all versions since Foundry lists per version.","x-prisma-stability":"experimental"},"post":{"responses":{"200":{"description":"Custom domain already registered on this compute service.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown",null]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"required":["data"]}}}},"201":{"description":"Custom domain created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown",null]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"required":["data"]}}}},"400":{"description":"Invalid hostname or DNS verification failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute service not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Hostname already registered.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Compute service has no promoted version.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Domain quota exceeded or rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Compute-servicesByComputeServiceIdDomains","tags":["[Experimental]"],"parameters":[{"in":"path","name":"computeServiceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Create a custom domain","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRegisters a custom hostname for the compute service. The hostname must CNAME to the regional switchboard target before DNS verification can succeed. Returns 429 if the service has reached its domain quota (default: 3).","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z]{2,}$","minLength":1,"maxLength":253}},"required":["hostname"]}}}}}},"/v1/domains/{domainId}":{"get":{"responses":{"200":{"description":"Custom domain details.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown",null]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Custom domain not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1DomainsByDomainId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"domainId","schema":{"type":"string","pattern":"^(dom_)?[A-Za-z0-9]+$"},"required":true}],"summary":"Get a custom domain","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns details for a custom domain by id. Authorization is derived from the parent compute service's workspace.","x-prisma-stability":"experimental"},"delete":{"responses":{"204":{"description":"Custom domain deleted."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Custom domain not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1DomainsByDomainId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"domainId","schema":{"type":"string","pattern":"^(dom_)?[A-Za-z0-9]+$"},"required":true}],"summary":"Delete a custom domain","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRemoves a custom domain binding. Authorization is derived from the parent compute service's workspace.","x-prisma-stability":"experimental"}},"/v1/domains/{domainId}/retry":{"post":{"responses":{"200":{"description":"Retry initiated, domain state returned.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom-domain"},"url":{"type":"string","format":"uri"},"hostname":{"type":"string"},"appId":{"type":"string"},"computeServiceId":{"type":"string","deprecated":true,"description":"Deprecated: use `appId` instead."},"status":{"type":"string","enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"]},"foundryStatus":{"type":"string"},"failureReason":{"type":["string","null"]},"failureCategory":{"type":["string","null"],"enum":["dns","acme","storage","unknown",null]},"certExpiresAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"CNAME"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":["number","null"]}},"required":["type","name","value","ttl"]}}},"required":["id","type","url","hostname","appId","computeServiceId","status","foundryStatus","failureReason","failureCategory","certExpiresAt","createdAt","updatedAt","dnsRecords"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Custom domain not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Domain is not yet eligible for retry (e.g. still provisioning).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1DomainsByDomainIdRetry","tags":["[Experimental]"],"parameters":[{"in":"path","name":"domainId","schema":{"type":"string","pattern":"^(dom_)?[A-Za-z0-9]+$"},"required":true}],"summary":"Retry custom domain provisioning","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRetries DNS verification and certificate issuance for a failed or pending domain. Returns 409 if the domain is not yet eligible for retry (e.g. still provisioning).","x-prisma-stability":"experimental"}},"/v1/connections":{"get":{"responses":{"200":{"description":"Returned list of connections.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Connections","tags":["Connections"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}},{"in":"query","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}}],"summary":"List connections","description":"Returns all connections the actor has access to, with optional database filter."},"post":{"responses":{"201":{"description":"Created a new connection.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]}}},"connectionString":{"type":"string","deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"host":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"pass":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"user":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."}},"required":["id","type","url","name","createdAt","kind","endpoints","connectionString","database","host","pass","user"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Connections","tags":["Connections"],"parameters":[],"summary":"Create connection","description":"Creates a new connection for the specified database.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"databaseId":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"name":{"type":"string","minLength":3,"maxLength":65}},"required":["databaseId","name"]}}}}}},"/v1/connections/{id}":{"get":{"responses":{"200":{"description":"Returned the connection.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Connection with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1ConnectionsById","tags":["Connections"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(con_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Get connection","description":"Returns the connection with the given ID."},"delete":{"responses":{"204":{"description":"Deleted the connection."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Connection with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1ConnectionsById","tags":["Connections"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(con_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Delete connection","description":"Deletes the connection with the given ID."}},"/v1/connections/{id}/rotate":{"post":{"responses":{"200":{"description":"Rotated connection credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]}}},"connectionString":{"type":"string","deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"host":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"pass":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"user":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."}},"required":["id","type","url","name","createdAt","kind","endpoints","connectionString","database","host","pass","user"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Connection with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1ConnectionsByIdRotate","tags":["Connections"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(con_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Rotate connection credentials","description":"Generates new credentials for the connection with the given ID. Revocation of the previous credentials is best-effort."}},"/v1/databases":{"get":{"responses":{"200":{"description":"Returns the list of databases.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["failure","provisioning","ready","recovering"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Actor does not have access to the requested databases.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Databases","tags":["Databases"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}},{"in":"query","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"Filter databases by project ID"}},{"in":"query","name":"branchId","schema":{"anyOf":[{"type":"string","const":"unassigned"},{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}]}},{"in":"query","name":"branchGitName","schema":{"type":"string","minLength":1}}],"summary":"List databases","description":"Returns all databases the token has access to. Optionally filter by project ID."},"post":{"responses":{"201":{"description":"Created a new database.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["failure","provisioning","ready","recovering"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId"]}},"required":["data"]}}}},"400":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Actor does not have access to the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Databases","tags":["Databases"],"parameters":[],"summary":"Create database","description":"Creates a new database in the specified project.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"ID of the project to create the database in"},"region":{"type":"string","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1","inherit"],"default":"us-east-1","description":"Region for the database. Use \"inherit\" to use the project default database region."},"name":{"type":"string","minLength":1,"description":"Display name for the database"},"isDefault":{"type":"boolean","default":false,"description":"Whether this is the default database"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"ID of the database the backup belongs to"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"ID of the database to clone from"}},"required":["type","databaseId"]}],"description":"Source to create the database from. Omit to create an empty database."},"branchId":{"type":["string","null"],"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchGitName":{"type":["string","null"],"minLength":1}},"required":["projectId"]}}}}}},"/v1/databases/{databaseId}":{"get":{"responses":{"200":{"description":"Returned the database with the given ID.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["failure","provisioning","ready","recovering"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Actor does not have access to the database.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1DatabasesByDatabaseId","tags":["Databases"],"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Get database","description":"Returns the database with the given ID."},"patch":{"responses":{"200":{"description":"Updated the database.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["failure","provisioning","ready","recovering"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Actor does not have access to the database.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"patchV1DatabasesByDatabaseId","tags":["Databases"],"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Update database","description":"Updates the database with the given ID.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"New display name for the database"},"branchId":{"type":["string","null"],"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchGitName":{"type":["string","null"],"minLength":1}}}}}}},"delete":{"responses":{"204":{"description":"Deleted the database successfully."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Cannot delete the default environment.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1DatabasesByDatabaseId","tags":["Databases"],"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Delete database","description":"Deletes the database with the given ID."}},"/v1/databases/{databaseId}/connections":{"get":{"responses":{"200":{"description":"Returned all connections for the given database.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1DatabasesByDatabaseIdConnections","tags":["Databases Connections"],"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}}],"summary":"Get list of database connections","description":"Returns all connections for the given database."},"post":{"responses":{"200":{"description":"Created a new connection string for the database.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port","connectionString"]}}},"connectionString":{"type":"string","deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"host":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"pass":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"user":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."}},"required":["id","type","url","name","createdAt","kind","endpoints","connectionString","database","host","pass","user"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1DatabasesByDatabaseIdConnections","tags":["Databases Connections"],"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Create database connection string","description":"Creates a new connection string for the given database.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":65}},"required":["name"]}}}}}},"/v1/databases/{databaseId}/backups":{"get":{"responses":{"200":{"description":"Returned backups for the given database.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this backup"},"backupType":{"type":"string","enum":["full","incremental"],"description":"Type of backup"},"createdAt":{"type":"string","description":"Timestamp when the backup was created"},"size":{"type":"number","description":"Total file size (in bytes) of gzipped backup files"},"status":{"type":"string","enum":["running","completed","failed","unknown"],"description":"Status of backup instance"},"type":{"type":"string","const":"backup"}},"required":["id","backupType","createdAt","status"]}},"meta":{"type":"object","properties":{"backupRetentionDays":{"type":"number"}},"required":["backupRetentionDays"]},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"limit":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}]}},"required":["hasMore","limit"]}},"required":["data","meta","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Remote database backups are not supported","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1DatabasesByDatabaseIdBackups","tags":["Database Backups"],"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"summary":"Get list of backups","description":"Returns backups for the specified database."}},"/v1/databases/{targetDatabaseId}/restore":{"post":{"responses":{"200":{"description":"Database restore initiated. The database status will be \"recovering\" until the restore completes.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["failure","provisioning","ready","recovering"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string"}},"required":["type","databaseId","backupId"]},"branchId":{"type":["string","null"]}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Target database, source database, or backup not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Target database is currently provisioning or recovering and cannot be restored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid source type or backup not usable.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1DatabasesByTargetDatabaseIdRestore","tags":["Databases"],"parameters":[{"in":"path","name":"targetDatabaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Restore database (destructive)","description":"⚠️ **Destructive operation** — this immediately and irreversibly overwrites all data in the target database with the contents of the specified backup. Any data written since the backup was taken will be lost. Ensure you have a recent backup of the target database before proceeding.\n\nReplaces the data in an existing database from a backup. Connections and credentials are preserved — only the data layer is replaced.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"ID of the database the backup belongs to"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]}},"required":["source"]}}}}}},"/v1/databases/{databaseId}/usage":{"get":{"responses":{"200":{"description":"Returned usage metrics for the given database.","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}},"required":["start","end"]},"metrics":{"type":"object","properties":{"operations":{"type":"object","properties":{"used":{"type":"number"},"unit":{"type":"string","const":"ops"}},"required":["used","unit"]},"storage":{"type":"object","properties":{"used":{"type":"number"},"unit":{"type":"string","const":"GiB"}},"required":["used","unit"]}},"required":["operations","storage"]},"generatedAt":{"type":"string","format":"date-time"}},"required":["period","metrics","generatedAt"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Database with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Error occurred while fetching metrics","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1DatabasesByDatabaseIdUsage","tags":["Database Usage"],"parameters":[{"in":"path","name":"databaseId","schema":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"startDate","schema":{"type":"string","format":"date-time","description":"Start date for metrics query. Defaults to start of current month if not provided."}},{"in":"query","name":"endDate","schema":{"type":"string","format":"date-time","description":"End date for metrics query. Will be set to end of day if a future date is provided. Defaults to current date if not provided."}}],"summary":"Get database usage metrics","description":"Returns usage metrics for the specified database."}},"/v1/deployments/{deploymentId}":{"get":{"responses":{"200":{"description":"Deployment retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"deployment"},"url":{"type":"string","format":"uri"},"foundryVersionId":{"type":"string"},"status":{"type":"string"},"previewDomain":{"type":["string","null"]},"envVars":{"type":"object","additionalProperties":{"type":"string","description":"Always \"[redacted]\". Compute version inspection endpoints expose env var names only; values are never returned.","example":"[redacted]"},"description":"Environment variable names present on this compute version. Values are always redacted as \"[redacted]\" and must not be treated as deployed secret values."},"portMapping":{"type":"object","properties":{"http":{"type":"number"}}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","foundryVersionId","status","previewDomain","createdAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1DeploymentsByDeploymentId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"deploymentId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Get deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a deployment by ID, including its current status derived from the underlying VM state.","x-prisma-stability":"experimental"},"delete":{"responses":{"204":{"description":"Deployment deleted."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment must be stopped before it can be deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1DeploymentsByDeploymentId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"deploymentId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Delete deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nPermanently deletes the deployment, its metadata, and any associated VM. The deployment must be stopped or in the `new` state before it can be deleted.","x-prisma-stability":"experimental"}},"/v1/deployments/{deploymentId}/start":{"post":{"responses":{"200":{"description":"Start request accepted. The preview domain is returned immediately.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"previewDomain":{"type":"string"}},"required":["previewDomain"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment is in a state that does not allow starting (e.g. artifact not uploaded, or already running).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1DeploymentsByDeploymentIdStart","tags":["[Experimental]"],"parameters":[{"in":"path","name":"deploymentId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Start deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRequests VM creation and startup for the deployment. The artifact must be uploaded before calling this endpoint. Returns a preview domain that becomes reachable once the VM is running. Poll the status endpoint until `running` is reached.","x-prisma-stability":"experimental"}},"/v1/deployments/{deploymentId}/stop":{"post":{"responses":{"204":{"description":"Stop request accepted."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment must be running or provisioning to be stopped.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1DeploymentsByDeploymentIdStop","tags":["[Experimental]"],"parameters":[{"in":"path","name":"deploymentId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Stop deployment","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRequests VM shutdown for the deployment. The deployment record and metadata are retained. Poll the status endpoint until `stopped` is reached.","x-prisma-stability":"experimental"}},"/v1/deployments/{deploymentId}/logs":{"get":{"responses":{"101":{"description":"WebSocket connection established. Each message is a JSON object discriminated by `type`."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Deployment not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"426":{"description":"Request must be a WebSocket upgrade.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1DeploymentsByDeploymentIdLogs","tags":["[Experimental]"],"parameters":[{"in":"path","name":"deploymentId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"tail","schema":{"type":"integer","minimum":1,"maximum":10000}},{"in":"query","name":"from_start","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"cursor","schema":{"type":"string","pattern":"^\\d+$"}}],"summary":"Stream deployment logs via WebSocket","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nUpgrades to a WebSocket connection that streams log output for the specified deployment. Each message is a JSON object with `type: \"log\"` (log text + byte metadata) or `type: \"terminal\"` (end-of-segment signal with reconnect cursor). The stream ends after 10 minutes; reconnect with the `cursor` query parameter to continue.","x-prisma-stability":"experimental"}},"/v1/projects":{"get":{"responses":{"200":{"description":"Returns the list of projects.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"project"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"defaultRegion":{"type":["string","null"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","defaultRegion","workspace"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Projects","tags":["Projects"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}}],"summary":"Get list of projects","description":"Returns the list of projects the token has access to."},"post":{"responses":{"201":{"description":"New project created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"project"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"defaultRegion":{"type":["string","null"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"database":{"type":["object","null"],"properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["provisioning","ready"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]},"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"connectionString":{"type":"string","deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."}},"required":["id","type","url","name","createdAt","kind","endpoints","connectionString"]},"deprecated":true,"description":"Deprecated: use `connections[]` instead."},"connectionString":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use `connections[].endpoints.direct.connectionString` or `connections[].endpoints.pooled.connectionString`."},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `connections[].endpoints.direct` instead."}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","region","source","branchId","apiKeys","connectionString","directConnection"]}},"required":["id","type","url","name","createdAt","defaultRegion","workspace","database"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Projects","tags":["Projects"],"parameters":[],"summary":"Create project with a postgres database","description":"Creates a new project with a postgres database.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"createDatabase":{"type":"boolean","default":true},"name":{"type":"string","minLength":1},"region":{"type":"string","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1"]}}}}}}}},"/v1/projects/{id}":{"delete":{"responses":{"204":{"description":"Project deleted."},"400":{"description":"Project cannot be deleted due to existing dependencies.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project with the specified ID was not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1ProjectsById","tags":["Projects"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Delete project","description":"Deletes the project with the given ID."},"get":{"responses":{"200":{"description":"Project retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"project"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"defaultRegion":{"type":["string","null"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","defaultRegion","workspace"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project with the specified ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1ProjectsById","tags":["Projects"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Get project","description":"Returns the project with the given ID."},"patch":{"responses":{"200":{"description":"Project updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"project"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"defaultRegion":{"type":["string","null"]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","defaultRegion","workspace"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Actor does not have access to the project.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project with the specified ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"patchV1ProjectsById","tags":["Projects"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Update project","description":"Updates the project with the given ID.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"settings":{"type":"object","additionalProperties":{}}}}}}}}},"/v1/projects/{id}/transfer":{"post":{"responses":{"204":{"description":"Project transferred"},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1ProjectsByIdTransfer","tags":["Projects"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Transfer project","description":"Transfer the project with the given ID to the new owner's workspace","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"recipientAccessToken":{"type":"string"}},"required":["recipientAccessToken"]}}}}}},"/v1/projects/{projectId}/compute-services":{"get":{"responses":{"200":{"description":"Returns the list of compute services.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"compute-service"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestVersionId":{"type":["string","null"]},"serviceEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","region","projectId","branchId","latestVersionId","serviceEndpointDomain","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1ProjectsByProjectIdCompute-services","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}}],"summary":"List compute services for a project","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all compute services belonging to a project, ordered by creation time (oldest first). Supports cursor-based pagination.","x-prisma-stability":"experimental"},"post":{"responses":{"201":{"description":"Compute service created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"compute-service"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"latestVersionId":{"type":["string","null"]},"serviceEndpointDomain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","region","projectId","branchId","latestVersionId","serviceEndpointDomain","createdAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A compute service with the same `displayName` already exists on the resolved branch. The body includes the existing service's id, name, and branch git name.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"compute_service:already_exists"},"message":{"type":"string"},"existingServiceId":{"type":"string"},"name":{"type":"string"},"branchGitName":{"type":"string"}},"required":["code","message","existingServiceId","name","branchGitName"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. missing displayName, empty display name, or invalid region).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1ProjectsByProjectIdCompute-services","tags":["[Experimental]"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Create compute service","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new compute service under the specified project. The service is placed in the given region, or the project's default region if omitted (falling back to us-east-1). Returns `409 Conflict` with the existing service's id, name, and branch if a service with the same name already exists on the resolved branch.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":256},"regionId":{"type":"string","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1"],"default":"us-east-1"},"branchId":{"type":["string","null"],"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchGitName":{"type":["string","null"],"minLength":1}},"required":["displayName"]}}}}}},"/v1/projects/{projectId}/databases":{"get":{"responses":{"200":{"description":"Returned the databases for the given project ID.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["failure","provisioning","ready","recovering"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1ProjectsByProjectIdDatabases","tags":["Databases"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}}],"summary":"Get list of databases","description":"Returns databases for the given project."},"post":{"responses":{"201":{"description":"Created a new database for the project.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"database"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"status":{"type":"string","enum":["provisioning","ready"]},"createdAt":{"type":"string","format":"date-time"},"isDefault":{"type":"boolean"},"defaultConnectionId":{"type":["string","null"],"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"connectionString":{"type":"string"}},"required":["host","port"]}}},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."},"database":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]}},"required":["id","type","url","name","createdAt","kind","endpoints","database"]}},"project":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["id","url","name"]},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string"}},"required":["type","databaseId"]},{"type":"null"}]},"branchId":{"type":["string","null"]},"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"connection"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["postgres","accelerate"]},"endpoints":{"type":"object","properties":{"direct":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"pooled":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]},"accelerate":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"]}}},"connectionString":{"type":"string","deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead."},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead."}},"required":["id","type","url","name","createdAt","kind","endpoints","connectionString"]},"deprecated":true,"description":"Deprecated: use `connections[]` instead."},"connectionString":{"type":["string","null"],"deprecated":true,"description":"Deprecated: use `connections[].endpoints.direct.connectionString` or `connections[].endpoints.pooled.connectionString`."},"directConnection":{"type":["object","null"],"properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"deprecated":true,"description":"Deprecated: use `connections[].endpoints.direct` instead."}},"required":["id","type","url","name","status","createdAt","isDefault","defaultConnectionId","connections","project","region","source","branchId","apiKeys","connectionString","directConnection"]}},"required":["data"]}}}},"400":{"description":"The request is invalid due to missing or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Project does not belong to the service token’s workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1ProjectsByProjectIdDatabases","tags":["Databases"],"parameters":[{"in":"path","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Create database","description":"Creates a new database for the given project.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"region":{"type":"string","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1","inherit"],"default":"us-east-1"},"name":{"type":"string","minLength":1},"isDefault":{"type":"boolean","default":false},"fromDatabase":{"type":"object","properties":{"id":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"backupId":{"type":"string","description":"The unique identifier for this backup"}},"required":["id"],"deprecated":true,"description":"Deprecated: use `source` instead."},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"empty"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"backup"},"databaseId":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"ID of the database the backup belongs to"},"backupId":{"type":"string","description":"ID of the backup to restore from"}},"required":["type","databaseId","backupId"]},{"type":"object","properties":{"type":{"type":"string","const":"database"},"databaseId":{"type":"string","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"ID of the database to clone from"}},"required":["type","databaseId"]}]}}}}}}}},"/v1/environment-variables":{"post":{"responses":{"201":{"description":"Variable created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"environment-variable"},"url":{"type":"string","format":"uri"},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"class":{"type":"string","enum":["production","preview"]},"key":{"type":"string"},"valueKid":{"type":"string"},"isManagedBySystem":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","projectId","branchId","class","key","valueKid","isManagedBySystem","createdAt","updatedAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found, or token does not have access to it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"A variable with this key already exists in this environment.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error while processing the encrypted variable (e.g., a master-key rotation or deploy issue prevents the project's wrapped DEK from being decrypted). Not a client-fixable condition.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Environment-variables","tags":["[Experimental]"],"parameters":[],"summary":"Create an environment variable","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new environment variable in a project's `production` or `preview` environment, or a preview branch override when `branchId` is supplied. Returns 409 if a variable with the same key already exists in that scope — use PATCH to replace its value. Values are stored encrypted and are not returned by subsequent reads.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"branchId":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"class":{"type":"string","enum":["production","preview"]},"key":{"type":"string","pattern":"^[A-Z_][A-Z0-9_]*$","minLength":1,"maxLength":256},"value":{"type":"string","minLength":1}},"required":["projectId","class","key","value"],"additionalProperties":false}}}}},"get":{"responses":{"200":{"description":"Returned the page of environment variables.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"environment-variable"},"url":{"type":"string","format":"uri"},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"class":{"type":"string","enum":["production","preview"]},"key":{"type":"string"},"valueKid":{"type":"string"},"isManagedBySystem":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","projectId","branchId","class","key","valueKid","isManagedBySystem","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Environment-variables","tags":["[Experimental]"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}},{"in":"query","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},{"in":"query","name":"class","schema":{"type":"string","enum":["production","preview"]}},{"in":"query","name":"key","schema":{"type":"string","pattern":"^[A-Z_][A-Z0-9_]*$","minLength":1,"maxLength":256}},{"in":"query","name":"branchId","schema":{"type":"string","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}}],"summary":"List environment variables","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a paginated list of environment variables. All filters are optional; combine `projectId`, `class`, and `key` to look up a specific variable by name.","x-prisma-stability":"experimental"}},"/v1/environment-variables/{envVarId}":{"patch":{"responses":{"200":{"description":"Variable updated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"environment-variable"},"url":{"type":"string","format":"uri"},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"class":{"type":"string","enum":["production","preview"]},"key":{"type":"string"},"valueKid":{"type":"string"},"isManagedBySystem":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","projectId","branchId","class","key","valueKid","isManagedBySystem","createdAt","updatedAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Variable not found, or token does not have access to it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error while processing the encrypted variable (e.g., a master-key rotation or deploy issue prevents the project's wrapped DEK from being decrypted). Not a client-fixable condition.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"patchV1Environment-variablesByEnvVarId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"envVarId","schema":{"type":"string","pattern":"^(envvar_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Update an environment variable's value","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReplaces the value of an existing environment variable. Only the value is mutable — the project, environment, key, and branch are fixed at create-time.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","minLength":1}},"required":["value"],"additionalProperties":false}}}}},"get":{"responses":{"200":{"description":"Returned the environment variable.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"environment-variable"},"url":{"type":"string","format":"uri"},"projectId":{"type":"string"},"branchId":{"type":["string","null"]},"class":{"type":"string","enum":["production","preview"]},"key":{"type":"string"},"valueKid":{"type":"string"},"isManagedBySystem":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","projectId","branchId","class","key","valueKid","isManagedBySystem","createdAt","updatedAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Variable not found, or token does not have access to it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Environment-variablesByEnvVarId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"envVarId","schema":{"type":"string","pattern":"^(envvar_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Get an environment variable","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a single environment variable's metadata. The value is not returned.","x-prisma-stability":"experimental"},"delete":{"responses":{"204":{"description":"Variable deleted."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Variable not found, or token does not have access to it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1Environment-variablesByEnvVarId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"envVarId","schema":{"type":"string","pattern":"^(envvar_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Delete an environment variable","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRemoves an environment variable. A second delete of the same variable returns 404.","x-prisma-stability":"experimental"}},"/v1/integrations":{"get":{"responses":{"200":{"description":"Returned the integrations for the given workspace.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string","format":"date-time"},"scopes":{"type":"array","items":{"type":"string"}},"client":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","createdAt"]},"createdByUser":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"displayName":{"type":["string","null"]}},"required":["id","email","displayName"]}},"required":["id","url","createdAt","scopes","client","createdByUser"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Integrations","tags":["Integrations"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"},"required":false},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"},"required":false},{"in":"query","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Get list of integrations","description":"Returns integrations filtered by workspace ID."}},"/v1/integrations/{id}":{"get":{"responses":{"200":{"description":"Returned the integration.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string","format":"date-time"},"scopes":{"type":"array","items":{"type":"string"}},"client":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","createdAt"]},"createdByUser":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"displayName":{"type":["string","null"]}},"required":["id","email","displayName"]}},"required":["id","url","createdAt","scopes","client","createdByUser"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Integration with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1IntegrationsById","tags":["Integrations"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(itgr_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Get integration by ID","description":"Returns a single integration by its ID."},"delete":{"responses":{"204":{"description":"Revoked the integration tokens."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Integration with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1IntegrationsById","tags":["Integrations"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(itgr_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Delete integration","description":"Revokes the integration tokens by integration ID."}},"/v1/me":{"get":{"responses":{"200":{"description":"Current authenticated principal retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"user":{"type":["object","null"],"properties":{"id":{"type":"string","pattern":"^(usr_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"email":{"type":"string","format":"email"},"name":{"type":["string","null"]}},"required":["id","email","name"]},"workspace":{"type":["object","null"],"properties":{"id":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"name":{"type":"string"}},"required":["id","name"]},"credential":{"type":"object","properties":{"type":{"type":"string","enum":["oauth","service_token","management_token"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"]}},"required":["user","workspace","credential"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Me","tags":["Misc"],"parameters":[],"summary":"Get current authenticated principal","description":"Returns the user, workspace, and credential represented by the current token."}},"/v1/workspaces/{workspaceId}/integrations":{"get":{"responses":{"200":{"description":"Returned the integrations for the given workspace ID.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string","format":"date-time"},"scopes":{"type":"array","items":{"type":"string"}},"client":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","createdAt"]},"createdByUser":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"displayName":{"type":["string","null"]}},"required":["id","email","displayName"]}},"required":["id","url","createdAt","scopes","client","createdByUser"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Workspace with the given ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1WorkspacesByWorkspaceIdIntegrations","tags":["Integrations"],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}}],"summary":"Get list of integrations","description":"Returns integrations for the given workspace."}},"/v1/workspaces/{workspaceId}/integrations/{clientId}":{"delete":{"responses":{"204":{"description":"Revoked the integration tokens."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Integration with the given client ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId","tags":["Integrations"],"parameters":[{"in":"path","name":"clientId","schema":{"type":"string","pattern":"^(itgr_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"path","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Revoke integration tokens","description":"Revokes the integration tokens with the given client ID."}},"/v1/regions":{"get":{"responses":{"200":{"description":"Returns all available regions.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"region"},"name":{"type":"string"},"product":{"type":"string","enum":["postgres","accelerate"]},"status":{"type":"string","enum":["available","unavailable"]}},"required":["id","type","name","product"]}}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Regions","tags":["Regions"],"parameters":[{"in":"query","name":"product","schema":{"type":"string","enum":["postgres","accelerate"]}}],"summary":"Get all regions","description":"Returns all available regions across products. Optionally filter by product."}},"/v1/regions/postgres":{"get":{"responses":{"200":{"description":"Returns all available regions for Prisma Postgres.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"region"},"name":{"type":"string"},"status":{"type":"string","enum":["available","unavailable"]}},"required":["id","type","name","status"]}}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1RegionsPostgres","tags":["Misc"],"parameters":[],"summary":"Get Prisma Postgres regions","description":"Returns all available regions for Prisma Postgres."}},"/v1/regions/accelerate":{"get":{"responses":{"200":{"description":"Returns all available regions for Prisma Accelerate.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"region"},"name":{"type":"string"}},"required":["id","type","name"]}}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1RegionsAccelerate","tags":["Misc"],"parameters":[],"summary":"Get Prisma Accelerate regions","description":"Returns all available regions for Prisma Accelerate."}},"/v1/scm-installations":{"get":{"responses":{"200":{"description":"SCM installations the caller can access in the workspace. May be empty.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(scminstall_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"scm-installation"},"url":{"type":"string","format":"uri"},"provider":{"type":"string","enum":["github"]},"installationId":{"type":"integer","description":"Numeric installation ID assigned by the SCM provider"},"accountId":{"type":"integer","description":"Numeric account ID assigned by the SCM provider"},"accountLogin":{"type":"string"},"accountType":{"type":"string","enum":["user","organization"]},"suspended":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","provider","installationId","accountId","accountLogin","accountType","suspended","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Scm-installations","tags":["[Experimental]"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"},"required":false},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"},"required":false},{"in":"query","name":"workspaceId","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"List SCM installations for a workspace","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLists active SCM installations connected to the given workspace.","x-prisma-stability":"experimental"}},"/v1/scm-installations/install-intents":{"post":{"responses":{"201":{"description":"Installation intent created. The `installUrl` is single-use and time-limited.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"install-intent"},"provider":{"type":"string","enum":["github"]},"workspaceId":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"installUrl":{"type":"string","format":"uri"}},"required":["type","provider","workspaceId","installUrl"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Workspace integration tokens cannot create install intents; a user-authenticated request is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Workspace not found or not accessible.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed workspaceId or unsupported provider).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Scm-installationsInstall-intents","tags":["[Experimental]"],"parameters":[],"summary":"Create an SCM App installation intent","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates an installation intent for the given workspace and returns a provider-specific URL that the user opens to install the SCM app. Currently only `github` is supported.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["github"]},"workspaceId":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},"required":["provider","workspaceId"]}}}}}},"/v1/scm-installations/{installationId}/repositories":{"get":{"responses":{"200":{"description":"Repositories accessible to the installation.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Numeric repository ID assigned by the SCM provider"},"type":{"type":"string","const":"scm-repository"},"fullName":{"type":"string","description":"Full repository name, e.g. \"octocat/hello\""},"defaultBranch":{"type":"string"},"isPrivate":{"type":"boolean"}},"required":["id","type","fullName","defaultBranch","isPrivate"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Installation not found or not accessible.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"The SCM provider rejected the repository listing request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Scm-installationsByInstallationIdRepositories","tags":["[Experimental]"],"parameters":[{"in":"path","name":"installationId","schema":{"type":"string","pattern":"^(scminstall_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true},{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination (opaque, returned from previous response)"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":100,"description":"Maximum repositories to return (default and max 100)."}}],"summary":"List repositories accessible to an SCM installation","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLists repositories accessible to the given SCM installation.","x-prisma-stability":"experimental"}},"/v1/source-repositories":{"post":{"responses":{"201":{"description":"Source repository linked.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(srcrepo_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"source-repository"},"url":{"type":"string","format":"uri"},"repoId":{"type":"integer"},"provider":{"type":"string","enum":["github"]},"repoFullName":{"type":"string"},"defaultBranch":{"type":"string"},"isPrivate":{"type":"boolean"},"status":{"type":"string","enum":["active","archived"]},"projectId":{"type":"string"},"installationId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","repoId","provider","repoFullName","defaultBranch","isPrivate","status","projectId","installationId","createdAt","updatedAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"SCM installation is suspended, uninstalled, or actor lacks access.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project or SCM installation not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Repository or project already linked.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Repository not accessible to the installation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Source-repositories","tags":["[Experimental]"],"parameters":[],"summary":"Link a source repository to a project","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLinks a GitHub repository to a Prisma project via an existing SCM installation.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"provider":{"type":"string","const":"github"},"providerRepositoryId":{"type":"integer","exclusiveMinimum":0},"installationId":{"type":"string","pattern":"^(scminstall_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","description":"Optional SCM installation ID to use for linking. When omitted, the API auto-picks the workspace's installation."}},"required":["projectId","provider","providerRepositoryId"]}}}}},"get":{"responses":{"200":{"description":"Returned the list of source repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(srcrepo_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"source-repository"},"url":{"type":"string","format":"uri"},"repoId":{"type":"integer"},"provider":{"type":"string","enum":["github"]},"repoFullName":{"type":"string"},"defaultBranch":{"type":"string"},"isPrivate":{"type":"boolean"},"status":{"type":"string","enum":["active","archived"]},"projectId":{"type":"string"},"installationId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","repoId","provider","repoFullName","defaultBranch","isPrivate","status","projectId","installationId","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Source-repositories","tags":["[Experimental]"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"},"required":false},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"},"required":false},{"in":"query","name":"projectId","schema":{"type":"string","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"List source repositories","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns source repositories linked to a project. Requires projectId query parameter.","x-prisma-stability":"experimental"}},"/v1/source-repositories/{id}":{"delete":{"responses":{"204":{"description":"Source repository disconnected."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Source repository not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1Source-repositoriesById","tags":["[Experimental]"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(srcrepo_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Disconnect a source repository","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDisconnects the source repository link. Existing branches and their attached resources are preserved.","x-prisma-stability":"experimental"},"get":{"responses":{"200":{"description":"Returned the source repository.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(srcrepo_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"source-repository"},"url":{"type":"string","format":"uri"},"repoId":{"type":"integer"},"provider":{"type":"string","enum":["github"]},"repoFullName":{"type":"string"},"defaultBranch":{"type":"string"},"isPrivate":{"type":"boolean"},"status":{"type":"string","enum":["active","archived"]},"projectId":{"type":"string"},"installationId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","url","repoId","provider","repoFullName","defaultBranch","isPrivate","status","projectId","installationId","createdAt","updatedAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Source repository not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Source-repositoriesById","tags":["[Experimental]"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(srcrepo_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Get a source repository","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a single source repository link by ID.","x-prisma-stability":"experimental"}},"/v1/versions":{"get":{"responses":{"200":{"description":"Returns the list of compute versions.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"compute-version"},"url":{"type":"string","format":"uri"},"foundryVersionId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","foundryVersionId","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. malformed computeServiceId filter).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Versions","tags":["[Experimental]"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}},{"in":"query","name":"computeServiceId","schema":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}}],"deprecated":true,"summary":"List compute versions","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all compute versions the token has access to, ordered by creation time (newest first). Optionally filter by compute service ID. Supports cursor-based pagination.","x-prisma-stability":"experimental"},"post":{"responses":{"201":{"description":"Compute version created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"compute-version"},"url":{"type":"string","format":"uri"},"foundryVersionId":{"type":"string"},"uploadUrl":{"type":["string","null"]}},"required":["id","type","url","foundryVersionId","uploadUrl"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute service not found, or the service's attached Branch has been deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"422":{"description":"Validation failed (e.g. missing `computeServiceId`, `skipCodeUpload` without an active promoted version, missing workspace context, or the compute service is not attached to a Branch — env-var resolution requires a Branch).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"500":{"description":"Internal error while resolving the deploy-time env vars (e.g., a master-key rotation or storage corruption prevents the project's wrapped DEK or a per-value envelope from being decrypted). Not a client-fixable condition.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1Versions","tags":["[Experimental]"],"parameters":[],"deprecated":true,"summary":"Create compute version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new compute version under the specified compute service. The `computeServiceId` is required in the request body. Returns a pre-signed upload URL for the artifact unless `skipCodeUpload` is set, in which case the active promoted version's artifact is forked. Environment variables are resolved automatically from the service's attached Branch (production-class templates for the production Branch; preview-class templates merged with branch overrides for preview Branches) — clients write env vars via the `/v1/environment-variables` endpoints, not as part of the deploy payload.","x-prisma-stability":"experimental","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"portMapping":{"type":"object","properties":{"http":{"anyOf":[{"type":"integer","minimum":1,"maximum":65535},{"type":"null"}]}}},"skipCodeUpload":{"type":"boolean"},"computeServiceId":{"type":"string","pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"}},"required":["computeServiceId"],"additionalProperties":false}}}}}},"/v1/versions/{versionId}":{"get":{"responses":{"200":{"description":"Compute version retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"compute-version"},"url":{"type":"string","format":"uri"},"foundryVersionId":{"type":"string"},"status":{"type":"string"},"previewDomain":{"type":["string","null"]},"envVars":{"type":"object","additionalProperties":{"type":"string","description":"Always \"[redacted]\". Compute version inspection endpoints expose env var names only; values are never returned.","example":"[redacted]"},"description":"Environment variable names present on this compute version. Values are always redacted as \"[redacted]\" and must not be treated as deployed secret values."},"portMapping":{"type":"object","properties":{"http":{"type":"number"}}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","foundryVersionId","status","previewDomain","createdAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute version not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1VersionsByVersionId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"versionId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Get compute version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a compute version by ID, including its current status derived from the underlying VM state.","x-prisma-stability":"experimental"},"delete":{"responses":{"204":{"description":"Compute version deleted."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute version not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The deployment must be stopped before it can be deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"deleteV1VersionsByVersionId","tags":["[Experimental]"],"parameters":[{"in":"path","name":"versionId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Delete compute version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nPermanently deletes the compute version, its metadata, and any associated VM. The version must be stopped or in the `new` state before it can be deleted.","x-prisma-stability":"experimental"}},"/v1/versions/{versionId}/start":{"post":{"responses":{"200":{"description":"Start request accepted. The preview domain is returned immediately.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"previewDomain":{"type":"string"}},"required":["previewDomain"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute version not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The compute version is in a state that does not allow starting (e.g. artifact not uploaded, or already running).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1VersionsByVersionIdStart","tags":["[Experimental]"],"parameters":[{"in":"path","name":"versionId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Start compute version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRequests VM creation and startup for the compute version. The artifact must be uploaded before calling this endpoint. Returns a preview domain that becomes reachable once the VM is running. Poll the status endpoint until `running` is reached.","x-prisma-stability":"experimental"}},"/v1/versions/{versionId}/stop":{"post":{"responses":{"204":{"description":"Stop request accepted."},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Insufficient permissions to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Compute version not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"The compute version must be running or provisioning to be stopped.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"postV1VersionsByVersionIdStop","tags":["[Experimental]"],"parameters":[{"in":"path","name":"versionId","schema":{"type":"string","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"deprecated":true,"summary":"Stop compute version","description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRequests VM shutdown for the compute version. The version record and metadata are retained. Poll the status endpoint until `stopped` is reached.","x-prisma-stability":"experimental"}},"/v1/workspaces":{"get":{"responses":{"200":{"description":"Returns the list of workspaces the current token can access.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"workspace"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","createdAt"]}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"],"description":"Next cursor to continue pagination"},"hasMore":{"type":"boolean","description":"Whether there are more items to paginate"}},"required":["nextCursor","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1Workspaces","tags":["Workspaces"],"parameters":[{"in":"query","name":"cursor","schema":{"type":["string","null"],"description":"Cursor for pagination"}},{"in":"query","name":"limit","schema":{"type":"number","default":100,"description":"Limit for pagination"}}],"summary":"Get list of workspaces","description":"Returns the list of workspaces the current token can access."}},"/v1/workspaces/{id}":{"get":{"responses":{"200":{"description":"Workspace retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$"},"type":{"type":"string","const":"workspace"},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","url","name","createdAt"]}},"required":["data"]}}}},"401":{"description":"Missing or invalid authorization token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Workspace with the specified ID was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}},"operationId":"getV1WorkspacesById","tags":["Workspaces"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$"},"required":true}],"summary":"Get workspace","description":"Returns the workspace with the given ID."}}}}