{"components":{"securitySchemes":{"Bearer":{"bearerFormat":"JWT","description":"OAuth2 token for API authentication","scheme":"bearer","type":"http"},"OAuth2":{"description":"OAuth2 authentication","flows":{"authorizationCode":{"authorizationUrl":"https://auth.prisma.io/authorize","refreshUrl":"https://auth.prisma.io/token","scopes":{"offline_access":"Offline access","workspace:admin":"Full access to workspace resources"},"tokenUrl":"https://auth.prisma.io/token"}},"type":"oauth2"}}},"info":{"description":"REST API for managing Prisma Postgres projects, databases, backups, and workspaces.","title":"Prisma Postgres Management API","version":"v1"},"openapi":"3.1.0","paths":{"/v1/agent-approvals/{approvalId}":{"get":{"description":"Reports where an approval stands, so an agent holding an approval_required response can wait for the sponsor's decision and retry. Only the agent the approval belongs to can read it.","operationId":"getV1Agent-approvalsByApprovalId","parameters":[{"in":"path","name":"approvalId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"decidedAt":{"type":["null","string"]},"expiresAt":{"type":"string"},"hint":{"type":"string"},"id":{"type":"string"},"status":{"enum":["pending","approved","approved_window","denied","expired","consumed"],"type":"string"},"windowExpiresAt":{"type":["null","string"]}},"required":["decidedAt","expiresAt","id","status","windowExpiresAt"],"type":"object"}}},"description":"The approval's current state"},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"No such approval for this agent"}},"summary":"Poll an approval","tags":["Agents"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/agent-approvals/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/agent-approvals/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/agent-approvals/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/agent-approvals/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/agent-approvals/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/agent-approvals/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/agent-approvals/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/agent-approvals/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/agent-approvals/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/apps":{"get":{"deprecated":true,"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `GET /v1/services` instead.\n\nReturns all apps the token has access to, ordered by creation time (oldest first). Optionally filter by project ID. Supports cursor-based pagination.","operationId":"getV1Apps","parameters":[{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}},{"in":"query","name":"projectId","schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"logicalId","schema":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"}},{"in":"query","name":"branchId","schema":{"anyOf":[{"const":"unassigned","type":"string"},{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}]}},{"in":"query","name":"branchGitName","schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"appEndpointDomain":{"type":"string"},"branchId":{"type":["null","string"]},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"latestDeploymentId":{"type":["null","string"]},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"projectId":{"type":"string"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":{"const":"app","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appEndpointDomain","branchId","createdAt","id","latestDeploymentId","logicalId","name","projectId","region","type","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returns the list of apps."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. malformed projectId filter)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"List apps","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/apps?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/apps?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/apps?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/apps?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/apps?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/apps?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/apps?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/apps?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/apps?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"post":{"deprecated":true,"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `POST /v1/services` instead.\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` when an app already occupies the slot on the resolved branch, either by name or by `logicalId`; the body includes the existing app's id, name, branch, and logical id, and `conflict` says which attribute clashed. The name is checked first. `logicalId` cannot be combined with `branchGitName`; pass `branchId` instead.","operationId":"postV1Apps","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"branchGitName":{"minLength":1,"type":["null","string"]},"branchId":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"displayName":{"maxLength":256,"minLength":1,"type":"string"},"logicalId":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"projectId":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"regionId":{"default":"us-east-1","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1"],"type":"string"}},"required":["displayName","projectId"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appEndpointDomain":{"type":"string"},"branchId":{"type":["null","string"]},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"latestDeploymentId":{"type":["null","string"]},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"projectId":{"type":"string"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":{"const":"app","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appEndpointDomain","branchId","createdAt","id","latestDeploymentId","logicalId","name","projectId","region","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"App created."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"branchGitName":{"type":"string"},"code":{"const":"app:already_exists","type":"string"},"conflict":{"description":"Which attribute of the existing app clashed.","enum":["name","logicalId"],"type":"string"},"existingAppId":{"type":"string"},"logicalId":{"description":"The existing app's logical id.","type":["null","string"]},"message":{"type":"string"},"name":{"type":"string"}},"required":["branchGitName","code","existingAppId","message","name"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"An app already occupies the slot on the resolved branch, by `displayName` or by `logicalId`. The body includes the existing app's id, name, branch git name, and logical id; `conflict` says which attribute clashed."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. missing projectId, empty display name, or invalid region)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Create app","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/apps\");\nrequest.Content = new StringContent(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"regionId\\\":\\\"us-east-1\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/apps' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\",\"projectId\":\"string\",\"regionId\":\"us-east-1\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\",\"projectId\":\"string\",\"regionId\":\"us-east-1\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/apps\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/apps\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"regionId\\\":\\\"us-east-1\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/apps', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\",\"projectId\":\"string\",\"regionId\":\"us-east-1\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/apps', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"regionId\\\":\\\"us-east-1\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/apps\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"regionId\\\":\\\"us-east-1\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/apps\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\",\"projectId\":\"string\",\"regionId\":\"us-east-1\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/apps\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"regionId\\\":\\\"us-east-1\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/apps/{appId}":{"delete":{"deprecated":true,"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `DELETE /v1/services/{serviceId}` instead.\n\nDeletes an app. Deployments under the app are deleted before the app is deleted.","operationId":"deleteV1AppsByAppId","parameters":[{"in":"path","name":"appId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"App deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"App not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"A deployment could not be deleted, or a concurrent deployment was created while deleting the app."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Delete app","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/apps/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/apps/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/apps/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/apps/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/apps/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/apps/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/apps/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/apps/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/apps/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"get":{"deprecated":true,"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `GET /v1/services/{serviceId}` instead.\n\nReturns an app by ID, including its region and active promoted deployment reference.","operationId":"getV1AppsByAppId","parameters":[{"in":"path","name":"appId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appEndpointDomain":{"type":"string"},"branchId":{"type":["null","string"]},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"latestDeploymentId":{"type":["null","string"]},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"projectId":{"type":"string"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":{"const":"app","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appEndpointDomain","branchId","createdAt","id","latestDeploymentId","logicalId","name","projectId","region","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"App retrieved."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"App not found."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Get app","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/apps/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/apps/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/apps/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/apps/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/apps/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/apps/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/apps/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/apps/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/apps/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"patch":{"deprecated":true,"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `PATCH /v1/services/{serviceId}` instead.\n\nUpdates the display name, logical id, or branch of an app. `logicalId` cannot be combined with `branchId` or `branchGitName` in one request; move the app first, then set its `logicalId`.","operationId":"patchV1AppsByAppId","parameters":[{"in":"path","name":"appId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"branchGitName":{"minLength":1,"type":["null","string"]},"branchId":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"displayName":{"maxLength":256,"minLength":1,"type":"string"},"logicalId":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appEndpointDomain":{"type":"string"},"branchId":{"type":["null","string"]},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"latestDeploymentId":{"type":["null","string"]},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"projectId":{"type":"string"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":{"const":"app","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appEndpointDomain","branchId","createdAt","id","latestDeploymentId","logicalId","name","projectId","region","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"App updated."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"App not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"An app with the same `logicalId` already exists on the branch."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. empty display name)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Update app","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.prisma.io/v1/apps/string\");\nrequest.Content = new StringContent(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.prisma.io/v1/apps/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.prisma.io/v1/apps/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/apps/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/apps/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/apps/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/apps/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.prisma.io/v1/apps/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/apps/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/apps/{appId}/deployments":{"get":{"deprecated":true,"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `GET /v1/services/{serviceId}/deployments` instead.\n\nReturns all deployments belonging to an app, ordered by creation time (newest first). Supports cursor-based pagination.","operationId":"getV1AppsByAppIdDeployments","parameters":[{"in":"path","name":"appId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"foundryVersionId":{"type":"string"},"id":{"type":"string"},"serviceId":{"type":"string"},"type":{"const":"deployment","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","foundryVersionId","id","serviceId","type","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returns the list of deployments."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"App not found."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"List deployments","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/apps/string/deployments?cursor=string&limit=100\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/apps/string/deployments?cursor=string&limit=100'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/apps/string/deployments?cursor=string&limit=100\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/apps/string/deployments?cursor=string&limit=100\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/apps/string/deployments?cursor=string&limit=100', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/apps/string/deployments?cursor=string&limit=100', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/apps/string/deployments?cursor=string&limit=100\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/apps/string/deployments?cursor=string&limit=100\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/apps/string/deployments?cursor=string&limit=100\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"post":{"deprecated":true,"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `POST /v1/services/{serviceId}/deployments` instead.\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.","operationId":"postV1AppsByAppIdDeployments","parameters":[{"in":"path","name":"appId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"portMapping":{"properties":{"http":{"anyOf":[{"maximum":65535,"minimum":1,"type":"integer"},{"type":"null"}]}},"type":"object"},"skipCodeUpload":{"type":"boolean"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"foundryVersionId":{"type":"string"},"id":{"type":"string"},"type":{"const":"deployment","type":"string"},"uploadUrl":{"type":["null","string"]},"url":{"format":"uri","type":"string"}},"required":["foundryVersionId","id","type","uploadUrl","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Deployment created."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"App not found, or the app's attached Branch has been deleted."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"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)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"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."}},"summary":"Create deployment","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/apps/string/deployments\");\nrequest.Content = new StringContent(\"{\\\"portMapping\\\":{\\\"http\\\":0},\\\"skipCodeUpload\\\":true}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/apps/string/deployments' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"portMapping\":{\"http\":0},\"skipCodeUpload\":true}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"portMapping\":{\"http\":0},\"skipCodeUpload\":true}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/apps/string/deployments\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/apps/string/deployments\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"portMapping\\\":{\\\"http\\\":0},\\\"skipCodeUpload\\\":true}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/apps/string/deployments', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"portMapping\":{\"http\":0},\"skipCodeUpload\":true}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/apps/string/deployments', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"portMapping\\\":{\\\"http\\\":0},\\\"skipCodeUpload\\\":true}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/apps/string/deployments\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"portMapping\\\":{\\\"http\\\":0},\\\"skipCodeUpload\\\":true}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/apps/string/deployments\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"portMapping\":{\"http\":0},\"skipCodeUpload\":true}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/apps/string/deployments\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"portMapping\\\":{\\\"http\\\":0},\\\"skipCodeUpload\\\":true}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/apps/{appId}/domains":{"get":{"deprecated":true,"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `GET /v1/services/{serviceId}/domains` instead.\n\nReturns all custom domains attached to any deployment of the app. Domains are aggregated across all deployments since Foundry lists per deployment.","operationId":"getV1AppsByAppIdDomains","parameters":[{"in":"path","name":"appId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"appId":{"type":"string"},"certExpiresAt":{"format":"date-time","type":["null","string"]},"computeServiceId":{"deprecated":true,"description":"Deprecated: use `appId` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"dnsRecords":{"items":{"properties":{"name":{"type":"string"},"ttl":{"type":["null","number"]},"type":{"const":"CNAME","type":"string"},"value":{"type":"string"}},"required":["name","ttl","type","value"],"type":"object"},"type":"array"},"failureCategory":{"enum":["dns","acme","storage","unknown",null],"type":["null","string"]},"failureReason":{"type":["null","string"]},"foundryStatus":{"type":"string"},"hostname":{"type":"string"},"id":{"type":"string"},"status":{"enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"],"type":"string"},"type":{"const":"custom-domain","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appId","certExpiresAt","computeServiceId","createdAt","dnsRecords","failureCategory","failureReason","foundryStatus","hostname","id","status","type","updatedAt","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"const":false,"type":"boolean"},"nextCursor":{"type":"null"}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"List of custom domains."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"App not found."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"List custom domains for an app","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/apps/string/domains\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/apps/string/domains'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/apps/string/domains\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/apps/string/domains\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/apps/string/domains', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/apps/string/domains', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/apps/string/domains\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/apps/string/domains\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/apps/string/domains\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"post":{"deprecated":true,"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `POST /v1/services/{serviceId}/domains` instead.\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).","operationId":"postV1AppsByAppIdDomains","parameters":[{"in":"path","name":"appId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"hostname":{"maxLength":253,"minLength":1,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z]{2,}$","type":"string"}},"required":["hostname"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appId":{"type":"string"},"certExpiresAt":{"format":"date-time","type":["null","string"]},"computeServiceId":{"deprecated":true,"description":"Deprecated: use `appId` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"dnsRecords":{"items":{"properties":{"name":{"type":"string"},"ttl":{"type":["null","number"]},"type":{"const":"CNAME","type":"string"},"value":{"type":"string"}},"required":["name","ttl","type","value"],"type":"object"},"type":"array"},"failureCategory":{"enum":["dns","acme","storage","unknown",null],"type":["null","string"]},"failureReason":{"type":["null","string"]},"foundryStatus":{"type":"string"},"hostname":{"type":"string"},"id":{"type":"string"},"status":{"enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"],"type":"string"},"type":{"const":"custom-domain","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appId","certExpiresAt","computeServiceId","createdAt","dnsRecords","failureCategory","failureReason","foundryStatus","hostname","id","status","type","updatedAt","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Custom domain already registered on this app."},"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appId":{"type":"string"},"certExpiresAt":{"format":"date-time","type":["null","string"]},"computeServiceId":{"deprecated":true,"description":"Deprecated: use `appId` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"dnsRecords":{"items":{"properties":{"name":{"type":"string"},"ttl":{"type":["null","number"]},"type":{"const":"CNAME","type":"string"},"value":{"type":"string"}},"required":["name","ttl","type","value"],"type":"object"},"type":"array"},"failureCategory":{"enum":["dns","acme","storage","unknown",null],"type":["null","string"]},"failureReason":{"type":["null","string"]},"foundryStatus":{"type":"string"},"hostname":{"type":"string"},"id":{"type":"string"},"status":{"enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"],"type":"string"},"type":{"const":"custom-domain","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appId","certExpiresAt","computeServiceId","createdAt","dnsRecords","failureCategory","failureReason","foundryStatus","hostname","id","status","type","updatedAt","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Custom domain created."},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid hostname or DNS verification failed."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"App not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Hostname already registered."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"App has no promoted deployment."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Domain quota exceeded or rate limit exceeded."}},"summary":"Create a custom domain","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/apps/string/domains\");\nrequest.Content = new StringContent(\"{\\\"hostname\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/apps/string/domains' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"hostname\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"hostname\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/apps/string/domains\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/apps/string/domains\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"hostname\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/apps/string/domains', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"hostname\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/apps/string/domains', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"hostname\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/apps/string/domains\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"hostname\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/apps/string/domains\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"hostname\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/apps/string/domains\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"hostname\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/apps/{appId}/promote":{"post":{"deprecated":true,"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `POST /v1/services/{serviceId}/promote` instead.\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.","operationId":"postV1AppsByAppIdPromote","parameters":[{"in":"path","name":"appId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"deploymentId":{"pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"versionId":{"deprecated":true,"description":"Deprecated: use `deploymentId` instead. Ignored when `deploymentId` is also present.","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appEndpointDomain":{"type":"string"},"reassignedDomains":{"type":"number"}},"required":["appEndpointDomain","reassignedDomains"],"type":"object"}},"required":["data"],"type":"object"}}},"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."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"App or deployment not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The deployment is not running."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. malformed app ID or missing deployment ID)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit or Compute resource limit exceeded."}},"summary":"Promote deployment","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/apps/string/promote\");\nrequest.Content = new StringContent(\"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/apps/string/promote' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"deploymentId\":\"string\",\"versionId\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"deploymentId\":\"string\",\"versionId\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/apps/string/promote\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/apps/string/promote\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/apps/string/promote', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"deploymentId\":\"string\",\"versionId\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/apps/string/promote', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/apps/string/promote\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/apps/string/promote\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"deploymentId\":\"string\",\"versionId\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/apps/string/promote\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/apps/{appId}/rollback":{"post":{"deprecated":true,"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeprecated: use `POST /v1/services/{serviceId}/rollback` instead.\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.","operationId":"postV1AppsByAppIdRollback","parameters":[{"in":"path","name":"appId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"deploymentId":{"pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"versionId":{"deprecated":true,"description":"Deprecated: use `deploymentId` instead. Ignored when `deploymentId` is also present.","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appEndpointDomain":{"type":"string"},"reassignedDomains":{"type":"number"}},"required":["appEndpointDomain","reassignedDomains"],"type":"object"}},"required":["data"],"type":"object"}}},"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."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"App or deployment not found, or the deployment's Foundry artifact no longer exists."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The deployment cannot be made live (e.g. it has no runnable artifact or is mid-teardown and cannot reach a running state)."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. malformed app ID or missing deployment ID)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit or Compute resource limit exceeded."}},"summary":"Roll an app back to an existing deployment","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/apps/string/rollback\");\nrequest.Content = new StringContent(\"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/apps/string/rollback' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"deploymentId\":\"string\",\"versionId\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"deploymentId\":\"string\",\"versionId\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/apps/string/rollback\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/apps/string/rollback\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/apps/string/rollback', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"deploymentId\":\"string\",\"versionId\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/apps/string/rollback', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/apps/string/rollback\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/apps/string/rollback\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"deploymentId\":\"string\",\"versionId\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/apps/string/rollback\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/auth/github-actions/token":{"post":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nVerifies the GitHub Actions OIDC token and mints a short-lived workspace service token. The caller must request the token with audience `prisma-cloud`. Any verification failure returns a generic 401 — the response never reveals whether a repository is connected.","operationId":"postV1AuthGithub-actionsToken","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"expiresInSeconds":{"default":1800,"description":"Requested token lifetime in seconds. Defaults to 1800 (30 min); capped at 3600 (60 min).","maximum":3600,"minimum":60,"type":"integer"},"token":{"description":"The GitHub Actions OIDC token with audience `prisma-cloud`.","minLength":1,"type":"string"}},"required":["token"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"expiresAt":{"description":"ISO 8601 instant after which the token is invalid.","format":"date-time","type":"string"},"id":{"description":"Prefixed integration token ID (`itgr_` prefix).","type":"string"},"type":{"const":"serviceToken","type":"string"},"value":{"description":"The minted integration token. Returned once — copy it immediately.","type":"string"},"workspaceId":{"description":"Prefixed workspace ID the token is scoped to.","type":"string"}},"required":["expiresAt","id","type","value","workspaceId"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Minted a short-lived workspace service token."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"const":"unauthorized","type":"string"},"errorDescription":{"type":"string"}},"required":["error","errorDescription"],"type":"object"}}},"description":"Missing, expired, or invalid OIDC token, or no active repository link."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"security":[],"summary":"Exchange a GitHub Actions OIDC token for a workspace service token","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/auth/github-actions/token\");\nrequest.Content = new StringContent(\"{\\\"expiresInSeconds\\\":1800,\\\"token\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/auth/github-actions/token' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"expiresInSeconds\":1800,\"token\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"expiresInSeconds\":1800,\"token\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/auth/github-actions/token\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/auth/github-actions/token\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"expiresInSeconds\\\":1800,\\\"token\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/auth/github-actions/token', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"expiresInSeconds\":1800,\"token\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/auth/github-actions/token', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"expiresInSeconds\\\":1800,\\\"token\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/auth/github-actions/token\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"expiresInSeconds\\\":1800,\\\"token\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/auth/github-actions/token\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"expiresInSeconds\":1800,\"token\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/auth/github-actions/token\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"expiresInSeconds\\\":1800,\\\"token\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/branches/{branchId}":{"delete":{"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.","operationId":"deleteV1BranchesByBranchId","parameters":[{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Branch soft-deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Branch still has live member resources."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Branch is the Project's current default or production Branch."}},"summary":"Soft-delete a branch","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/branches/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/branches/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/branches/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/branches/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/branches/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/branches/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/branches/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/branches/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/branches/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"get":{"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/apps?branchId=.","operationId":"getV1BranchesByBranchId","parameters":[{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"gitName":{"type":"string"},"id":{"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"isDefault":{"type":"boolean"},"project":{"description":"Thin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/apps?branchId=<br_xxx> instead (see API design principles \"Flat and Hierarchical Coexistence\").","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"role":{"enum":["production","preview"],"type":"string"},"type":{"const":"branch","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","gitName","id","isDefault","project","role","type","updatedAt","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Returned the Branch."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Branch not found."}},"summary":"Get a branch","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/branches/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/branches/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/branches/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/branches/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/branches/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/branches/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/branches/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/branches/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/branches/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"patch":{"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.","operationId":"patchV1BranchesByBranchId","parameters":[{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"isDefault":{"type":["boolean","null"]}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"gitName":{"type":"string"},"id":{"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"isDefault":{"type":"boolean"},"project":{"description":"Thin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/apps?branchId=<br_xxx> instead (see API design principles \"Flat and Hierarchical Coexistence\").","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"role":{"enum":["production","preview"],"type":"string"},"type":{"const":"branch","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","gitName","id","isDefault","project","role","type","updatedAt","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Branch updated."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Branch not found."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"gitName rename, role change, demote-default, or unknown field rejected."}},"summary":"Update a branch","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.prisma.io/v1/branches/string\");\nrequest.Content = new StringContent(\"{\\\"isDefault\\\":true}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.prisma.io/v1/branches/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"isDefault\":true}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"isDefault\":true}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.prisma.io/v1/branches/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/branches/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"isDefault\\\":true}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/branches/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"isDefault\":true}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/branches/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"isDefault\\\":true}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/branches/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"isDefault\\\":true}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.prisma.io/v1/branches/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"isDefault\":true}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/branches/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"isDefault\\\":true}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/buckets":{"get":{"description":"Returns all object-store buckets the token has access to. Optionally filter by project ID.","operationId":"getV1Buckets","parameters":[{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Page size, 1-100","maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"projectId","schema":{"description":"Filter buckets by project ID","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"logicalId","schema":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"}},{"in":"query","name":"branchId","schema":{"anyOf":[{"const":"unassigned","type":"string"},{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}]}},{"in":"query","name":"branchGitName","schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"branchId":{"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"createdAt":{"format":"date-time","type":"string"},"id":{"pattern":"^(bkt_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"project":{"properties":{"id":{"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"providerName":{"type":"string"},"status":{"type":"string"},"type":{"const":"bucket","type":"string"},"url":{"format":"uri","type":"string"}},"required":["branchId","createdAt","id","logicalId","name","project","providerName","status","type","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returns the list of buckets."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"List buckets","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/buckets?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/buckets?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/buckets?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/buckets?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/buckets?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/buckets?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/buckets?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/buckets?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/buckets?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"description":"Creates a new object-store bucket in the specified project.","operationId":"postV1Buckets","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"branchGitName":{"description":"Git name of the branch to associate the bucket with. Mutually exclusive with branchId.","minLength":1,"type":"string"},"branchId":{"description":"ID of the branch to associate the bucket with. Mutually exclusive with branchGitName.","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"logicalId":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"name":{"description":"Display name for the bucket. Generated if omitted.","maxLength":100,"minLength":1,"type":"string"},"projectId":{"description":"ID of the project to create the bucket in","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},"required":["projectId"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"branchId":{"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"createdAt":{"format":"date-time","type":"string"},"id":{"pattern":"^(bkt_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"project":{"properties":{"id":{"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"providerName":{"type":"string"},"status":{"type":"string"},"type":{"const":"bucket","type":"string"},"url":{"format":"uri","type":"string"}},"required":["branchId","createdAt","id","logicalId","name","project","providerName","status","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created a new bucket."},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid request parameters."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Actor does not have access to the specified project."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"A bucket with the same `logicalId` already exists on the branch."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Create bucket","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/buckets\");\nrequest.Content = new StringContent(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/buckets' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"branchGitName\":\"string\",\"branchId\":\"string\",\"logicalId\":\"string\",\"name\":\"string\",\"projectId\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"branchGitName\":\"string\",\"branchId\":\"string\",\"logicalId\":\"string\",\"name\":\"string\",\"projectId\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/buckets\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/buckets\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/buckets', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"branchGitName\":\"string\",\"branchId\":\"string\",\"logicalId\":\"string\",\"name\":\"string\",\"projectId\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/buckets', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/buckets\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/buckets\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"branchGitName\":\"string\",\"branchId\":\"string\",\"logicalId\":\"string\",\"name\":\"string\",\"projectId\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/buckets\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/buckets/{bucketId}":{"delete":{"description":"Permanently deletes the bucket with the given ID, all objects stored in it, and all its access keys. This action cannot be undone.","operationId":"deleteV1BucketsByBucketId","parameters":[{"in":"path","name":"bucketId","required":true,"schema":{"pattern":"^(bkt_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Deleted the bucket successfully."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Bucket with the given ID was not found."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Delete bucket","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/buckets/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/buckets/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/buckets/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/buckets/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/buckets/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/buckets/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/buckets/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/buckets/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/buckets/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Returns the bucket with the given ID.","operationId":"getV1BucketsByBucketId","parameters":[{"in":"path","name":"bucketId","required":true,"schema":{"pattern":"^(bkt_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"branchId":{"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"createdAt":{"format":"date-time","type":"string"},"id":{"pattern":"^(bkt_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"project":{"properties":{"id":{"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"providerName":{"type":"string"},"status":{"type":"string"},"type":{"const":"bucket","type":"string"},"url":{"format":"uri","type":"string"}},"required":["branchId","createdAt","id","logicalId","name","project","providerName","status","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Returned the bucket with the given ID."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Bucket with the given ID was not found."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Get bucket","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/buckets/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/buckets/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/buckets/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/buckets/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/buckets/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/buckets/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/buckets/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/buckets/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/buckets/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"description":"Updates the display name, logical id, or branch of the bucket with the given ID. The display name is a label only: the provider bucket name, the objects, and the access keys do not change. `logicalId` cannot be combined with `branchId` or `branchGitName` in one request; move the bucket first, then set its `logicalId`.","operationId":"patchV1BucketsByBucketId","parameters":[{"in":"path","name":"bucketId","required":true,"schema":{"pattern":"^(bkt_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"branchGitName":{"description":"Git name of the branch to move the bucket to; the branch is created when it does not exist. Mutually exclusive with branchId.","minLength":1,"type":"string"},"branchId":{"description":"ID of the branch to move the bucket to. Mutually exclusive with branchGitName.","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"displayName":{"description":"New display name for the bucket. A label only: the provider bucket name does not change.","maxLength":100,"minLength":1,"type":"string"},"logicalId":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"branchId":{"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"createdAt":{"format":"date-time","type":"string"},"id":{"pattern":"^(bkt_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"project":{"properties":{"id":{"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"providerName":{"type":"string"},"status":{"type":"string"},"type":{"const":"bucket","type":"string"},"url":{"format":"uri","type":"string"}},"required":["branchId","createdAt","id","logicalId","name","project","providerName","status","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Updated the bucket."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Bucket or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"A bucket with the same `logicalId` already exists on the branch, the bucket's `logicalId` is already taken on the target branch of a move, or the target branch changed during the move."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. no field given, an empty display name, or `logicalId` combined with a branch move)."}},"summary":"Update bucket","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.prisma.io/v1/buckets/string\");\nrequest.Content = new StringContent(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.prisma.io/v1/buckets/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.prisma.io/v1/buckets/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/buckets/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/buckets/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/buckets/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/buckets/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.prisma.io/v1/buckets/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/buckets/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/buckets/{bucketId}/keys":{"get":{"description":"Returns all access keys for the given bucket.","operationId":"getV1BucketsByBucketIdKeys","parameters":[{"in":"path","name":"bucketId","required":true,"schema":{"pattern":"^(bkt_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Page size, 1-100","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"pattern":"^(bkey_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":"string"},"role":{"enum":["read","read_write"],"type":"string"},"type":{"const":"bucketKey","type":"string"},"valueHint":{"type":"string"}},"required":["createdAt","id","name","role","type","valueHint"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returns the list of bucket keys."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Bucket with the given ID was not found."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"List bucket keys","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/buckets/string/keys?cursor=string&limit=100\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/buckets/string/keys?cursor=string&limit=100'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/buckets/string/keys?cursor=string&limit=100\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/buckets/string/keys?cursor=string&limit=100\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/buckets/string/keys?cursor=string&limit=100', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/buckets/string/keys?cursor=string&limit=100', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/buckets/string/keys?cursor=string&limit=100\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/buckets/string/keys?cursor=string&limit=100\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/buckets/string/keys?cursor=string&limit=100\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"description":"Creates a new access key for the given bucket. The `secretAccessKey` field is returned exactly once in this response and is never stored — copy it immediately.","operationId":"postV1BucketsByBucketIdKeys","parameters":[{"in":"path","name":"bucketId","required":true,"schema":{"pattern":"^(bkt_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"Display name for the key. Generated if omitted.","minLength":1,"type":"string"},"role":{"description":"Access role for the key: \"read\" or \"read_write\".","enum":["read","read_write"],"type":"string"}},"required":["role"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"accessKeyId":{"type":"string"},"bucketName":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"endpoint":{"type":"string"},"id":{"pattern":"^(bkey_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":"string"},"role":{"enum":["read","read_write"],"type":"string"},"secretAccessKey":{"type":"string"},"type":{"const":"bucketKey","type":"string"},"valueHint":{"type":"string"}},"required":["accessKeyId","bucketName","createdAt","endpoint","id","name","role","secretAccessKey","type","valueHint"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created a new bucket key. The secret is returned once in the response body."},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid request parameters."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Bucket with the given ID was not found."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Create bucket key","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/buckets/string/keys\");\nrequest.Content = new StringContent(\"{\\\"name\\\":\\\"string\\\",\\\"role\\\":\\\"read\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/buckets/string/keys' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"string\",\"role\":\"read\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"name\":\"string\",\"role\":\"read\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/buckets/string/keys\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/buckets/string/keys\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\":\\\"string\\\",\\\"role\\\":\\\"read\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/buckets/string/keys', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"name\":\"string\",\"role\":\"read\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/buckets/string/keys', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"name\\\":\\\"string\\\",\\\"role\\\":\\\"read\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/buckets/string/keys\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"string\\\",\\\"role\\\":\\\"read\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/buckets/string/keys\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"name\":\"string\",\"role\":\"read\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/buckets/string/keys\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"name\\\":\\\"string\\\",\\\"role\\\":\\\"read\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/buckets/{bucketId}/keys/{keyId}":{"delete":{"description":"Revokes and deletes the bucket key with the given ID.","operationId":"deleteV1BucketsByBucketIdKeysByKeyId","parameters":[{"in":"path","name":"bucketId","required":true,"schema":{"pattern":"^(bkt_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"keyId","required":true,"schema":{"pattern":"^(bkey_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Deleted the bucket key successfully."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Bucket key not found or does not belong to the given bucket."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Delete bucket key","tags":["Buckets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/buckets/string/keys/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/buckets/string/keys/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/buckets/string/keys/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/buckets/string/keys/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/buckets/string/keys/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/buckets/string/keys/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/buckets/string/keys/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/buckets/string/keys/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/buckets/string/keys/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/builds":{"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLists the builds of the caller's workspace, newest first, filtered by project, branch, or state. `cursor` is opaque: pass back the `nextCursor` the previous page returned.","operationId":"getV1Builds","parameters":[{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}},{"in":"query","name":"projectId","schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"branchId","schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"state","schema":{"enum":["pending","running","succeeded","failed","cancelled"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"applicationTopologyContentHash":{"type":["null","string"]},"branchId":{"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"branchName":{"type":"string"},"commitSha":{"type":"string"},"createdAt":{"type":"string"},"deployedUrl":{"type":["null","string"]},"errorMessage":{"type":["null","string"]},"externalLogUrl":{"type":["null","string"]},"failingStep":{"type":["null","string"]},"finishedAt":{"type":["null","string"]},"gitRepoId":{"description":"Repository the build ran against. Set only when the workspace has a live link to it; a reported repository the platform does not know stays null.","type":["null","string"]},"id":{"pattern":"^(bld_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"phase":{"description":"Null when nothing reported a phase; the platform never invents an observation it did not receive.","enum":["queued","build","deploy",null],"type":["null","string"]},"projectId":{"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"source":{"enum":["webhook","setup","manual","ci","cli"],"type":"string"},"startedAt":{"type":["null","string"]},"state":{"enum":["pending","running","succeeded","failed","cancelled"],"type":"string"}},"required":["applicationTopologyContentHash","branchId","branchName","commitSha","createdAt","deployedUrl","errorMessage","externalLogUrl","failingStep","finishedAt","gitRepoId","id","phase","projectId","source","startedAt","state"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Builds, newest first."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Build not found, or the caller's workspace does not own it (indistinguishable)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"List builds","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/builds?branchId=string&cursor=string&limit=100&projectId=string&state=cancelled\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/builds?branchId=string&cursor=string&limit=100&projectId=string&state=cancelled'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/builds?branchId=string&cursor=string&limit=100&projectId=string&state=cancelled\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/builds?branchId=string&cursor=string&limit=100&projectId=string&state=cancelled\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/builds?branchId=string&cursor=string&limit=100&projectId=string&state=cancelled', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/builds?branchId=string&cursor=string&limit=100&projectId=string&state=cancelled', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/builds?branchId=string&cursor=string&limit=100&projectId=string&state=cancelled\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/builds?branchId=string&cursor=string&limit=100&projectId=string&state=cancelled\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/builds?branchId=string&cursor=string&limit=100&projectId=string&state=cancelled\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"post":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRecords a build any deploy tool is running — a CI workflow, a deploy script, or Composer from a laptop. The workspace comes from the token, never from the body, which is what lets a build be reported before the project it will create exists. Supplying `runIdentity` makes the call idempotent: a repeat for the same run returns the build already recorded rather than a second one. The response is the same either way; a caller cannot tell whether it created the build or joined one.\n\nA build reported with no `runIdentity` has no dedup key, so a client that retries a lost response creates a second build. Supply a `runIdentity` whenever the run has one.","operationId":"postV1Builds","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"applicationTopologyContentHash":{"description":"Content hash of the application topology this run deploys, as submitted to the application-topology endpoint. A value match, never a reference: equal hashes identify the same graph.","maxLength":200,"minLength":1,"type":"string"},"branchId":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"branchName":{"description":"Git branch name.","maxLength":500,"minLength":1,"type":"string"},"commitSha":{"description":"Commit the build ran on.","maxLength":200,"minLength":1,"type":"string"},"externalLogUrl":{"description":"Link to the run's logs in the reporter's own system.","format":"uri","maxLength":2000,"type":"string"},"projectId":{"description":"Project the build targets, when it exists. A build may be reported before its project does.","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"runIdentity":{"description":"Identifies the CI run. Supplying it makes creation idempotent — a repeat call for the same run returns the build that already exists. Omit it for builds with no run to name, such as a deploy from a laptop, where every call creates a new build.","properties":{"provider":{"const":"github","description":"CI provider the run identity belongs to.","type":"string"},"repositoryId":{"description":"Provider's repository id (for GitHub, the numeric repo id).","maxLength":20,"pattern":"^[0-9]+$","type":"string"},"runAttempt":{"description":"Attempt number of the run; a re-run is a separate build.","exclusiveMinimum":0,"type":"integer"},"runId":{"description":"Provider's workflow-run id.","maxLength":20,"pattern":"^[0-9]+$","type":"string"}},"required":["provider","repositoryId","runAttempt","runId"],"type":"object"},"source":{"description":"`ci` for a build reported from a CI run, `cli` for a deploy run directly by a human or agent.","enum":["ci","cli"],"type":"string"}},"required":["branchName","commitSha","source"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"applicationTopologyContentHash":{"type":["null","string"]},"branchId":{"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"branchName":{"type":"string"},"commitSha":{"type":"string"},"createdAt":{"type":"string"},"deployedUrl":{"type":["null","string"]},"errorMessage":{"type":["null","string"]},"externalLogUrl":{"type":["null","string"]},"failingStep":{"type":["null","string"]},"finishedAt":{"type":["null","string"]},"gitRepoId":{"description":"Repository the build ran against. Set only when the workspace has a live link to it; a reported repository the platform does not know stays null.","type":["null","string"]},"id":{"pattern":"^(bld_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"phase":{"description":"Null when nothing reported a phase; the platform never invents an observation it did not receive.","enum":["queued","build","deploy",null],"type":["null","string"]},"projectId":{"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"source":{"enum":["webhook","setup","manual","ci","cli"],"type":"string"},"startedAt":{"type":["null","string"]},"state":{"enum":["pending","running","succeeded","failed","cancelled"],"type":"string"}},"required":["applicationTopologyContentHash","branchId","branchName","commitSha","createdAt","deployedUrl","errorMessage","externalLogUrl","failingStep","finishedAt","gitRepoId","id","phase","projectId","source","startedAt","state"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"The build. Returned whether this call created it or an earlier report of the same run did."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Build not found, or the caller's workspace does not own it (indistinguishable)."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Report a build","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/builds\");\nrequest.Content = new StringContent(\"{\\\"applicationTopologyContentHash\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"branchName\\\":\\\"string\\\",\\\"commitSha\\\":\\\"string\\\",\\\"externalLogUrl\\\":\\\"https://example.com\\\",\\\"projectId\\\":\\\"string\\\",\\\"runIdentity\\\":{\\\"provider\\\":\\\"github\\\",\\\"repositoryId\\\":\\\"string\\\",\\\"runAttempt\\\":0,\\\"runId\\\":\\\"string\\\"},\\\"source\\\":\\\"ci\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/builds' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"applicationTopologyContentHash\":\"string\",\"branchId\":\"string\",\"branchName\":\"string\",\"commitSha\":\"string\",\"externalLogUrl\":\"https://example.com\",\"projectId\":\"string\",\"runIdentity\":{\"provider\":\"github\",\"repositoryId\":\"string\",\"runAttempt\":0,\"runId\":\"string\"},\"source\":\"ci\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"applicationTopologyContentHash\":\"string\",\"branchId\":\"string\",\"branchName\":\"string\",\"commitSha\":\"string\",\"externalLogUrl\":\"https://example.com\",\"projectId\":\"string\",\"runIdentity\":{\"provider\":\"github\",\"repositoryId\":\"string\",\"runAttempt\":0,\"runId\":\"string\"},\"source\":\"ci\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/builds\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/builds\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"applicationTopologyContentHash\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"branchName\\\":\\\"string\\\",\\\"commitSha\\\":\\\"string\\\",\\\"externalLogUrl\\\":\\\"https://example.com\\\",\\\"projectId\\\":\\\"string\\\",\\\"runIdentity\\\":{\\\"provider\\\":\\\"github\\\",\\\"repositoryId\\\":\\\"string\\\",\\\"runAttempt\\\":0,\\\"runId\\\":\\\"string\\\"},\\\"source\\\":\\\"ci\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/builds', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"applicationTopologyContentHash\":\"string\",\"branchId\":\"string\",\"branchName\":\"string\",\"commitSha\":\"string\",\"externalLogUrl\":\"https://example.com\",\"projectId\":\"string\",\"runIdentity\":{\"provider\":\"github\",\"repositoryId\":\"string\",\"runAttempt\":0,\"runId\":\"string\"},\"source\":\"ci\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/builds', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"applicationTopologyContentHash\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"branchName\\\":\\\"string\\\",\\\"commitSha\\\":\\\"string\\\",\\\"externalLogUrl\\\":\\\"https://example.com\\\",\\\"projectId\\\":\\\"string\\\",\\\"runIdentity\\\":{\\\"provider\\\":\\\"github\\\",\\\"repositoryId\\\":\\\"string\\\",\\\"runAttempt\\\":0,\\\"runId\\\":\\\"string\\\"},\\\"source\\\":\\\"ci\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/builds\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"applicationTopologyContentHash\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"branchName\\\":\\\"string\\\",\\\"commitSha\\\":\\\"string\\\",\\\"externalLogUrl\\\":\\\"https://example.com\\\",\\\"projectId\\\":\\\"string\\\",\\\"runIdentity\\\":{\\\"provider\\\":\\\"github\\\",\\\"repositoryId\\\":\\\"string\\\",\\\"runAttempt\\\":0,\\\"runId\\\":\\\"string\\\"},\\\"source\\\":\\\"ci\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/builds\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"applicationTopologyContentHash\":\"string\",\"branchId\":\"string\",\"branchName\":\"string\",\"commitSha\":\"string\",\"externalLogUrl\":\"https://example.com\",\"projectId\":\"string\",\"runIdentity\":{\"provider\":\"github\",\"repositoryId\":\"string\",\"runAttempt\":0,\"runId\":\"string\"},\"source\":\"ci\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/builds\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"applicationTopologyContentHash\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"branchName\\\":\\\"string\\\",\\\"commitSha\\\":\\\"string\\\",\\\"externalLogUrl\\\":\\\"https://example.com\\\",\\\"projectId\\\":\\\"string\\\",\\\"runIdentity\\\":{\\\"provider\\\":\\\"github\\\",\\\"repositoryId\\\":\\\"string\\\",\\\"runAttempt\\\":0,\\\"runId\\\":\\\"string\\\"},\\\"source\\\":\\\"ci\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/builds/{buildId}":{"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns one build with the resources it reported acting on.","operationId":"getV1BuildsByBuildId","parameters":[{"in":"path","name":"buildId","required":true,"schema":{"pattern":"^(bld_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"applicationTopologyContentHash":{"type":["null","string"]},"branchId":{"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"branchName":{"type":"string"},"commitSha":{"type":"string"},"createdAt":{"type":"string"},"deployedUrl":{"type":["null","string"]},"errorMessage":{"type":["null","string"]},"externalLogUrl":{"type":["null","string"]},"failingStep":{"type":["null","string"]},"finishedAt":{"type":["null","string"]},"gitRepoId":{"description":"Repository the build ran against. Set only when the workspace has a live link to it; a reported repository the platform does not know stays null.","type":["null","string"]},"id":{"pattern":"^(bld_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"phase":{"description":"Null when nothing reported a phase; the platform never invents an observation it did not receive.","enum":["queued","build","deploy",null],"type":["null","string"]},"projectId":{"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"resources":{"items":{"properties":{"action":{"enum":["created","acted_on","deleted"],"type":"string"},"createdAt":{"type":"string"},"resourceId":{"description":"Prefixed id of the reported resource.","type":"string"},"resourceType":{"enum":["project","branch","database","app","deployment","bucket","service_key","config_variable"],"type":"string"}},"required":["action","createdAt","resourceId","resourceType"],"type":"object"},"type":"array"},"source":{"enum":["webhook","setup","manual","ci","cli"],"type":"string"},"startedAt":{"type":["null","string"]},"state":{"enum":["pending","running","succeeded","failed","cancelled"],"type":"string"}},"required":["applicationTopologyContentHash","branchId","branchName","commitSha","createdAt","deployedUrl","errorMessage","externalLogUrl","failingStep","finishedAt","gitRepoId","id","phase","projectId","resources","source","startedAt","state"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"The build, with its reported resources."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Build not found, or the caller's workspace does not own it (indistinguishable)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Get a build","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/builds/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/builds/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/builds/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/builds/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/builds/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/builds/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/builds/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/builds/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/builds/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"patch":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRecords progress on a build. Any holder of the workspace token may patch any field — the webhook, the CI run and Composer each report the part of a deploy they can see, and the token is the boundary. Reaching `running` stamps `startedAt` and reaching a terminal state stamps `finishedAt`, both only if unset, so re-reporting the same state does not move the clock. Once a build has finished, its state no longer changes: a later report updates the other fields and leaves the state as the finishing report set it.\n\n`projectId`, `branchId`, `deployedUrl` and `applicationTopologyContentHash` can each be set once and never changed: a reporter that resolves them partway through a deploy sets them here, but a value already recorded cannot be changed and the attempt is a conflict. Sending the value already recorded is accepted and changes nothing. `projectId` and `branchId` must belong to the caller's workspace, and a branch must belong to the build's project, so a branch from another project is refused.","operationId":"patchV1BuildsByBuildId","parameters":[{"in":"path","name":"buildId","required":true,"schema":{"pattern":"^(bld_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"applicationTopologyContentHash":{"description":"Content hash of the application topology this run deploys, as submitted to the application-topology endpoint. A value match, never a reference: equal hashes identify the same graph. Can be set once and never changed, like `projectId`.","maxLength":200,"minLength":1,"type":"string"},"branchId":{"description":"Branch the build targets. Can be set once and never changed, like `projectId`.","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"deployedUrl":{"description":"Where the deployed app can be reached. Can be set once and never changed, like `projectId`.","format":"uri","maxLength":2000,"type":"string"},"errorMessage":{"maxLength":5000,"minLength":1,"type":"string"},"externalLogUrl":{"format":"uri","maxLength":2000,"type":"string"},"failingStep":{"description":"Name of the step that failed, free text — step names come from build tooling the platform cannot validate.","maxLength":500,"minLength":1,"type":"string"},"phase":{"description":"How far the run has got.","enum":["queued","build","deploy"],"type":"string"},"projectId":{"description":"Project the build targets. Can be set once and never changed: a reporter that learns the project partway through a deploy may set it, but a value already recorded cannot be changed.","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"state":{"enum":["pending","running","succeeded","failed","cancelled"],"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"applicationTopologyContentHash":{"type":["null","string"]},"branchId":{"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"branchName":{"type":"string"},"commitSha":{"type":"string"},"createdAt":{"type":"string"},"deployedUrl":{"type":["null","string"]},"errorMessage":{"type":["null","string"]},"externalLogUrl":{"type":["null","string"]},"failingStep":{"type":["null","string"]},"finishedAt":{"type":["null","string"]},"gitRepoId":{"description":"Repository the build ran against. Set only when the workspace has a live link to it; a reported repository the platform does not know stays null.","type":["null","string"]},"id":{"pattern":"^(bld_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"phase":{"description":"Null when nothing reported a phase; the platform never invents an observation it did not receive.","enum":["queued","build","deploy",null],"type":["null","string"]},"projectId":{"pattern":"^(proj_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"source":{"enum":["webhook","setup","manual","ci","cli"],"type":"string"},"startedAt":{"type":["null","string"]},"state":{"enum":["pending","running","succeeded","failed","cancelled"],"type":"string"}},"required":["applicationTopologyContentHash","branchId","branchName","commitSha","createdAt","deployedUrl","errorMessage","externalLogUrl","failingStep","finishedAt","gitRepoId","id","phase","projectId","source","startedAt","state"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"The updated build."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Build not found, or the caller's workspace does not own it (indistinguishable)."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"A field that can only be set once already holds a different value."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Update a build","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.prisma.io/v1/builds/string\");\nrequest.Content = new StringContent(\"{\\\"applicationTopologyContentHash\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"deployedUrl\\\":\\\"https://example.com\\\",\\\"errorMessage\\\":\\\"string\\\",\\\"externalLogUrl\\\":\\\"https://example.com\\\",\\\"failingStep\\\":\\\"string\\\",\\\"phase\\\":\\\"build\\\",\\\"projectId\\\":\\\"string\\\",\\\"state\\\":\\\"cancelled\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.prisma.io/v1/builds/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"applicationTopologyContentHash\":\"string\",\"branchId\":\"string\",\"deployedUrl\":\"https://example.com\",\"errorMessage\":\"string\",\"externalLogUrl\":\"https://example.com\",\"failingStep\":\"string\",\"phase\":\"build\",\"projectId\":\"string\",\"state\":\"cancelled\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"applicationTopologyContentHash\":\"string\",\"branchId\":\"string\",\"deployedUrl\":\"https://example.com\",\"errorMessage\":\"string\",\"externalLogUrl\":\"https://example.com\",\"failingStep\":\"string\",\"phase\":\"build\",\"projectId\":\"string\",\"state\":\"cancelled\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.prisma.io/v1/builds/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/builds/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"applicationTopologyContentHash\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"deployedUrl\\\":\\\"https://example.com\\\",\\\"errorMessage\\\":\\\"string\\\",\\\"externalLogUrl\\\":\\\"https://example.com\\\",\\\"failingStep\\\":\\\"string\\\",\\\"phase\\\":\\\"build\\\",\\\"projectId\\\":\\\"string\\\",\\\"state\\\":\\\"cancelled\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/builds/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"applicationTopologyContentHash\":\"string\",\"branchId\":\"string\",\"deployedUrl\":\"https://example.com\",\"errorMessage\":\"string\",\"externalLogUrl\":\"https://example.com\",\"failingStep\":\"string\",\"phase\":\"build\",\"projectId\":\"string\",\"state\":\"cancelled\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/builds/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"applicationTopologyContentHash\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"deployedUrl\\\":\\\"https://example.com\\\",\\\"errorMessage\\\":\\\"string\\\",\\\"externalLogUrl\\\":\\\"https://example.com\\\",\\\"failingStep\\\":\\\"string\\\",\\\"phase\\\":\\\"build\\\",\\\"projectId\\\":\\\"string\\\",\\\"state\\\":\\\"cancelled\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/builds/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"applicationTopologyContentHash\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"deployedUrl\\\":\\\"https://example.com\\\",\\\"errorMessage\\\":\\\"string\\\",\\\"externalLogUrl\\\":\\\"https://example.com\\\",\\\"failingStep\\\":\\\"string\\\",\\\"phase\\\":\\\"build\\\",\\\"projectId\\\":\\\"string\\\",\\\"state\\\":\\\"cancelled\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.prisma.io/v1/builds/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"applicationTopologyContentHash\":\"string\",\"branchId\":\"string\",\"deployedUrl\":\"https://example.com\",\"errorMessage\":\"string\",\"externalLogUrl\":\"https://example.com\",\"failingStep\":\"string\",\"phase\":\"build\",\"projectId\":\"string\",\"state\":\"cancelled\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/builds/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"applicationTopologyContentHash\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"deployedUrl\\\":\\\"https://example.com\\\",\\\"errorMessage\\\":\\\"string\\\",\\\"externalLogUrl\\\":\\\"https://example.com\\\",\\\"failingStep\\\":\\\"string\\\",\\\"phase\\\":\\\"build\\\",\\\"projectId\\\":\\\"string\\\",\\\"state\\\":\\\"cancelled\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/builds/{buildId}/logs":{"get":{"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.","operationId":"getV1BuildsByBuildIdLogs","parameters":[{"in":"path","name":"buildId","required":true,"schema":{"minLength":1,"type":"string"}},{"in":"query","name":"follow","schema":{"enum":["true","false"],"type":"string"}},{"in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/x-ndjson":{"schema":{"oneOf":[{"properties":{"cursor":{"type":"string"},"level":{"enum":["info","error"],"type":"string"},"source":{"enum":["runner","stdout","stderr"],"type":"string"},"step":{"type":"string"},"text":{"type":"string"},"type":{"const":"log","type":"string"}},"required":["cursor","level","source","text","type"],"type":"object"},{"properties":{"code":{"type":"string"},"cursor":{"type":["null","string"]},"kind":{"enum":["end","error"],"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"type":{"const":"terminal","type":"string"}},"required":["code","cursor","kind","message","retryable","type"],"type":"object"}]}}},"description":"Build log stream (newline-delimited JSON; one `BuildLogNdjsonLine` per line)."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Build not found, or the caller's workspace does not own it (indistinguishable)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Stream build logs","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/builds/string/logs?cursor=string&follow=false\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/builds/string/logs?cursor=string&follow=false'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/builds/string/logs?cursor=string&follow=false\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/builds/string/logs?cursor=string&follow=false\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/builds/string/logs?cursor=string&follow=false', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/builds/string/logs?cursor=string&follow=false', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/builds/string/logs?cursor=string&follow=false\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/builds/string/logs?cursor=string&follow=false\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/builds/string/logs?cursor=string&follow=false\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/builds/{buildId}/resources/{resourceType}/{resourceId}":{"put":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRecords that the build created, acted on, or deleted a platform resource — the provenance a deploy run leaves behind. Idempotent: re-reporting the same resource updates the row rather than adding one, and never weakens the recorded action. The resource must belong to the caller's workspace, and must still be findable: a soft-deleted resource can be reported, but `project`, `database`, `service_key` and `config_variable` leave no row behind, so a build that deletes one must report it before deleting it. Reporting a deployment as `created` also attaches the deployment to the build and records the app it deployed into, both in the same transaction, because a deployment relates its build to that app whether or not the reporter says so.","operationId":"putV1BuildsByBuildIdResourcesByResourceTypeByResourceId","parameters":[{"in":"path","name":"buildId","required":true,"schema":{"pattern":"^(bld_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"resourceType","required":true,"schema":{"enum":["project","branch","database","app","deployment","bucket","service_key","config_variable"],"type":"string"}},{"in":"path","name":"resourceId","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"action":{"description":"The strongest effect the build had on the resource. Re-reporting is safe: a weaker action never overwrites a stronger one, so `created` survives a later `acted_on`.","enum":["created","acted_on","deleted"],"type":"string"}},"required":["action"],"type":"object"}}}},"responses":{"204":{"description":"Recorded."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Build or resource not found, or the caller's workspace does not own it (indistinguishable)."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Report a resource a build acted on","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Put, \"https://api.prisma.io/v1/builds/string/resources/app/string\");\nrequest.Content = new StringContent(\"{\\\"action\\\":\\\"acted_on\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PUT 'https://api.prisma.io/v1/builds/string/resources/app/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"acted_on\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"action\":\"acted_on\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PUT\", \"https://api.prisma.io/v1/builds/string/resources/app/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/builds/string/resources/app/string\"))\n    .method(\"PUT\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"action\\\":\\\"acted_on\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/builds/string/resources/app/string', {\n  method: 'PUT',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"action\":\"acted_on\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/builds/string/resources/app/string', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"action\\\":\\\"acted_on\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/builds/string/resources/app/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"action\\\":\\\"acted_on\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://api.prisma.io/v1/builds/string/resources/app/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"action\":\"acted_on\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/builds/string/resources/app/string\")\nrequest = Net::HTTPGenericRequest.new(\"PUT\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"action\\\":\\\"acted_on\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/connections":{"get":{"description":"Returns all connections the actor has access to, with optional database filter.","operationId":"getV1Connections","parameters":[{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}},{"in":"query","name":"databaseId","schema":{"pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","database","endpoints","id","kind","name","type","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returned list of connections."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."}},"summary":"List connections","tags":["Connections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/connections?cursor=string&databaseId=string&limit=100\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/connections?cursor=string&databaseId=string&limit=100'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/connections?cursor=string&databaseId=string&limit=100\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/connections?cursor=string&databaseId=string&limit=100\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/connections?cursor=string&databaseId=string&limit=100', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/connections?cursor=string&databaseId=string&limit=100', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/connections?cursor=string&databaseId=string&limit=100\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/connections?cursor=string&databaseId=string&limit=100\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/connections?cursor=string&databaseId=string&limit=100\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"description":"Creates a new connection for the specified database.","operationId":"postV1Connections","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"databaseId":{"pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"maxLength":65,"minLength":3,"type":"string"}},"required":["databaseId","name"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"connectionString":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["connectionString","host","port"],"type":"object"},"direct":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["connectionString","host","port"],"type":"object"},"pooled":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["connectionString","host","port"],"type":"object"}},"type":"object"},"host":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","type":["null","string"]},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"pass":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":["null","string"]},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"},"user":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":["null","string"]}},"required":["connectionString","createdAt","database","endpoints","host","id","kind","name","pass","type","url","user"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created a new connection."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Database with the given ID was not found."}},"summary":"Create connection","tags":["Connections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/connections\");\nrequest.Content = new StringContent(\"{\\\"databaseId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/connections' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"databaseId\":\"string\",\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"databaseId\":\"string\",\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/connections\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/connections\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"databaseId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/connections', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"databaseId\":\"string\",\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/connections', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"databaseId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/connections\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"databaseId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/connections\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"databaseId\":\"string\",\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/connections\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"databaseId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/connections/{id}":{"delete":{"description":"Deletes the connection with the given ID.","operationId":"deleteV1ConnectionsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(con_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Deleted the connection."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Connection with the given ID was not found."}},"summary":"Delete connection","tags":["Connections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/connections/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/connections/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/connections/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/connections/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/connections/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/connections/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/connections/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/connections/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/connections/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Returns the connection with the given ID.","operationId":"getV1ConnectionsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(con_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","database","endpoints","id","kind","name","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Returned the connection."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Connection with the given ID was not found."}},"summary":"Get connection","tags":["Connections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/connections/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/connections/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/connections/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/connections/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/connections/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/connections/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/connections/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/connections/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/connections/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/connections/{id}/rotate":{"post":{"description":"Generates new credentials for the connection with the given ID. Revocation of the previous credentials is best-effort.","operationId":"postV1ConnectionsByIdRotate","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(con_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"connectionString":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["connectionString","host","port"],"type":"object"},"direct":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["connectionString","host","port"],"type":"object"},"pooled":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["connectionString","host","port"],"type":"object"}},"type":"object"},"host":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","type":["null","string"]},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"pass":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":["null","string"]},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"},"user":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":["null","string"]}},"required":["connectionString","createdAt","database","endpoints","host","id","kind","name","pass","type","url","user"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Rotated connection credentials."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Connection with the given ID was not found."}},"summary":"Rotate connection credentials","tags":["Connections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/connections/string/rotate\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/connections/string/rotate'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/connections/string/rotate\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/connections/string/rotate\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/connections/string/rotate', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/connections/string/rotate', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/connections/string/rotate\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.prisma.io/v1/connections/string/rotate\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/connections/string/rotate\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/databases":{"get":{"description":"Returns all databases the token has access to. Optionally filter by project ID.","operationId":"getV1Databases","parameters":[{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}},{"in":"query","name":"projectId","schema":{"description":"Filter databases by project ID","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"logicalId","schema":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"}},{"in":"query","name":"branchId","schema":{"anyOf":[{"const":"unassigned","type":"string"},{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}]}},{"in":"query","name":"branchGitName","schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"branchId":{"type":["null","string"]},"connections":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","database","endpoints","id","kind","name","type","url"],"type":"object"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"defaultConnectionId":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"id":{"type":"string"},"isDefault":{"type":"boolean"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"project":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":["null","object"]},"source":{"oneOf":[{"properties":{"type":{"const":"empty","type":"string"}},"required":["type"],"type":"object"},{"properties":{"backupId":{"description":"ID of the backup to restore from","type":"string"},"databaseId":{"type":"string"},"type":{"const":"backup","type":"string"}},"required":["backupId","databaseId","type"],"type":"object"},{"properties":{"databaseId":{"type":"string"},"type":{"const":"database","type":"string"}},"required":["databaseId","type"],"type":"object"},{"type":"null"}]},"status":{"enum":["failure","provisioning","ready","recovering"],"type":"string"},"type":{"const":"database","type":"string"},"url":{"format":"uri","type":"string"}},"required":["branchId","connections","createdAt","defaultConnectionId","id","isDefault","logicalId","name","project","region","source","status","type","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returns the list of databases."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Actor does not have access to the requested databases."}},"summary":"List databases","tags":["Databases"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/databases?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/databases?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/databases?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/databases?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/databases?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/databases?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/databases?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/databases?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/databases?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"description":"Creates a new database in the specified project. `logicalId` cannot be combined with `branchGitName`; pass `branchId` instead.","operationId":"postV1Databases","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"branchGitName":{"description":"Git name of the Branch to attach the database to; the Branch is created when it does not exist. Mutually exclusive with branchId. Omit to attach to the project's default Branch. Every database belongs to a Branch, so null is rejected.","minLength":1,"type":["null","string"]},"branchId":{"description":"ID of the Branch to attach the database to. Omit to attach the database to the project's default Branch. Every database belongs to a Branch, so null is rejected.","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"isDefault":{"default":false,"description":"Whether this is the default database","type":"boolean"},"logicalId":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"name":{"description":"Display name for the database","minLength":1,"type":"string"},"projectId":{"description":"ID of the project to create the database in","pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"region":{"default":"us-east-1","description":"Use \"inherit\" to use the project's default region (falls back to the default database's region for projects without one).","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1","inherit"],"type":"string"},"source":{"description":"Source to create the database from. Omit to create an empty database.","oneOf":[{"properties":{"type":{"const":"empty","type":"string"}},"required":["type"],"type":"object"},{"properties":{"backupId":{"description":"ID of the backup to restore from","type":"string"},"databaseId":{"description":"ID of the database the backup belongs to","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"type":{"const":"backup","type":"string"}},"required":["backupId","databaseId","type"],"type":"object"},{"properties":{"databaseId":{"description":"ID of the database to clone from","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"type":{"const":"database","type":"string"}},"required":["databaseId","type"],"type":"object"}]}},"required":["projectId"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"branchId":{"type":["null","string"]},"connections":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","database","endpoints","id","kind","name","type","url"],"type":"object"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"defaultConnectionId":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"id":{"type":"string"},"isDefault":{"type":"boolean"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"project":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":["null","object"]},"source":{"oneOf":[{"properties":{"type":{"const":"empty","type":"string"}},"required":["type"],"type":"object"},{"properties":{"backupId":{"description":"ID of the backup to restore from","type":"string"},"databaseId":{"type":"string"},"type":{"const":"backup","type":"string"}},"required":["backupId","databaseId","type"],"type":"object"},{"properties":{"databaseId":{"type":"string"},"type":{"const":"database","type":"string"}},"required":["databaseId","type"],"type":"object"},{"type":"null"}]},"status":{"enum":["failure","provisioning","ready","recovering"],"type":"string"},"type":{"const":"database","type":"string"},"url":{"format":"uri","type":"string"}},"required":["branchId","connections","createdAt","defaultConnectionId","id","isDefault","logicalId","name","project","region","source","status","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created a new database."},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid request parameters."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Actor does not have access to the specified project."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"A database with the same `logicalId` already exists on the branch."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Create database","tags":["Databases"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/databases\");\nrequest.Content = new StringContent(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"isDefault\\\":false,\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"source\\\":{\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"database\\\"}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/databases' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"branchGitName\":\"string\",\"branchId\":\"string\",\"isDefault\":false,\"logicalId\":\"string\",\"name\":\"string\",\"projectId\":\"string\",\"region\":\"us-east-1\",\"source\":{\"databaseId\":\"string\",\"type\":\"database\"}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"branchGitName\":\"string\",\"branchId\":\"string\",\"isDefault\":false,\"logicalId\":\"string\",\"name\":\"string\",\"projectId\":\"string\",\"region\":\"us-east-1\",\"source\":{\"databaseId\":\"string\",\"type\":\"database\"}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/databases\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/databases\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"isDefault\\\":false,\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"source\\\":{\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"database\\\"}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/databases', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"branchGitName\":\"string\",\"branchId\":\"string\",\"isDefault\":false,\"logicalId\":\"string\",\"name\":\"string\",\"projectId\":\"string\",\"region\":\"us-east-1\",\"source\":{\"databaseId\":\"string\",\"type\":\"database\"}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/databases', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"isDefault\\\":false,\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"source\\\":{\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"database\\\"}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/databases\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"isDefault\\\":false,\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"source\\\":{\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"database\\\"}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/databases\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"branchGitName\":\"string\",\"branchId\":\"string\",\"isDefault\":false,\"logicalId\":\"string\",\"name\":\"string\",\"projectId\":\"string\",\"region\":\"us-east-1\",\"source\":{\"databaseId\":\"string\",\"type\":\"database\"}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/databases\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"isDefault\\\":false,\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"source\\\":{\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"database\\\"}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/databases/{databaseId}":{"delete":{"description":"Deletes the database with the given ID.","operationId":"deleteV1DatabasesByDatabaseId","parameters":[{"in":"path","name":"databaseId","required":true,"schema":{"pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Deleted the database successfully."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Cannot delete the default environment."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Database with the given ID was not found."}},"summary":"Delete database","tags":["Databases"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/databases/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/databases/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/databases/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/databases/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/databases/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/databases/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/databases/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/databases/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/databases/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Returns the database with the given ID.","operationId":"getV1DatabasesByDatabaseId","parameters":[{"in":"path","name":"databaseId","required":true,"schema":{"pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"branchId":{"type":["null","string"]},"connections":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","database","endpoints","id","kind","name","type","url"],"type":"object"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"defaultConnectionId":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"id":{"type":"string"},"isDefault":{"type":"boolean"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"project":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":["null","object"]},"source":{"oneOf":[{"properties":{"type":{"const":"empty","type":"string"}},"required":["type"],"type":"object"},{"properties":{"backupId":{"description":"ID of the backup to restore from","type":"string"},"databaseId":{"type":"string"},"type":{"const":"backup","type":"string"}},"required":["backupId","databaseId","type"],"type":"object"},{"properties":{"databaseId":{"type":"string"},"type":{"const":"database","type":"string"}},"required":["databaseId","type"],"type":"object"},{"type":"null"}]},"status":{"enum":["failure","provisioning","ready","recovering"],"type":"string"},"type":{"const":"database","type":"string"},"url":{"format":"uri","type":"string"}},"required":["branchId","connections","createdAt","defaultConnectionId","id","isDefault","logicalId","name","project","region","source","status","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Returned the database with the given ID."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Actor does not have access to the database."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Database with the given ID was not found."}},"summary":"Get database","tags":["Databases"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/databases/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/databases/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/databases/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/databases/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/databases/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/databases/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/databases/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/databases/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/databases/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"description":"Updates the database with the given ID. `logicalId` cannot be combined with `branchId` or `branchGitName` in one request; move the database first, then set its `logicalId`.","operationId":"patchV1DatabasesByDatabaseId","parameters":[{"in":"path","name":"databaseId","required":true,"schema":{"pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"branchGitName":{"description":"Git name of the Branch to move the database to; the Branch is created when it does not exist. Mutually exclusive with branchId. Every database belongs to a Branch, so null (detach) is rejected.","minLength":1,"type":["null","string"]},"branchId":{"description":"ID of the Branch to move the database to. Every database belongs to a Branch, so null (detach) is rejected.","pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"logicalId":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"name":{"description":"New display name for the database","minLength":1,"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"branchId":{"type":["null","string"]},"connections":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","database","endpoints","id","kind","name","type","url"],"type":"object"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"defaultConnectionId":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"id":{"type":"string"},"isDefault":{"type":"boolean"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"project":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":["null","object"]},"source":{"oneOf":[{"properties":{"type":{"const":"empty","type":"string"}},"required":["type"],"type":"object"},{"properties":{"backupId":{"description":"ID of the backup to restore from","type":"string"},"databaseId":{"type":"string"},"type":{"const":"backup","type":"string"}},"required":["backupId","databaseId","type"],"type":"object"},{"properties":{"databaseId":{"type":"string"},"type":{"const":"database","type":"string"}},"required":["databaseId","type"],"type":"object"},{"type":"null"}]},"status":{"enum":["failure","provisioning","ready","recovering"],"type":"string"},"type":{"const":"database","type":"string"},"url":{"format":"uri","type":"string"}},"required":["branchId","connections","createdAt","defaultConnectionId","id","isDefault","logicalId","name","project","region","source","status","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Updated the database."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Actor does not have access to the database."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Database with the given ID was not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"A database with the same `logicalId` already exists on the branch."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Update database","tags":["Databases"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.prisma.io/v1/databases/string\");\nrequest.Content = new StringContent(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.prisma.io/v1/databases/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"branchGitName\":\"string\",\"branchId\":\"string\",\"logicalId\":\"string\",\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"branchGitName\":\"string\",\"branchId\":\"string\",\"logicalId\":\"string\",\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.prisma.io/v1/databases/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/databases/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/databases/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"branchGitName\":\"string\",\"branchId\":\"string\",\"logicalId\":\"string\",\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/databases/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/databases/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.prisma.io/v1/databases/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"branchGitName\":\"string\",\"branchId\":\"string\",\"logicalId\":\"string\",\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/databases/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/databases/{databaseId}/backups":{"get":{"description":"Returns backups for the specified database.","operationId":"getV1DatabasesByDatabaseIdBackups","parameters":[{"in":"path","name":"databaseId","required":true,"schema":{"pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"limit","schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"backupType":{"enum":["full","incremental","differential"],"type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"},"size":{"type":"number"},"status":{"enum":["running","completed","failed","unknown"],"type":"string"},"type":{"const":"backup","type":"string"}},"required":["backupType","createdAt","id","status"],"type":"object"},"type":"array"},"meta":{"properties":{"backupRetentionDays":{"type":"number"}},"required":["backupRetentionDays"],"type":"object"},"pagination":{"properties":{"hasMore":{"type":"boolean"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}]}},"required":["hasMore","limit"],"type":"object"}},"required":["data","meta","pagination"],"type":"object"}}},"description":"Returned backups for the given database."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Database with the given ID was not found."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Remote database backups are not supported"}},"summary":"Get list of backups","tags":["Database Backups"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/databases/string/backups?limit=25\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/databases/string/backups?limit=25'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/databases/string/backups?limit=25\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/databases/string/backups?limit=25\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/databases/string/backups?limit=25', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/databases/string/backups?limit=25', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/databases/string/backups?limit=25\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/databases/string/backups?limit=25\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/databases/string/backups?limit=25\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/databases/{databaseId}/connections":{"get":{"description":"Returns all connections for the given database.","operationId":"getV1DatabasesByDatabaseIdConnections","parameters":[{"in":"path","name":"databaseId","required":true,"schema":{"pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","database","endpoints","id","kind","name","type","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returned all connections for the given database."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."}},"summary":"Get list of database connections","tags":["Databases Connections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/databases/string/connections?cursor=string&limit=100\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/databases/string/connections?cursor=string&limit=100'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/databases/string/connections?cursor=string&limit=100\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/databases/string/connections?cursor=string&limit=100\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/databases/string/connections?cursor=string&limit=100', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/databases/string/connections?cursor=string&limit=100', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/databases/string/connections?cursor=string&limit=100\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/databases/string/connections?cursor=string&limit=100\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/databases/string/connections?cursor=string&limit=100\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"description":"Creates a new connection string for the given database.","operationId":"postV1DatabasesByDatabaseIdConnections","parameters":[{"in":"path","name":"databaseId","required":true,"schema":{"pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"maxLength":65,"minLength":3,"type":"string"}},"required":["name"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"connectionString":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["connectionString","host","port"],"type":"object"},"direct":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["connectionString","host","port"],"type":"object"},"pooled":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["connectionString","host","port"],"type":"object"}},"type":"object"},"host":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","type":["null","string"]},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"pass":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":["null","string"]},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"},"user":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":["null","string"]}},"required":["connectionString","createdAt","database","endpoints","host","id","kind","name","pass","type","url","user"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created a new connection string for the database."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Database with the given ID was not found."}},"summary":"Create database connection string","tags":["Databases Connections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/databases/string/connections\");\nrequest.Content = new StringContent(\"{\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/databases/string/connections' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/databases/string/connections\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/databases/string/connections\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/databases/string/connections', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/databases/string/connections', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/databases/string/connections\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/databases/string/connections\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/databases/string/connections\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/databases/{databaseId}/usage":{"get":{"description":"Returns usage metrics for the specified database.","operationId":"getV1DatabasesByDatabaseIdUsage","parameters":[{"in":"path","name":"databaseId","required":true,"schema":{"pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"startDate","schema":{"description":"Start date for metrics query. Defaults to start of current month if not provided.","format":"date-time","type":"string"}},{"in":"query","name":"endDate","schema":{"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.","format":"date-time","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"generatedAt":{"format":"date-time","type":"string"},"metrics":{"properties":{"operations":{"properties":{"unit":{"const":"ops","type":"string"},"used":{"type":"number"}},"required":["unit","used"],"type":"object"},"storage":{"properties":{"unit":{"const":"GiB","type":"string"},"used":{"type":"number"}},"required":["unit","used"],"type":"object"}},"required":["operations","storage"],"type":"object"},"period":{"properties":{"end":{"format":"date-time","type":"string"},"start":{"format":"date-time","type":"string"}},"required":["end","start"],"type":"object"}},"required":["generatedAt","metrics","period"],"type":"object"}}},"description":"Returned usage metrics for the given database."},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Database with the given ID was not found."},"500":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Error occurred while fetching metrics"},"503":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Usage metrics are temporarily unavailable","headers":{"Retry-After":{"description":"Seconds to wait before retrying the request","schema":{"minimum":1,"type":"integer"}}}}},"summary":"Get database usage metrics","tags":["Database Usage"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/databases/string/usage?endDate=2026-06-09T00%3A00%3A00Z&startDate=2026-06-09T00%3A00%3A00Z\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/databases/string/usage?endDate=2026-06-09T00%3A00%3A00Z&startDate=2026-06-09T00%3A00%3A00Z'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/databases/string/usage?endDate=2026-06-09T00%3A00%3A00Z&startDate=2026-06-09T00%3A00%3A00Z\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/databases/string/usage?endDate=2026-06-09T00%3A00%3A00Z&startDate=2026-06-09T00%3A00%3A00Z\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/databases/string/usage?endDate=2026-06-09T00%3A00%3A00Z&startDate=2026-06-09T00%3A00%3A00Z', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/databases/string/usage?endDate=2026-06-09T00%3A00%3A00Z&startDate=2026-06-09T00%3A00%3A00Z', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/databases/string/usage?endDate=2026-06-09T00%3A00%3A00Z&startDate=2026-06-09T00%3A00%3A00Z\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/databases/string/usage?endDate=2026-06-09T00%3A00%3A00Z&startDate=2026-06-09T00%3A00%3A00Z\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/databases/string/usage?endDate=2026-06-09T00%3A00%3A00Z&startDate=2026-06-09T00%3A00%3A00Z\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/databases/{targetDatabaseId}/restore":{"post":{"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.","operationId":"postV1DatabasesByTargetDatabaseIdRestore","parameters":[{"in":"path","name":"targetDatabaseId","required":true,"schema":{"pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"source":{"properties":{"backupId":{"description":"ID of the backup to restore from","type":"string"},"databaseId":{"description":"ID of the database the backup belongs to","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"type":{"const":"backup","type":"string"}},"required":["backupId","databaseId","type"],"type":"object"}},"required":["source"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"branchId":{"type":["null","string"]},"connections":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","database","endpoints","id","kind","name","type","url"],"type":"object"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"defaultConnectionId":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"id":{"type":"string"},"isDefault":{"type":"boolean"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"project":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":["null","object"]},"source":{"properties":{"backupId":{"type":"string"},"databaseId":{"type":"string"},"type":{"const":"backup","type":"string"}},"required":["backupId","databaseId","type"],"type":"object"},"status":{"enum":["failure","provisioning","ready","recovering"],"type":"string"},"type":{"const":"database","type":"string"},"url":{"format":"uri","type":"string"}},"required":["branchId","connections","createdAt","defaultConnectionId","id","isDefault","logicalId","name","project","region","source","status","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Database restore initiated. The database status will be \"recovering\" until the restore completes."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Target database, source database, or backup not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Target database is currently provisioning or recovering and cannot be restored."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid source type or backup not usable."}},"summary":"Restore database (destructive)","tags":["Databases"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/databases/string/restore\");\nrequest.Content = new StringContent(\"{\\\"source\\\":{\\\"backupId\\\":\\\"string\\\",\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"backup\\\"}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/databases/string/restore' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"source\":{\"backupId\":\"string\",\"databaseId\":\"string\",\"type\":\"backup\"}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"source\":{\"backupId\":\"string\",\"databaseId\":\"string\",\"type\":\"backup\"}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/databases/string/restore\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/databases/string/restore\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"source\\\":{\\\"backupId\\\":\\\"string\\\",\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"backup\\\"}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/databases/string/restore', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"source\":{\"backupId\":\"string\",\"databaseId\":\"string\",\"type\":\"backup\"}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/databases/string/restore', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"source\\\":{\\\"backupId\\\":\\\"string\\\",\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"backup\\\"}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/databases/string/restore\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"source\\\":{\\\"backupId\\\":\\\"string\\\",\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"backup\\\"}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/databases/string/restore\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"source\":{\"backupId\":\"string\",\"databaseId\":\"string\",\"type\":\"backup\"}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/databases/string/restore\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"source\\\":{\\\"backupId\\\":\\\"string\\\",\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"backup\\\"}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/deployments/{deploymentId}":{"delete":{"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.","operationId":"deleteV1DeploymentsByDeploymentId","parameters":[{"in":"path","name":"deploymentId","required":true,"schema":{"pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Deployment deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Deployment not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The deployment must be stopped before it can be deleted."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Delete deployment","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/deployments/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/deployments/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/deployments/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/deployments/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/deployments/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/deployments/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/deployments/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/deployments/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/deployments/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"get":{"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.","operationId":"getV1DeploymentsByDeploymentId","parameters":[{"in":"path","name":"deploymentId","required":true,"schema":{"pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"envVars":{"additionalProperties":{"description":"Always \"[redacted]\". Compute version inspection endpoints expose env var names only; values are never returned.","example":"[redacted]","type":"string"},"description":"Environment variable names present on this compute version. Values are always redacted as \"[redacted]\" and must not be treated as deployed secret values.","type":"object"},"foundryVersionId":{"type":"string"},"id":{"type":"string"},"portMapping":{"properties":{"http":{"type":"number"}},"type":"object"},"previewDomain":{"type":["null","string"]},"serviceId":{"type":"string"},"status":{"type":"string"},"type":{"const":"deployment","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","foundryVersionId","id","previewDomain","serviceId","status","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Deployment retrieved."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Deployment not found."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Get deployment","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/deployments/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/deployments/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/deployments/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/deployments/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/deployments/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/deployments/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/deployments/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/deployments/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/deployments/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/deployments/{deploymentId}/logs":{"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns log output for the specified deployment. Each record is a JSON object with `type: \"log\"` (log text + byte metadata) or `type: \"terminal\"` (end-of-page signal with a resume cursor). A plain GET responds with newline-delimited JSON (`application/x-ndjson`): it drains the requested window (`tail`, `from_start`, or `cursor`), ends with a terminal record carrying the cursor for the next page, and closes. Send an `Upgrade: websocket` header to follow the log live instead; a live segment ends after 10 minutes with the same terminal/cursor mechanism.","operationId":"getV1DeploymentsByDeploymentIdLogs","parameters":[{"in":"path","name":"deploymentId","required":true,"schema":{"pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"tail","schema":{"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"from_start","schema":{"enum":["true","false"],"type":"string"}},{"in":"query","name":"cursor","schema":{"pattern":"^\\d+$","type":"string"}}],"responses":{"101":{"description":"WebSocket connection established (requests with an `Upgrade: websocket` header). Each message is a JSON object discriminated by `type`."},"200":{"content":{"application/x-ndjson":{"schema":{"oneOf":[{"properties":{"byteEnd":{"type":"integer"},"byteStart":{"type":"integer"},"text":{"type":"string"},"type":{"const":"log","type":"string"}},"required":["byteEnd","byteStart","text","type"],"type":"object"},{"properties":{"code":{"type":"string"},"cursor":{"type":["null","string"]},"details":{"additionalProperties":{},"type":"object"},"kind":{"enum":["end","error"],"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"type":{"const":"terminal","type":"string"}},"required":["code","cursor","kind","message","retryable","type"],"type":"object"}]}}},"description":"One page of deployment logs (newline-delimited JSON; one record per line, ending with a terminal record)."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Deployment not found."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Get deployment logs","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/deployments/string/logs?cursor=string&from_start=false&tail=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/deployments/string/logs?cursor=string&from_start=false&tail=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/deployments/string/logs?cursor=string&from_start=false&tail=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/deployments/string/logs?cursor=string&from_start=false&tail=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/deployments/string/logs?cursor=string&from_start=false&tail=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/deployments/string/logs?cursor=string&from_start=false&tail=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/deployments/string/logs?cursor=string&from_start=false&tail=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/deployments/string/logs?cursor=string&from_start=false&tail=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/deployments/string/logs?cursor=string&from_start=false&tail=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/deployments/{deploymentId}/start":{"post":{"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.","operationId":"postV1DeploymentsByDeploymentIdStart","parameters":[{"in":"path","name":"deploymentId","required":true,"schema":{"pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"previewDomain":{"type":"string"}},"required":["previewDomain"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Start request accepted. The preview domain is returned immediately."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Deployment not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The deployment is in a state that does not allow starting (e.g. artifact not uploaded, or already running)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit or Compute resource limit exceeded."}},"summary":"Start deployment","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/deployments/string/start\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/deployments/string/start'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/deployments/string/start\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/deployments/string/start\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/deployments/string/start', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/deployments/string/start', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/deployments/string/start\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.prisma.io/v1/deployments/string/start\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/deployments/string/start\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/deployments/{deploymentId}/stop":{"post":{"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.","operationId":"postV1DeploymentsByDeploymentIdStop","parameters":[{"in":"path","name":"deploymentId","required":true,"schema":{"pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Stop request accepted."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Deployment not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The deployment must be running or provisioning to be stopped."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Stop deployment","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/deployments/string/stop\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/deployments/string/stop'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/deployments/string/stop\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/deployments/string/stop\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/deployments/string/stop', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/deployments/string/stop', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/deployments/string/stop\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.prisma.io/v1/deployments/string/stop\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/deployments/string/stop\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/domains/{domainId}":{"delete":{"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.","operationId":"deleteV1DomainsByDomainId","parameters":[{"in":"path","name":"domainId","required":true,"schema":{"pattern":"^(dom_)?[A-Za-z0-9]+$","type":"string"}}],"responses":{"204":{"description":"Custom domain deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Custom domain not found."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Delete a custom domain","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/domains/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/domains/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/domains/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/domains/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/domains/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/domains/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/domains/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/domains/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/domains/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"get":{"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.","operationId":"getV1DomainsByDomainId","parameters":[{"in":"path","name":"domainId","required":true,"schema":{"pattern":"^(dom_)?[A-Za-z0-9]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appId":{"type":"string"},"certExpiresAt":{"format":"date-time","type":["null","string"]},"computeServiceId":{"deprecated":true,"description":"Deprecated: use `appId` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"dnsRecords":{"items":{"properties":{"name":{"type":"string"},"ttl":{"type":["null","number"]},"type":{"const":"CNAME","type":"string"},"value":{"type":"string"}},"required":["name","ttl","type","value"],"type":"object"},"type":"array"},"failureCategory":{"enum":["dns","acme","storage","unknown",null],"type":["null","string"]},"failureReason":{"type":["null","string"]},"foundryStatus":{"type":"string"},"hostname":{"type":"string"},"id":{"type":"string"},"status":{"enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"],"type":"string"},"type":{"const":"custom-domain","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appId","certExpiresAt","computeServiceId","createdAt","dnsRecords","failureCategory","failureReason","foundryStatus","hostname","id","status","type","updatedAt","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Custom domain details."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Custom domain not found."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Get a custom domain","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/domains/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/domains/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/domains/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/domains/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/domains/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/domains/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/domains/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/domains/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/domains/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/domains/{domainId}/retry":{"post":{"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).","operationId":"postV1DomainsByDomainIdRetry","parameters":[{"in":"path","name":"domainId","required":true,"schema":{"pattern":"^(dom_)?[A-Za-z0-9]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appId":{"type":"string"},"certExpiresAt":{"format":"date-time","type":["null","string"]},"computeServiceId":{"deprecated":true,"description":"Deprecated: use `appId` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"dnsRecords":{"items":{"properties":{"name":{"type":"string"},"ttl":{"type":["null","number"]},"type":{"const":"CNAME","type":"string"},"value":{"type":"string"}},"required":["name","ttl","type","value"],"type":"object"},"type":"array"},"failureCategory":{"enum":["dns","acme","storage","unknown",null],"type":["null","string"]},"failureReason":{"type":["null","string"]},"foundryStatus":{"type":"string"},"hostname":{"type":"string"},"id":{"type":"string"},"status":{"enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"],"type":"string"},"type":{"const":"custom-domain","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appId","certExpiresAt","computeServiceId","createdAt","dnsRecords","failureCategory","failureReason","foundryStatus","hostname","id","status","type","updatedAt","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Retry initiated, domain state returned."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Custom domain not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Domain is not yet eligible for retry (e.g. still provisioning)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Retry custom domain provisioning","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/domains/string/retry\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/domains/string/retry'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/domains/string/retry\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/domains/string/retry\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/domains/string/retry', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/domains/string/retry', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/domains/string/retry\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.prisma.io/v1/domains/string/retry\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/domains/string/retry\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/environment-variables":{"get":{"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.","operationId":"getV1Environment-variables","parameters":[{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}},{"in":"query","name":"projectId","schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"class","schema":{"enum":["production","preview"],"type":"string"}},{"in":"query","name":"key","schema":{"maxLength":256,"minLength":1,"pattern":"^[A-Z_][A-Z0-9_]*$","type":"string"}},{"in":"query","name":"branchId","schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"branchId":{"type":["null","string"]},"class":{"enum":["production","preview"],"type":"string"},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"isManagedBySystem":{"type":"boolean"},"key":{"type":"string"},"projectId":{"type":"string"},"type":{"const":"environment-variable","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"},"valueKid":{"type":"string"}},"required":["branchId","class","createdAt","id","isManagedBySystem","key","projectId","type","updatedAt","url","valueKid"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returned the page of environment variables."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid request."}},"summary":"List environment variables","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/environment-variables?branchId=string&class=preview&cursor=string&key=string&limit=100&projectId=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/environment-variables?branchId=string&class=preview&cursor=string&key=string&limit=100&projectId=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/environment-variables?branchId=string&class=preview&cursor=string&key=string&limit=100&projectId=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/environment-variables?branchId=string&class=preview&cursor=string&key=string&limit=100&projectId=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/environment-variables?branchId=string&class=preview&cursor=string&key=string&limit=100&projectId=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/environment-variables?branchId=string&class=preview&cursor=string&key=string&limit=100&projectId=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/environment-variables?branchId=string&class=preview&cursor=string&key=string&limit=100&projectId=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/environment-variables?branchId=string&class=preview&cursor=string&key=string&limit=100&projectId=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/environment-variables?branchId=string&class=preview&cursor=string&key=string&limit=100&projectId=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"post":{"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.","operationId":"postV1Environment-variables","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"branchId":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"class":{"enum":["production","preview"],"type":"string"},"key":{"maxLength":256,"minLength":1,"pattern":"^[A-Z_][A-Z0-9_]*$","type":"string"},"projectId":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"value":{"minLength":1,"type":"string"}},"required":["class","key","projectId","value"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"branchId":{"type":["null","string"]},"class":{"enum":["production","preview"],"type":"string"},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"isManagedBySystem":{"type":"boolean"},"key":{"type":"string"},"projectId":{"type":"string"},"type":{"const":"environment-variable","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"},"valueKid":{"type":"string"}},"required":["branchId","class","createdAt","id","isManagedBySystem","key","projectId","type","updatedAt","url","valueKid"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Variable created."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project not found, or token does not have access to it."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"A variable with this key already exists in this environment."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid request."},"500":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"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."}},"summary":"Create an environment variable","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/environment-variables\");\nrequest.Content = new StringContent(\"{\\\"branchId\\\":\\\"string\\\",\\\"class\\\":\\\"preview\\\",\\\"key\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/environment-variables' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"branchId\":\"string\",\"class\":\"preview\",\"key\":\"string\",\"projectId\":\"string\",\"value\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"branchId\":\"string\",\"class\":\"preview\",\"key\":\"string\",\"projectId\":\"string\",\"value\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/environment-variables\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/environment-variables\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"branchId\\\":\\\"string\\\",\\\"class\\\":\\\"preview\\\",\\\"key\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/environment-variables', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"branchId\":\"string\",\"class\":\"preview\",\"key\":\"string\",\"projectId\":\"string\",\"value\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/environment-variables', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"branchId\\\":\\\"string\\\",\\\"class\\\":\\\"preview\\\",\\\"key\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/environment-variables\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"branchId\\\":\\\"string\\\",\\\"class\\\":\\\"preview\\\",\\\"key\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/environment-variables\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"branchId\":\"string\",\"class\":\"preview\",\"key\":\"string\",\"projectId\":\"string\",\"value\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/environment-variables\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"branchId\\\":\\\"string\\\",\\\"class\\\":\\\"preview\\\",\\\"key\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/environment-variables/{envVarId}":{"delete":{"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.","operationId":"deleteV1Environment-variablesByEnvVarId","parameters":[{"in":"path","name":"envVarId","required":true,"schema":{"pattern":"^(envvar_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Variable deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Variable not found, or token does not have access to it."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid request."}},"summary":"Delete an environment variable","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/environment-variables/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/environment-variables/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/environment-variables/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/environment-variables/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/environment-variables/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/environment-variables/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/environment-variables/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/environment-variables/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/environment-variables/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"get":{"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.","operationId":"getV1Environment-variablesByEnvVarId","parameters":[{"in":"path","name":"envVarId","required":true,"schema":{"pattern":"^(envvar_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"branchId":{"type":["null","string"]},"class":{"enum":["production","preview"],"type":"string"},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"isManagedBySystem":{"type":"boolean"},"key":{"type":"string"},"projectId":{"type":"string"},"type":{"const":"environment-variable","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"},"valueKid":{"type":"string"}},"required":["branchId","class","createdAt","id","isManagedBySystem","key","projectId","type","updatedAt","url","valueKid"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Returned the environment variable."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Variable not found, or token does not have access to it."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid request."}},"summary":"Get an environment variable","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/environment-variables/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/environment-variables/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/environment-variables/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/environment-variables/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/environment-variables/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/environment-variables/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/environment-variables/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/environment-variables/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/environment-variables/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"patch":{"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.","operationId":"patchV1Environment-variablesByEnvVarId","parameters":[{"in":"path","name":"envVarId","required":true,"schema":{"pattern":"^(envvar_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"value":{"minLength":1,"type":"string"}},"required":["value"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"branchId":{"type":["null","string"]},"class":{"enum":["production","preview"],"type":"string"},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"isManagedBySystem":{"type":"boolean"},"key":{"type":"string"},"projectId":{"type":"string"},"type":{"const":"environment-variable","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"},"valueKid":{"type":"string"}},"required":["branchId","class","createdAt","id","isManagedBySystem","key","projectId","type","updatedAt","url","valueKid"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Variable updated."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Variable not found, or token does not have access to it."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid request."},"500":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"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."}},"summary":"Update an environment variable's value","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.prisma.io/v1/environment-variables/string\");\nrequest.Content = new StringContent(\"{\\\"value\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.prisma.io/v1/environment-variables/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"value\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"value\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.prisma.io/v1/environment-variables/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/environment-variables/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"value\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/environment-variables/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"value\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/environment-variables/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"value\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/environment-variables/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"value\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.prisma.io/v1/environment-variables/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"value\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/environment-variables/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"value\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/integrations":{"get":{"description":"Returns integrations filtered by workspace ID.","operationId":"getV1Integrations","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","required":false,"schema":{"default":100,"description":"Limit for pagination","type":"number"}},{"in":"query","name":"workspaceId","required":true,"schema":{"pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"client":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["createdAt","id","name"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"createdByUser":{"properties":{"displayName":{"type":["null","string"]},"email":{"type":"string"},"id":{"type":"string"}},"required":["displayName","email","id"],"type":"object"},"id":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"url":{"format":"uri","type":"string"}},"required":["client","createdAt","createdByUser","id","scopes","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returned the integrations for the given workspace."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."}},"summary":"Get list of integrations","tags":["Integrations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/integrations?cursor=string&limit=100&workspaceId=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/integrations?cursor=string&limit=100&workspaceId=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/integrations?cursor=string&limit=100&workspaceId=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/integrations?cursor=string&limit=100&workspaceId=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/integrations?cursor=string&limit=100&workspaceId=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/integrations?cursor=string&limit=100&workspaceId=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/integrations?cursor=string&limit=100&workspaceId=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/integrations?cursor=string&limit=100&workspaceId=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/integrations?cursor=string&limit=100&workspaceId=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/integrations/{id}":{"delete":{"description":"Revokes the integration tokens by integration ID.","operationId":"deleteV1IntegrationsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(itgr_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Revoked the integration tokens."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Integration with the given ID was not found."}},"summary":"Delete integration","tags":["Integrations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/integrations/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/integrations/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/integrations/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/integrations/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/integrations/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/integrations/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/integrations/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/integrations/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/integrations/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Returns a single integration by its ID.","operationId":"getV1IntegrationsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(itgr_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"client":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["createdAt","id","name"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"createdByUser":{"properties":{"displayName":{"type":["null","string"]},"email":{"type":"string"},"id":{"type":"string"}},"required":["displayName","email","id"],"type":"object"},"id":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"url":{"format":"uri","type":"string"}},"required":["client","createdAt","createdByUser","id","scopes","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Returned the integration."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Integration with the given ID was not found."}},"summary":"Get integration by ID","tags":["Integrations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/integrations/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/integrations/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/integrations/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/integrations/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/integrations/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/integrations/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/integrations/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/integrations/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/integrations/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/me":{"get":{"description":"Returns the user, workspace, and credential represented by the current token.","operationId":"getV1Me","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"credential":{"properties":{"id":{"type":["null","string"]},"name":{"type":["null","string"]},"type":{"enum":["oauth","service_token","management_token","agent_token"],"type":"string"}},"required":["id","name","type"],"type":"object"},"user":{"properties":{"email":{"format":"email","type":"string"},"id":{"pattern":"^(usr_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":["null","string"]}},"required":["email","id","name"],"type":["null","object"]},"workspace":{"properties":{"id":{"pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":["null","object"]}},"required":["credential","user","workspace"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Current authenticated principal retrieved."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."}},"summary":"Get current authenticated principal","tags":["Misc"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/me\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/me'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/me\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/me\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/me', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/me', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/me\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/me\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/me\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/projects":{"get":{"description":"Returns the list of projects the token has access to.","operationId":"getV1Projects","parameters":[{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}},{"in":"query","name":"logicalId","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"defaultRegion":{"type":["null","string"]},"id":{"type":"string"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"type":{"const":"project","type":"string"},"url":{"format":"uri","type":"string"},"workspace":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"}},"required":["createdAt","defaultRegion","id","logicalId","name","type","url","workspace"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returns the list of projects."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."}},"summary":"Get list of projects","tags":["Projects"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/projects?cursor=string&limit=100&logicalId=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/projects?cursor=string&limit=100&logicalId=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/projects?cursor=string&limit=100&logicalId=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects?cursor=string&limit=100&logicalId=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects?cursor=string&limit=100&logicalId=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects?cursor=string&limit=100&logicalId=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects?cursor=string&limit=100&logicalId=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/projects?cursor=string&limit=100&logicalId=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects?cursor=string&limit=100&logicalId=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"description":"Creates a new project with a postgres database.","operationId":"postV1Projects","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"createDatabase":{"default":true,"type":"boolean"},"logicalId":{"pattern":"^[a-z0-9][-_a-z0-9]*$","type":"string"},"name":{"minLength":1,"type":"string"},"region":{"enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1"],"type":"string"},"workspaceId":{"pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"apiKeys":{"deprecated":true,"description":"Deprecated: use `connections[]` instead.","items":{"properties":{"connectionString":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["connectionString","createdAt","endpoints","id","kind","name","type","url"],"type":"object"},"type":"array"},"branchId":{"type":["null","string"]},"connectionString":{"deprecated":true,"description":"Deprecated: use `connections[].endpoints.direct.connectionString` or `connections[].endpoints.pooled.connectionString`.","type":["null","string"]},"connections":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","database","endpoints","id","kind","name","type","url"],"type":"object"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"defaultConnectionId":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"directConnection":{"deprecated":true,"description":"Deprecated: use `connections[].endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"id":{"type":"string"},"isDefault":{"type":"boolean"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"source":{"oneOf":[{"properties":{"type":{"const":"empty","type":"string"}},"required":["type"],"type":"object"},{"properties":{"backupId":{"description":"ID of the backup to restore from","type":"string"},"databaseId":{"type":"string"},"type":{"const":"backup","type":"string"}},"required":["backupId","databaseId","type"],"type":"object"},{"properties":{"databaseId":{"type":"string"},"type":{"const":"database","type":"string"}},"required":["databaseId","type"],"type":"object"},{"type":"null"}]},"status":{"enum":["provisioning","ready"],"type":"string"},"type":{"const":"database","type":"string"},"url":{"format":"uri","type":"string"}},"required":["apiKeys","branchId","connectionString","connections","createdAt","defaultConnectionId","directConnection","id","isDefault","logicalId","name","region","source","status","type","url"],"type":["null","object"]},"defaultRegion":{"type":["null","string"]},"id":{"type":"string"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"type":{"const":"project","type":"string"},"url":{"format":"uri","type":"string"},"workspace":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"}},"required":["createdAt","database","defaultRegion","id","logicalId","name","type","url","workspace"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"New project created."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"A project with the same `logicalId` already exists in the workspace."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Create project with a postgres database","tags":["Projects"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/projects\");\nrequest.Content = new StringContent(\"{\\\"createDatabase\\\":true,\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"region\\\":\\\"ap-northeast-1\\\",\\\"workspaceId\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/projects' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"createDatabase\":true,\"logicalId\":\"string\",\"name\":\"string\",\"region\":\"ap-northeast-1\",\"workspaceId\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"createDatabase\":true,\"logicalId\":\"string\",\"name\":\"string\",\"region\":\"ap-northeast-1\",\"workspaceId\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/projects\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"createDatabase\\\":true,\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"region\\\":\\\"ap-northeast-1\\\",\\\"workspaceId\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"createDatabase\":true,\"logicalId\":\"string\",\"name\":\"string\",\"region\":\"ap-northeast-1\",\"workspaceId\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"createDatabase\\\":true,\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"region\\\":\\\"ap-northeast-1\\\",\\\"workspaceId\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"createDatabase\\\":true,\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"region\\\":\\\"ap-northeast-1\\\",\\\"workspaceId\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/projects\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"createDatabase\":true,\"logicalId\":\"string\",\"name\":\"string\",\"region\":\"ap-northeast-1\",\"workspaceId\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"createDatabase\\\":true,\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"region\\\":\\\"ap-northeast-1\\\",\\\"workspaceId\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/projects/{id}":{"delete":{"description":"Deletes the project with the given ID.","operationId":"deleteV1ProjectsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Project deleted."},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project cannot be deleted due to existing dependencies."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project with the specified ID was not found"}},"summary":"Delete project","tags":["Projects"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/projects/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/projects/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/projects/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/projects/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"get":{"description":"Returns the project with the given ID.","operationId":"getV1ProjectsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"defaultRegion":{"type":["null","string"]},"id":{"type":"string"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"type":{"const":"project","type":"string"},"url":{"format":"uri","type":"string"},"workspace":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"}},"required":["createdAt","defaultRegion","id","logicalId","name","type","url","workspace"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Project retrieved."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project with the specified ID was not found."}},"summary":"Get project","tags":["Projects"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/projects/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/projects/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/projects/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/projects/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"patch":{"description":"Updates the project with the given ID.","operationId":"patchV1ProjectsById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"maxLength":256,"minLength":1,"type":"string"},"settings":{"additionalProperties":{},"type":"object"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"defaultRegion":{"type":["null","string"]},"id":{"type":"string"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"type":{"const":"project","type":"string"},"url":{"format":"uri","type":"string"},"workspace":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"}},"required":["createdAt","defaultRegion","id","logicalId","name","type","url","workspace"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Project updated."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Actor does not have access to the project."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project with the specified ID was not found."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed."}},"summary":"Update project","tags":["Projects"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.prisma.io/v1/projects/string\");\nrequest.Content = new StringContent(\"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"additionalProp1\\\":null}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.prisma.io/v1/projects/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"string\",\"settings\":{\"additionalProp1\":null}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"name\":\"string\",\"settings\":{\"additionalProp1\":null}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.prisma.io/v1/projects/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"additionalProp1\\\":null}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"name\":\"string\",\"settings\":{\"additionalProp1\":null}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"additionalProp1\\\":null}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"additionalProp1\\\":null}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.prisma.io/v1/projects/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"name\":\"string\",\"settings\":{\"additionalProp1\":null}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"additionalProp1\\\":null}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/projects/{id}/transfer":{"post":{"description":"Transfer the project with the given ID to the new owner's workspace","operationId":"postV1ProjectsByIdTransfer","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"recipientAccessToken":{"type":"string"}},"required":["recipientAccessToken"],"type":"object"}}}},"responses":{"204":{"description":"Project transferred"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project with the given ID was not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The project cannot be transferred in its current state."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Transfer project","tags":["Projects"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/projects/string/transfer\");\nrequest.Content = new StringContent(\"{\\\"recipientAccessToken\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/projects/string/transfer' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"recipientAccessToken\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"recipientAccessToken\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/projects/string/transfer\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/transfer\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"recipientAccessToken\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/transfer', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"recipientAccessToken\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/transfer', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"recipientAccessToken\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/transfer\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"recipientAccessToken\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/projects/string/transfer\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"recipientAccessToken\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/transfer\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"recipientAccessToken\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/projects/{projectId}/branches":{"get":{"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.","operationId":"getV1ProjectsByProjectIdBranches","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}},{"in":"query","name":"gitName","schema":{"minLength":1,"type":"string"}},{"in":"query","name":"gitNameContains","schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"gitName":{"type":"string"},"id":{"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"isDefault":{"type":"boolean"},"project":{"description":"Thin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/apps?branchId=<br_xxx> instead (see API design principles \"Flat and Hierarchical Coexistence\").","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"role":{"enum":["production","preview"],"type":"string"},"type":{"const":"branch","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","gitName","id","isDefault","project","role","type","updatedAt","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"type":"boolean"},"nextCursor":{"type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returned the list of Branches."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project not found."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Mutually exclusive filters specified together."}},"summary":"List branches in a project","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/projects/string/branches?cursor=string&gitName=string&gitNameContains=string&limit=100\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/projects/string/branches?cursor=string&gitName=string&gitNameContains=string&limit=100'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/projects/string/branches?cursor=string&gitName=string&gitNameContains=string&limit=100\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches?cursor=string&gitName=string&gitNameContains=string&limit=100\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches?cursor=string&gitName=string&gitNameContains=string&limit=100', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches?cursor=string&gitName=string&gitNameContains=string&limit=100', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches?cursor=string&gitName=string&gitNameContains=string&limit=100\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/projects/string/branches?cursor=string&gitName=string&gitNameContains=string&limit=100\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches?cursor=string&gitName=string&gitNameContains=string&limit=100\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"post":{"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.","operationId":"postV1ProjectsByProjectIdBranches","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"gitName":{"minLength":1,"type":"string"},"isDefault":{"type":"boolean"}},"required":["gitName"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"gitName":{"type":"string"},"id":{"pattern":"^(br_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"isDefault":{"type":"boolean"},"project":{"description":"Thin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/apps?branchId=<br_xxx> instead (see API design principles \"Flat and Hierarchical Coexistence\").","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"role":{"enum":["production","preview"],"type":"string"},"type":{"const":"branch","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","gitName","id","isDefault","project","role","type","updatedAt","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created the Branch."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"A live Branch with the same gitName already exists."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid gitName."}},"summary":"Create a branch","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/projects/string/branches\");\nrequest.Content = new StringContent(\"{\\\"gitName\\\":\\\"string\\\",\\\"isDefault\\\":true}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/projects/string/branches' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"gitName\":\"string\",\"isDefault\":true}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"gitName\":\"string\",\"isDefault\":true}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/projects/string/branches\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"gitName\\\":\\\"string\\\",\\\"isDefault\\\":true}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"gitName\":\"string\",\"isDefault\":true}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"gitName\\\":\\\"string\\\",\\\"isDefault\\\":true}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"gitName\\\":\\\"string\\\",\\\"isDefault\\\":true}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/projects/string/branches\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"gitName\":\"string\",\"isDefault\":true}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"gitName\\\":\\\"string\\\",\\\"isDefault\\\":true}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/lease":{"delete":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReleases the deploy lease addressed by the Alchemy-State-Lease-Id header on clean deploy exit. A missing, replaced, or expired lease returns 404 — a lost lease at release time is surfaced, not idempotently swallowed.","operationId":"deleteV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateLease","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"header","name":"alchemy-state-lease-id","required":true,"schema":{"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation.","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Released the deploy lease."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project, branch, or unexpired lease not found."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Release Alchemy deploy lease","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"patch":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nExtends the unexpired deploy lease addressed by the Alchemy-State-Lease-Id header from now. A missing, replaced, or expired lease returns 404 — the lost-lease signal; an expired lease can never be revived.","operationId":"patchV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateLease","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"header","name":"alchemy-state-lease-id","required":true,"schema":{"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation.","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"ttlSeconds":{"description":"Requested lease TTL in seconds. Default 60, clamped to [30, 300].","exclusiveMinimum":0,"type":"integer"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"expiresAt":{"description":"Lease expiry as an ISO-8601 timestamp.","type":"string"},"leaseId":{"description":"Capability token for the deploy lease. Send it in the Alchemy-State-Lease-Id header with every state operation; do not log it.","type":"string"}},"required":["expiresAt","leaseId"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Extended the deploy lease."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project, branch, or unexpired lease not found."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Heartbeat Alchemy deploy lease","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\");\nrequest.Content = new StringContent(\"{\\\"ttlSeconds\\\":0}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"ttlSeconds\":0}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"ttlSeconds\":0}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"ttlSeconds\\\":0}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"ttlSeconds\":0}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"ttlSeconds\\\":0}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"ttlSeconds\\\":0}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"ttlSeconds\":0}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"ttlSeconds\\\":0}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"post":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nAcquires the deploy lease for a (branch, stack, stage). An expired lease is replaced atomically; a live lease fails fast with 409 naming the current holder — there is no queueing. Every Alchemy state operation requires a live deploy lease.","operationId":"postV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateLease","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"holderDescription":{"description":"Free-form description of the acquiring deploy, echoed in the contention error so a blocked deploy can name who holds the lease.","maxLength":500,"minLength":1,"type":"string"},"stack":{"description":"Alchemy stack name (opaque wire value).","maxLength":200,"minLength":1,"type":"string"},"stage":{"description":"Alchemy stage name (opaque wire value).","maxLength":200,"minLength":1,"type":"string"},"ttlSeconds":{"description":"Requested lease TTL in seconds. Default 60, clamped to [30, 300].","exclusiveMinimum":0,"type":"integer"}},"required":["stack","stage"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"expiresAt":{"description":"Lease expiry as an ISO-8601 timestamp.","type":"string"},"leaseId":{"description":"Capability token for the deploy lease. Send it in the Alchemy-State-Lease-Id header with every state operation; do not log it.","type":"string"}},"required":["expiresAt","leaseId"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Acquired the deploy lease."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The deploy lease is held by another deploy."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Acquire Alchemy deploy lease","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\");\nrequest.Content = new StringContent(\"{\\\"holderDescription\\\":\\\"string\\\",\\\"stack\\\":\\\"string\\\",\\\"stage\\\":\\\"string\\\",\\\"ttlSeconds\\\":0}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"holderDescription\":\"string\",\"stack\":\"string\",\"stage\":\"string\",\"ttlSeconds\":0}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"holderDescription\":\"string\",\"stack\":\"string\",\"stage\":\"string\",\"ttlSeconds\":0}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"holderDescription\\\":\\\"string\\\",\\\"stack\\\":\\\"string\\\",\\\"stage\\\":\\\"string\\\",\\\"ttlSeconds\\\":0}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"holderDescription\":\"string\",\"stack\":\"string\",\"stage\":\"string\",\"ttlSeconds\":0}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"holderDescription\\\":\\\"string\\\",\\\"stack\\\":\\\"string\\\",\\\"stage\\\":\\\"string\\\",\\\"ttlSeconds\\\":0}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"holderDescription\\\":\\\"string\\\",\\\"stack\\\":\\\"string\\\",\\\"stage\\\":\\\"string\\\",\\\"ttlSeconds\\\":0}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"holderDescription\":\"string\",\"stack\":\"string\",\"stage\":\"string\",\"ttlSeconds\":0}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/lease\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"holderDescription\\\":\\\"string\\\",\\\"stack\\\":\\\"string\\\",\\\"stage\\\":\\\"string\\\",\\\"ttlSeconds\\\":0}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks":{"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLists the distinct stack names with state or output rows on the branch. Requires no deploy lease: the stock client's auth probe (checkHttpStateStoreAuth) calls this endpoint bare, and it exposes stack names only.","operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacks","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array"}}},"description":"Stack names, sorted."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"No live deploy lease held for this stack and stage."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"List Alchemy stacks","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}":{"delete":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeletes every resource-state and output row of the stack, or only the given stage's rows when the stage query parameter is set. Requires a live deploy lease on the affected stage; without a stage it additionally requires that no other stage of the stack holds a live lease, so one stage's deploy can never delete state another stage's deploy is using. Idempotent.","operationId":"deleteV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStack","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"stack","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"stage","schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"header","name":"alchemy-state-lease-id","required":true,"schema":{"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation.","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Deleted (or already absent)."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"No live deploy lease held for this stack and stage."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Delete Alchemy stack state","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string?stage=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string?stage=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string?stage=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string?stage=string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string?stage=string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string?stage=string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string?stage=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string?stage=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string?stage=string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}/stages":{"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLists the distinct stage names with state or output rows for the stack. Accepts a live deploy lease on any stage of the stack.","operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStages","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"stack","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"header","name":"alchemy-state-lease-id","required":true,"schema":{"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation.","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array"}}},"description":"Stage names, sorted."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"No live deploy lease held for this stack and stage."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"List Alchemy stages","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}/stages/{stage}/output":{"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the stored stack output for the stage, or a JSON null body when absent (the stock client maps null to undefined).","operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageOutput","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"stack","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"path","name":"stage","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"header","name":"alchemy-state-lease-id","required":true,"schema":{"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation.","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"The stored output, or null when absent."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"No live deploy lease held for this stack and stage."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Get Alchemy stack output","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"put":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nOverwrites the stack output for the stage, encrypted at rest, and echoes the stored value.","operationId":"putV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageOutput","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"stack","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"path","name":"stage","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"header","name":"alchemy-state-lease-id","required":true,"schema":{"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation.","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{}}}},"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Echo of the stored value."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"No live deploy lease held for this stack and stage."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Set Alchemy stack output","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Put, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output\");\nrequest.Content = new StringContent(\"null\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PUT 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output' \\\n  -H 'Content-Type: application/json' \\\n  -d 'null'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`null`)\n\treq, err := http.NewRequestWithContext(ctx, \"PUT\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output\"))\n    .method(\"PUT\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"null\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output', {\n  method: 'PUT',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify(null),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: \"null\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"null\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='null',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/output\")\nrequest = Net::HTTPGenericRequest.new(\"PUT\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"null\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}/stages/{stage}/replaced-resources":{"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the decrypted resource states of the stage whose status is \"replaced\".","operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageReplaced-resources","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"stack","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"path","name":"stage","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"header","name":"alchemy-state-lease-id","required":true,"schema":{"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation.","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{},"type":"array"}}},"description":"Replaced resource states."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"No live deploy lease held for this stack and stage."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"List replaced Alchemy resources","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/replaced-resources\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/replaced-resources'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/replaced-resources\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/replaced-resources\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/replaced-resources', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/replaced-resources', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/replaced-resources\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/replaced-resources\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/replaced-resources\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}/stages/{stage}/resources":{"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nLists the resource FQNs stored for the stage, ordered by FQN.","operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageResources","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"stack","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"path","name":"stage","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"header","name":"alchemy-state-lease-id","required":true,"schema":{"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation.","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array"}}},"description":"Resource FQNs, ordered."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"No live deploy lease held for this stack and stage."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"List Alchemy resources","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}/stages/{stage}/resources/{fqn}":{"delete":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeletes the resource state row. Idempotent: deleting an absent row also returns 204.","operationId":"deleteV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageResourcesByFqn","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"stack","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"path","name":"stage","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"path","name":"fqn","required":true,"schema":{"minLength":1,"type":"string"}},{"in":"header","name":"alchemy-state-lease-id","required":true,"schema":{"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation.","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Deleted (or already absent)."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"No live deploy lease held for this stack and stage."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Delete Alchemy resource state","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the stored resource state, or a JSON null body when absent (the stock client maps null to undefined).","operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageResourcesByFqn","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"stack","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"path","name":"stage","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"path","name":"fqn","required":true,"schema":{"minLength":1,"type":"string"}},{"in":"header","name":"alchemy-state-lease-id","required":true,"schema":{"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation.","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"The stored value, or null when absent."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"No live deploy lease held for this stack and stage."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Get Alchemy resource state","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"put":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nStores the resource state encrypted at rest and echoes the stored value.","operationId":"putV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateStateStacksByStackStagesByStageResourcesByFqn","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"stack","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"path","name":"stage","required":true,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"path","name":"fqn","required":true,"schema":{"minLength":1,"type":"string"}},{"in":"header","name":"alchemy-state-lease-id","required":true,"schema":{"description":"Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation.","pattern":"^(aslease_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{}}}},"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Echo of the stored value."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"No live deploy lease held for this stack and stage."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Set Alchemy resource state","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Put, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\");\nrequest.Content = new StringContent(\"null\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PUT 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string' \\\n  -H 'Content-Type: application/json' \\\n  -d 'null'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`null`)\n\treq, err := http.NewRequestWithContext(ctx, \"PUT\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\"))\n    .method(\"PUT\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"null\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string', {\n  method: 'PUT',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify(null),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: \"null\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"null\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='null',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/state/stacks/string/stages/string/resources/string\")\nrequest = Net::HTTPGenericRequest.new(\"PUT\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"null\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/projects/{projectId}/branches/{branchId}/alchemy-state/version":{"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nUnauthenticated contract-version probe served verbatim from the pinned alchemy HttpStateApi contract. Returns the constant only and never inspects the addressed project or branch.","operationId":"getV1ProjectsByProjectIdBranchesByBranchIdAlchemy-stateVersion","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"version":{"type":"number"}},"required":["version"],"type":"object"}}},"description":"The state-store contract version."}},"summary":"Alchemy state store version","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/version\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/version'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/version\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/version\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/version', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/version', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/version\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/version\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/alchemy-state/version\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/projects/{projectId}/branches/{branchId}/application-topology":{"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns the stored topology graph for the branch — the same shape Composer submitted. Nodes, ports, and edges are returned in deterministic order.","operationId":"getV1ProjectsByProjectIdBranchesByBranchIdApplication-topology","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"contentHash":{"type":"string"},"edges":{"items":{"properties":{"family":{"enum":["communication","data"],"type":"string"},"from":{"properties":{"direction":{"enum":["in","out"],"type":"string"},"logicalId":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"}},"required":["direction","logicalId","name"],"type":"object"},"style":{"type":"string"},"to":{"properties":{"direction":{"enum":["in","out"],"type":"string"},"logicalId":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"}},"required":["direction","logicalId","name"],"type":"object"}},"required":["family","from","to"],"type":"object"},"type":"array"},"nodes":{"items":{"properties":{"kind":{"enum":["module","service","resource"],"type":"string"},"logicalId":{"minLength":1,"type":"string"},"parentLogicalId":{"minLength":1,"type":["null","string"]},"type":{"type":"string"}},"required":["kind","logicalId","parentLogicalId"],"type":"object"},"type":"array"},"ports":{"items":{"properties":{"contractHash":{"type":"string"},"contractKind":{"type":"string"},"direction":{"enum":["in","out"],"type":"string"},"logicalId":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"}},"required":["direction","logicalId","name"],"type":"object"},"type":"array"},"writtenAt":{"format":"date-time","type":"string"}},"required":["edges","nodes","ports"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"The branch topology."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."}},"summary":"Get branch topology","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/projects/string/branches/string/application-topology\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/projects/string/branches/string/application-topology'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/application-topology\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/application-topology\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/application-topology', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/application-topology', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/application-topology\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/projects/string/branches/string/application-topology\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/application-topology\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"put":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nAtomically replaces the entire topology for a branch. Composer calls this after Load, before the apply. On error, Composer warns and continues — the previous topology is preserved.","operationId":"putV1ProjectsByProjectIdBranchesByBranchIdApplication-topology","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"branchId","required":true,"schema":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contentHash":{"type":"string"},"edges":{"items":{"properties":{"family":{"enum":["communication","data"],"type":"string"},"from":{"properties":{"direction":{"enum":["in","out"],"type":"string"},"logicalId":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"}},"required":["direction","logicalId","name"],"type":"object"},"style":{"type":"string"},"to":{"properties":{"direction":{"enum":["in","out"],"type":"string"},"logicalId":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"}},"required":["direction","logicalId","name"],"type":"object"}},"required":["family","from","to"],"type":"object"},"type":"array"},"nodes":{"items":{"properties":{"kind":{"enum":["module","service","resource"],"type":"string"},"logicalId":{"minLength":1,"type":"string"},"parentLogicalId":{"minLength":1,"type":["null","string"]},"type":{"type":"string"}},"required":["kind","logicalId","parentLogicalId"],"type":"object"},"type":"array"},"ports":{"items":{"properties":{"contractHash":{"type":"string"},"contractKind":{"type":"string"},"direction":{"enum":["in","out"],"type":"string"},"logicalId":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"}},"required":["direction","logicalId","name"],"type":"object"},"type":"array"}},"required":["edges","nodes","ports"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"contentHash":{"type":"string"},"edges":{"items":{"properties":{"family":{"enum":["communication","data"],"type":"string"},"from":{"properties":{"direction":{"enum":["in","out"],"type":"string"},"logicalId":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"}},"required":["direction","logicalId","name"],"type":"object"},"style":{"type":"string"},"to":{"properties":{"direction":{"enum":["in","out"],"type":"string"},"logicalId":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"}},"required":["direction","logicalId","name"],"type":"object"}},"required":["family","from","to"],"type":"object"},"type":"array"},"nodes":{"items":{"properties":{"kind":{"enum":["module","service","resource"],"type":"string"},"logicalId":{"minLength":1,"type":"string"},"parentLogicalId":{"minLength":1,"type":["null","string"]},"type":{"type":"string"}},"required":["kind","logicalId","parentLogicalId"],"type":"object"},"type":"array"},"ports":{"items":{"properties":{"contractHash":{"type":"string"},"contractKind":{"type":"string"},"direction":{"enum":["in","out"],"type":"string"},"logicalId":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"}},"required":["direction","logicalId","name"],"type":"object"},"type":"array"},"writtenAt":{"format":"date-time","type":"string"}},"required":["edges","nodes","ports"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"ApplicationTopology replaced."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or branch not found."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid topology shape."}},"summary":"Replace branch topology","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Put, \"https://api.prisma.io/v1/projects/string/branches/string/application-topology\");\nrequest.Content = new StringContent(\"{\\\"contentHash\\\":\\\"string\\\",\\\"edges\\\":[{\\\"family\\\":\\\"communication\\\",\\\"from\\\":{\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"},\\\"style\\\":\\\"string\\\",\\\"to\\\":{\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}}],\\\"nodes\\\":[{\\\"kind\\\":\\\"module\\\",\\\"logicalId\\\":\\\"string\\\",\\\"parentLogicalId\\\":\\\"string\\\",\\\"type\\\":\\\"string\\\"}],\\\"ports\\\":[{\\\"contractHash\\\":\\\"string\\\",\\\"contractKind\\\":\\\"string\\\",\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PUT 'https://api.prisma.io/v1/projects/string/branches/string/application-topology' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"contentHash\":\"string\",\"edges\":[{\"family\":\"communication\",\"from\":{\"direction\":\"in\",\"logicalId\":\"string\",\"name\":\"string\"},\"style\":\"string\",\"to\":{\"direction\":\"in\",\"logicalId\":\"string\",\"name\":\"string\"}}],\"nodes\":[{\"kind\":\"module\",\"logicalId\":\"string\",\"parentLogicalId\":\"string\",\"type\":\"string\"}],\"ports\":[{\"contractHash\":\"string\",\"contractKind\":\"string\",\"direction\":\"in\",\"logicalId\":\"string\",\"name\":\"string\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"contentHash\":\"string\",\"edges\":[{\"family\":\"communication\",\"from\":{\"direction\":\"in\",\"logicalId\":\"string\",\"name\":\"string\"},\"style\":\"string\",\"to\":{\"direction\":\"in\",\"logicalId\":\"string\",\"name\":\"string\"}}],\"nodes\":[{\"kind\":\"module\",\"logicalId\":\"string\",\"parentLogicalId\":\"string\",\"type\":\"string\"}],\"ports\":[{\"contractHash\":\"string\",\"contractKind\":\"string\",\"direction\":\"in\",\"logicalId\":\"string\",\"name\":\"string\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PUT\", \"https://api.prisma.io/v1/projects/string/branches/string/application-topology\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/branches/string/application-topology\"))\n    .method(\"PUT\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PUT\", HttpRequest.BodyPublishers.ofString(\"{\\\"contentHash\\\":\\\"string\\\",\\\"edges\\\":[{\\\"family\\\":\\\"communication\\\",\\\"from\\\":{\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"},\\\"style\\\":\\\"string\\\",\\\"to\\\":{\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}}],\\\"nodes\\\":[{\\\"kind\\\":\\\"module\\\",\\\"logicalId\\\":\\\"string\\\",\\\"parentLogicalId\\\":\\\"string\\\",\\\"type\\\":\\\"string\\\"}],\\\"ports\\\":[{\\\"contractHash\\\":\\\"string\\\",\\\"contractKind\\\":\\\"string\\\",\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/application-topology', {\n  method: 'PUT',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"contentHash\":\"string\",\"edges\":[{\"family\":\"communication\",\"from\":{\"direction\":\"in\",\"logicalId\":\"string\",\"name\":\"string\"},\"style\":\"string\",\"to\":{\"direction\":\"in\",\"logicalId\":\"string\",\"name\":\"string\"}}],\"nodes\":[{\"kind\":\"module\",\"logicalId\":\"string\",\"parentLogicalId\":\"string\",\"type\":\"string\"}],\"ports\":[{\"contractHash\":\"string\",\"contractKind\":\"string\",\"direction\":\"in\",\"logicalId\":\"string\",\"name\":\"string\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/branches/string/application-topology', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"contentHash\\\":\\\"string\\\",\\\"edges\\\":[{\\\"family\\\":\\\"communication\\\",\\\"from\\\":{\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"},\\\"style\\\":\\\"string\\\",\\\"to\\\":{\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}}],\\\"nodes\\\":[{\\\"kind\\\":\\\"module\\\",\\\"logicalId\\\":\\\"string\\\",\\\"parentLogicalId\\\":\\\"string\\\",\\\"type\\\":\\\"string\\\"}],\\\"ports\\\":[{\\\"contractHash\\\":\\\"string\\\",\\\"contractKind\\\":\\\"string\\\",\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/branches/string/application-topology\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PUT\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"contentHash\\\":\\\"string\\\",\\\"edges\\\":[{\\\"family\\\":\\\"communication\\\",\\\"from\\\":{\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"},\\\"style\\\":\\\"string\\\",\\\"to\\\":{\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}}],\\\"nodes\\\":[{\\\"kind\\\":\\\"module\\\",\\\"logicalId\\\":\\\"string\\\",\\\"parentLogicalId\\\":\\\"string\\\",\\\"type\\\":\\\"string\\\"}],\\\"ports\\\":[{\\\"contractHash\\\":\\\"string\\\",\\\"contractKind\\\":\\\"string\\\",\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://api.prisma.io/v1/projects/string/branches/string/application-topology\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"contentHash\":\"string\",\"edges\":[{\"family\":\"communication\",\"from\":{\"direction\":\"in\",\"logicalId\":\"string\",\"name\":\"string\"},\"style\":\"string\",\"to\":{\"direction\":\"in\",\"logicalId\":\"string\",\"name\":\"string\"}}],\"nodes\":[{\"kind\":\"module\",\"logicalId\":\"string\",\"parentLogicalId\":\"string\",\"type\":\"string\"}],\"ports\":[{\"contractHash\":\"string\",\"contractKind\":\"string\",\"direction\":\"in\",\"logicalId\":\"string\",\"name\":\"string\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/branches/string/application-topology\")\nrequest = Net::HTTPGenericRequest.new(\"PUT\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"contentHash\\\":\\\"string\\\",\\\"edges\\\":[{\\\"family\\\":\\\"communication\\\",\\\"from\\\":{\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"},\\\"style\\\":\\\"string\\\",\\\"to\\\":{\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}}],\\\"nodes\\\":[{\\\"kind\\\":\\\"module\\\",\\\"logicalId\\\":\\\"string\\\",\\\"parentLogicalId\\\":\\\"string\\\",\\\"type\\\":\\\"string\\\"}],\\\"ports\\\":[{\\\"contractHash\\\":\\\"string\\\",\\\"contractKind\\\":\\\"string\\\",\\\"direction\\\":\\\"in\\\",\\\"logicalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/projects/{projectId}/databases":{"get":{"description":"Returns databases for the given project.","operationId":"getV1ProjectsByProjectIdDatabases","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"branchId":{"type":["null","string"]},"connections":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","database","endpoints","id","kind","name","type","url"],"type":"object"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"defaultConnectionId":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"id":{"type":"string"},"isDefault":{"type":"boolean"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"project":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":["null","object"]},"source":{"oneOf":[{"properties":{"type":{"const":"empty","type":"string"}},"required":["type"],"type":"object"},{"properties":{"backupId":{"description":"ID of the backup to restore from","type":"string"},"databaseId":{"type":"string"},"type":{"const":"backup","type":"string"}},"required":["backupId","databaseId","type"],"type":"object"},{"properties":{"databaseId":{"type":"string"},"type":{"const":"database","type":"string"}},"required":["databaseId","type"],"type":"object"},{"type":"null"}]},"status":{"enum":["failure","provisioning","ready","recovering"],"type":"string"},"type":{"const":"database","type":"string"},"url":{"format":"uri","type":"string"}},"required":["branchId","connections","createdAt","defaultConnectionId","id","isDefault","logicalId","name","project","region","source","status","type","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returned the databases for the given project ID."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project with the given ID was not found."}},"summary":"Get list of databases","tags":["Databases"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/projects/string/databases?cursor=string&limit=100\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/projects/string/databases?cursor=string&limit=100'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/projects/string/databases?cursor=string&limit=100\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/databases?cursor=string&limit=100\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/databases?cursor=string&limit=100', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/databases?cursor=string&limit=100', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/databases?cursor=string&limit=100\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/projects/string/databases?cursor=string&limit=100\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/databases?cursor=string&limit=100\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"description":"Creates a new database for the given project.","operationId":"postV1ProjectsByProjectIdDatabases","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"fromDatabase":{"deprecated":true,"description":"Deprecated: use `source` instead.","properties":{"backupId":{"type":"string"},"id":{"pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},"required":["id"],"type":"object"},"isDefault":{"default":false,"type":"boolean"},"name":{"minLength":1,"type":"string"},"region":{"default":"us-east-1","description":"Use \"inherit\" to use the project's default region (falls back to the default database's region for projects without one).","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1","inherit"],"type":"string"},"source":{"oneOf":[{"properties":{"type":{"const":"empty","type":"string"}},"required":["type"],"type":"object"},{"properties":{"backupId":{"description":"ID of the backup to restore from","type":"string"},"databaseId":{"description":"ID of the database the backup belongs to","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"type":{"const":"backup","type":"string"}},"required":["backupId","databaseId","type"],"type":"object"},{"properties":{"databaseId":{"description":"ID of the database to clone from","pattern":"^(db_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"type":{"const":"database","type":"string"}},"required":["databaseId","type"],"type":"object"}]}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"apiKeys":{"deprecated":true,"description":"Deprecated: use `connections[]` instead.","items":{"properties":{"connectionString":{"deprecated":true,"description":"Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["connectionString","createdAt","endpoints","id","kind","name","type","url"],"type":"object"},"type":"array"},"branchId":{"type":["null","string"]},"connectionString":{"deprecated":true,"description":"Deprecated: use `connections[].endpoints.direct.connectionString` or `connections[].endpoints.pooled.connectionString`.","type":["null","string"]},"connections":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"database":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"directConnection":{"deprecated":true,"description":"Deprecated: use `endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"endpoints":{"properties":{"accelerate":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"direct":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"},"pooled":{"properties":{"connectionString":{"type":"string"},"host":{"type":"string"},"port":{"type":"number"}},"required":["host","port"],"type":"object"}},"type":"object"},"id":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"kind":{"enum":["postgres","accelerate"],"type":"string"},"name":{"type":"string"},"type":{"const":"connection","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","database","endpoints","id","kind","name","type","url"],"type":"object"},"type":"array"},"createdAt":{"format":"date-time","type":"string"},"defaultConnectionId":{"pattern":"^(con_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"directConnection":{"deprecated":true,"description":"Deprecated: use `connections[].endpoints.direct` instead.","properties":{"host":{"type":"string"},"pass":{"type":"string"},"user":{"type":"string"}},"required":["host","pass","user"],"type":["null","object"]},"id":{"type":"string"},"isDefault":{"type":"boolean"},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"project":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"format":"uri","type":"string"}},"required":["id","name","url"],"type":"object"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"source":{"oneOf":[{"properties":{"type":{"const":"empty","type":"string"}},"required":["type"],"type":"object"},{"properties":{"backupId":{"description":"ID of the backup to restore from","type":"string"},"databaseId":{"type":"string"},"type":{"const":"backup","type":"string"}},"required":["backupId","databaseId","type"],"type":"object"},{"properties":{"databaseId":{"type":"string"},"type":{"const":"database","type":"string"}},"required":["databaseId","type"],"type":"object"},{"type":"null"}]},"status":{"enum":["provisioning","ready"],"type":"string"},"type":{"const":"database","type":"string"},"url":{"format":"uri","type":"string"}},"required":["apiKeys","branchId","connectionString","connections","createdAt","defaultConnectionId","directConnection","id","isDefault","logicalId","name","project","region","source","status","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created a new database for the project."},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The request is invalid due to missing or invalid parameters."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The actor or agent permission policy does not allow database creation."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project with the given ID was not found."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Create database","tags":["Databases"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/projects/string/databases\");\nrequest.Content = new StringContent(\"{\\\"fromDatabase\\\":{\\\"backupId\\\":\\\"string\\\",\\\"id\\\":\\\"string\\\"},\\\"isDefault\\\":false,\\\"name\\\":\\\"string\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"source\\\":{\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"database\\\"}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/projects/string/databases' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"fromDatabase\":{\"backupId\":\"string\",\"id\":\"string\"},\"isDefault\":false,\"name\":\"string\",\"region\":\"us-east-1\",\"source\":{\"databaseId\":\"string\",\"type\":\"database\"}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"fromDatabase\":{\"backupId\":\"string\",\"id\":\"string\"},\"isDefault\":false,\"name\":\"string\",\"region\":\"us-east-1\",\"source\":{\"databaseId\":\"string\",\"type\":\"database\"}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/projects/string/databases\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/projects/string/databases\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"fromDatabase\\\":{\\\"backupId\\\":\\\"string\\\",\\\"id\\\":\\\"string\\\"},\\\"isDefault\\\":false,\\\"name\\\":\\\"string\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"source\\\":{\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"database\\\"}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/databases', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"fromDatabase\":{\"backupId\":\"string\",\"id\":\"string\"},\"isDefault\":false,\"name\":\"string\",\"region\":\"us-east-1\",\"source\":{\"databaseId\":\"string\",\"type\":\"database\"}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/projects/string/databases', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"fromDatabase\\\":{\\\"backupId\\\":\\\"string\\\",\\\"id\\\":\\\"string\\\"},\\\"isDefault\\\":false,\\\"name\\\":\\\"string\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"source\\\":{\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"database\\\"}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/projects/string/databases\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"fromDatabase\\\":{\\\"backupId\\\":\\\"string\\\",\\\"id\\\":\\\"string\\\"},\\\"isDefault\\\":false,\\\"name\\\":\\\"string\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"source\\\":{\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"database\\\"}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/projects/string/databases\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"fromDatabase\":{\"backupId\":\"string\",\"id\":\"string\"},\"isDefault\":false,\"name\":\"string\",\"region\":\"us-east-1\",\"source\":{\"databaseId\":\"string\",\"type\":\"database\"}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/projects/string/databases\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"fromDatabase\\\":{\\\"backupId\\\":\\\"string\\\",\\\"id\\\":\\\"string\\\"},\\\"isDefault\\\":false,\\\"name\\\":\\\"string\\\",\\\"region\\\":\\\"us-east-1\\\",\\\"source\\\":{\\\"databaseId\\\":\\\"string\\\",\\\"type\\\":\\\"database\\\"}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/regions":{"get":{"description":"Returns all available regions across products. Optionally filter by product.","operationId":"getV1Regions","parameters":[{"in":"query","name":"product","schema":{"enum":["postgres","accelerate"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"product":{"enum":["postgres","accelerate"],"type":"string"},"status":{"enum":["available","unavailable"],"type":"string"},"type":{"const":"region","type":"string"}},"required":["id","name","product","type"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Returns all available regions."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."}},"summary":"Get all regions","tags":["Regions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/regions?product=accelerate\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/regions?product=accelerate'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/regions?product=accelerate\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/regions?product=accelerate\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/regions?product=accelerate', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/regions?product=accelerate', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/regions?product=accelerate\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/regions?product=accelerate\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/regions?product=accelerate\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/regions/accelerate":{"get":{"description":"Returns all available regions for Prisma Accelerate.","operationId":"getV1RegionsAccelerate","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"const":"region","type":"string"}},"required":["id","name","type"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Returns all available regions for Prisma Accelerate."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."}},"summary":"Get Prisma Accelerate regions","tags":["Misc"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/regions/accelerate\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/regions/accelerate'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/regions/accelerate\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/regions/accelerate\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/regions/accelerate', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/regions/accelerate', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/regions/accelerate\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/regions/accelerate\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/regions/accelerate\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/regions/postgres":{"get":{"description":"Returns all available regions for Prisma Postgres.","operationId":"getV1RegionsPostgres","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"enum":["available","unavailable"],"type":"string"},"type":{"const":"region","type":"string"}},"required":["id","name","status","type"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"Returns all available regions for Prisma Postgres."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."}},"summary":"Get Prisma Postgres regions","tags":["Misc"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/regions/postgres\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/regions/postgres'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/regions/postgres\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/regions/postgres\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/regions/postgres', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/regions/postgres', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/regions/postgres\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/regions/postgres\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/regions/postgres\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/scm-installations":{"get":{"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.","operationId":"getV1Scm-installations","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","required":false,"schema":{"default":100,"description":"Limit for pagination","type":"number"}},{"in":"query","name":"workspaceId","required":true,"schema":{"pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"repository","required":false,"schema":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"accountId":{"description":"Numeric account ID assigned by the SCM provider","type":"integer"},"accountLogin":{"type":"string"},"accountType":{"enum":["user","organization"],"type":"string"},"createdAt":{"format":"date-time","type":"string"},"id":{"pattern":"^(scminstall_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"installationId":{"description":"Numeric installation ID assigned by the SCM provider","type":"integer"},"provider":{"enum":["github"],"type":"string"},"suspended":{"type":"boolean"},"type":{"const":"scm-installation","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["accountId","accountLogin","accountType","createdAt","id","installationId","provider","suspended","type","updatedAt","url"],"type":"object"},"type":"array"},"hint":{"type":"string"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"SCM installations the caller can access in the workspace. May be empty."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."}},"summary":"List SCM installations for a workspace","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/scm-installations?cursor=string&limit=100&repository=string&workspaceId=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/scm-installations?cursor=string&limit=100&repository=string&workspaceId=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/scm-installations?cursor=string&limit=100&repository=string&workspaceId=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/scm-installations?cursor=string&limit=100&repository=string&workspaceId=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/scm-installations?cursor=string&limit=100&repository=string&workspaceId=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/scm-installations?cursor=string&limit=100&repository=string&workspaceId=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/scm-installations?cursor=string&limit=100&repository=string&workspaceId=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/scm-installations?cursor=string&limit=100&repository=string&workspaceId=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/scm-installations?cursor=string&limit=100&repository=string&workspaceId=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/scm-installations/install-intents":{"post":{"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. If an existing installation can be proven to belong to the caller it is linked immediately (`alreadyLinked`); otherwise the response carries a URL the user opens to install the SCM app. Pass `repository` (owner/name) so an installation that already covers it but cannot be linked automatically is detected and explained in `hint`. Currently only `github` is supported.","operationId":"postV1Scm-installationsInstall-intents","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"provider":{"enum":["github"],"type":"string"},"repository":{"pattern":"^[\\w.-]+\\/[\\w.-]+$","type":"string"},"workspaceId":{"pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},"required":["provider","workspaceId"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"accountLogin":{"type":"string"},"alreadyLinked":{"type":"boolean"},"hint":{"type":"string"},"installUrl":{"format":"uri","type":"string"},"provider":{"enum":["github"],"type":"string"},"type":{"const":"install-intent","type":"string"},"workspaceId":{"pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},"required":["installUrl","provider","type","workspaceId"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Installation intent created. The `installUrl` is single-use and time-limited."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Workspace integration tokens cannot create install intents; a user-authenticated request is required."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Workspace not found or not accessible."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. malformed workspaceId or unsupported provider)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Create an SCM App installation intent","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/scm-installations/install-intents\");\nrequest.Content = new StringContent(\"{\\\"provider\\\":\\\"github\\\",\\\"repository\\\":\\\"string\\\",\\\"workspaceId\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/scm-installations/install-intents' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"provider\":\"github\",\"repository\":\"string\",\"workspaceId\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"provider\":\"github\",\"repository\":\"string\",\"workspaceId\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/scm-installations/install-intents\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/scm-installations/install-intents\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"provider\\\":\\\"github\\\",\\\"repository\\\":\\\"string\\\",\\\"workspaceId\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/scm-installations/install-intents', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"provider\":\"github\",\"repository\":\"string\",\"workspaceId\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/scm-installations/install-intents', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"provider\\\":\\\"github\\\",\\\"repository\\\":\\\"string\\\",\\\"workspaceId\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/scm-installations/install-intents\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"provider\\\":\\\"github\\\",\\\"repository\\\":\\\"string\\\",\\\"workspaceId\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/scm-installations/install-intents\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"provider\":\"github\",\"repository\":\"string\",\"workspaceId\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/scm-installations/install-intents\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"provider\\\":\\\"github\\\",\\\"repository\\\":\\\"string\\\",\\\"workspaceId\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/scm-installations/{installationId}/repositories":{"get":{"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.","operationId":"getV1Scm-installationsByInstallationIdRepositories","parameters":[{"in":"path","name":"installationId","required":true,"schema":{"pattern":"^(scminstall_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination (opaque, returned from previous response)","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Maximum repositories to return (default and max 100).","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"defaultBranch":{"type":"string"},"fullName":{"description":"Full repository name, e.g. \"octocat/hello\"","type":"string"},"id":{"description":"Numeric repository ID assigned by the SCM provider","type":"integer"},"isPrivate":{"type":"boolean"},"type":{"const":"scm-repository","type":"string"}},"required":["defaultBranch","fullName","id","isPrivate","type"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"type":"boolean"},"nextCursor":{"type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Repositories accessible to the installation."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Installation not found or not accessible."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The SCM provider rejected the repository listing request."}},"summary":"List repositories accessible to an SCM installation","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/scm-installations/string/repositories?cursor=string&limit=100\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/scm-installations/string/repositories?cursor=string&limit=100'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/scm-installations/string/repositories?cursor=string&limit=100\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/scm-installations/string/repositories?cursor=string&limit=100\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/scm-installations/string/repositories?cursor=string&limit=100', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/scm-installations/string/repositories?cursor=string&limit=100', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/scm-installations/string/repositories?cursor=string&limit=100\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/scm-installations/string/repositories?cursor=string&limit=100\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/scm-installations/string/repositories?cursor=string&limit=100\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/services":{"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all services the token has access to, ordered by creation time (oldest first). Optionally filter by project ID. Supports cursor-based pagination.","operationId":"getV1Services","parameters":[{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}},{"in":"query","name":"projectId","schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"logicalId","schema":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"}},{"in":"query","name":"branchId","schema":{"anyOf":[{"const":"unassigned","type":"string"},{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}]}},{"in":"query","name":"branchGitName","schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"appEndpointDomain":{"type":"string"},"branchId":{"type":["null","string"]},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"latestDeploymentId":{"type":["null","string"]},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"projectId":{"type":"string"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":{"const":"app","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appEndpointDomain","branchId","createdAt","id","latestDeploymentId","logicalId","name","projectId","region","type","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returns the list of services."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. malformed projectId filter)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"List services","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/services?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/services?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/services?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/services?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/services?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/services?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/services?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/services?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/services?branchGitName=string&branchId=unassigned&cursor=string&limit=100&logicalId=string&projectId=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"post":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new 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` when a service already occupies the slot on the resolved branch, either by name or by `logicalId`; the body includes the existing service's id, name, branch, and logical id, and `conflict` says which attribute clashed. The name is checked first. `logicalId` cannot be combined with `branchGitName`; pass `branchId` instead.","operationId":"postV1Services","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"branchGitName":{"minLength":1,"type":["null","string"]},"branchId":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"displayName":{"maxLength":256,"minLength":1,"type":"string"},"logicalId":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"projectId":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"regionId":{"default":"us-east-1","enum":["us-east-1","us-west-1","eu-west-3","eu-central-1","ap-northeast-1","ap-southeast-1"],"type":"string"}},"required":["displayName","projectId"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appEndpointDomain":{"type":"string"},"branchId":{"type":["null","string"]},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"latestDeploymentId":{"type":["null","string"]},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"projectId":{"type":"string"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":{"const":"app","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appEndpointDomain","branchId","createdAt","id","latestDeploymentId","logicalId","name","projectId","region","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Service created."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"branchGitName":{"type":"string"},"code":{"const":"app:already_exists","type":"string"},"conflict":{"description":"Which attribute of the existing app clashed.","enum":["name","logicalId"],"type":"string"},"existingAppId":{"type":"string"},"logicalId":{"description":"The existing app's logical id.","type":["null","string"]},"message":{"type":"string"},"name":{"type":"string"}},"required":["branchGitName","code","existingAppId","message","name"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"A service already occupies the slot on the resolved branch, by `displayName` or by `logicalId`. The body includes the existing service's id, name, branch git name, and logical id; `conflict` says which attribute clashed."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. missing projectId, empty display name, or invalid region)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Create service","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/services\");\nrequest.Content = new StringContent(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"regionId\\\":\\\"us-east-1\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/services' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\",\"projectId\":\"string\",\"regionId\":\"us-east-1\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\",\"projectId\":\"string\",\"regionId\":\"us-east-1\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/services\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/services\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"regionId\\\":\\\"us-east-1\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/services', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\",\"projectId\":\"string\",\"regionId\":\"us-east-1\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/services', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"regionId\\\":\\\"us-east-1\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/services\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"regionId\\\":\\\"us-east-1\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/services\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\",\"projectId\":\"string\",\"regionId\":\"us-east-1\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/services\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"regionId\\\":\\\"us-east-1\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/services/{serviceId}":{"delete":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nDeletes a service. Deployments under the service are deleted before the service is deleted.","operationId":"deleteV1ServicesByServiceId","parameters":[{"in":"path","name":"serviceId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Service deleted."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Service not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"A deployment could not be deleted, or a concurrent deployment was created while deleting the service."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Delete service","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/services/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/services/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/services/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/services/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/services/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/services/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/services/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/services/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/services/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns a service by ID, including its region and active promoted deployment reference.","operationId":"getV1ServicesByServiceId","parameters":[{"in":"path","name":"serviceId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appEndpointDomain":{"type":"string"},"branchId":{"type":["null","string"]},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"latestDeploymentId":{"type":["null","string"]},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"projectId":{"type":"string"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":{"const":"app","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appEndpointDomain","branchId","createdAt","id","latestDeploymentId","logicalId","name","projectId","region","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Service retrieved."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Service not found."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Get service","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/services/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/services/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/services/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/services/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/services/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/services/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/services/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/services/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/services/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"patch":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nUpdates the display name, logical id, or branch of a service. `logicalId` cannot be combined with `branchId` or `branchGitName` in one request; move the service first, then set its `logicalId`.","operationId":"patchV1ServicesByServiceId","parameters":[{"in":"path","name":"serviceId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"branchGitName":{"minLength":1,"type":["null","string"]},"branchId":{"pattern":"^(br_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":["null","string"]},"displayName":{"maxLength":256,"minLength":1,"type":"string"},"logicalId":{"description":"Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appEndpointDomain":{"type":"string"},"branchId":{"type":["null","string"]},"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"latestDeploymentId":{"type":["null","string"]},"logicalId":{"type":["null","string"]},"name":{"type":"string"},"projectId":{"type":"string"},"region":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"type":{"const":"app","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appEndpointDomain","branchId","createdAt","id","latestDeploymentId","logicalId","name","projectId","region","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Service updated."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Service not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"A service with the same `logicalId` already exists on the branch."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. empty display name)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"Update service","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.prisma.io/v1/services/string\");\nrequest.Content = new StringContent(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.prisma.io/v1/services/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.prisma.io/v1/services/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/services/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/services/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/services/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/services/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.prisma.io/v1/services/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"branchGitName\":\"string\",\"branchId\":\"string\",\"displayName\":\"string\",\"logicalId\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/services/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"branchGitName\\\":\\\"string\\\",\\\"branchId\\\":\\\"string\\\",\\\"displayName\\\":\\\"string\\\",\\\"logicalId\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/services/{serviceId}/deployments":{"get":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nReturns all deployments belonging to a service, ordered by creation time (newest first). Supports cursor-based pagination.","operationId":"getV1ServicesByServiceIdDeployments","parameters":[{"in":"path","name":"serviceId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"foundryVersionId":{"type":"string"},"id":{"type":"string"},"serviceId":{"type":"string"},"type":{"const":"deployment","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","foundryVersionId","id","serviceId","type","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returns the list of deployments."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Service not found."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"List deployments","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/services/string/deployments?cursor=string&limit=100\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/services/string/deployments?cursor=string&limit=100'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/services/string/deployments?cursor=string&limit=100\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/services/string/deployments?cursor=string&limit=100\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/services/string/deployments?cursor=string&limit=100', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/services/string/deployments?cursor=string&limit=100', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/services/string/deployments?cursor=string&limit=100\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/services/string/deployments?cursor=string&limit=100\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/services/string/deployments?cursor=string&limit=100\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"post":{"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 service. 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 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.","operationId":"postV1ServicesByServiceIdDeployments","parameters":[{"in":"path","name":"serviceId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"portMapping":{"properties":{"http":{"anyOf":[{"maximum":65535,"minimum":1,"type":"integer"},{"type":"null"}]}},"type":"object"},"skipCodeUpload":{"type":"boolean"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"foundryVersionId":{"type":"string"},"id":{"type":"string"},"type":{"const":"deployment","type":"string"},"uploadUrl":{"type":["null","string"]},"url":{"format":"uri","type":"string"}},"required":["foundryVersionId","id","type","uploadUrl","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Deployment created."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Service not found, or the service's attached Branch has been deleted."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. `skipCodeUpload` without an active promoted deployment, or the service is not attached to a Branch — env-var resolution requires a Branch)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."},"500":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"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."}},"summary":"Create deployment","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/services/string/deployments\");\nrequest.Content = new StringContent(\"{\\\"portMapping\\\":{\\\"http\\\":0},\\\"skipCodeUpload\\\":true}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/services/string/deployments' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"portMapping\":{\"http\":0},\"skipCodeUpload\":true}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"portMapping\":{\"http\":0},\"skipCodeUpload\":true}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/services/string/deployments\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/services/string/deployments\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"portMapping\\\":{\\\"http\\\":0},\\\"skipCodeUpload\\\":true}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/services/string/deployments', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"portMapping\":{\"http\":0},\"skipCodeUpload\":true}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/services/string/deployments', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"portMapping\\\":{\\\"http\\\":0},\\\"skipCodeUpload\\\":true}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/services/string/deployments\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"portMapping\\\":{\\\"http\\\":0},\\\"skipCodeUpload\\\":true}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/services/string/deployments\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"portMapping\":{\"http\":0},\"skipCodeUpload\":true}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/services/string/deployments\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"portMapping\\\":{\\\"http\\\":0},\\\"skipCodeUpload\\\":true}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/services/{serviceId}/domains":{"get":{"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 service. Domains are aggregated across all deployments since Foundry lists per deployment.","operationId":"getV1ServicesByServiceIdDomains","parameters":[{"in":"path","name":"serviceId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"appId":{"type":"string"},"certExpiresAt":{"format":"date-time","type":["null","string"]},"computeServiceId":{"deprecated":true,"description":"Deprecated: use `appId` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"dnsRecords":{"items":{"properties":{"name":{"type":"string"},"ttl":{"type":["null","number"]},"type":{"const":"CNAME","type":"string"},"value":{"type":"string"}},"required":["name","ttl","type","value"],"type":"object"},"type":"array"},"failureCategory":{"enum":["dns","acme","storage","unknown",null],"type":["null","string"]},"failureReason":{"type":["null","string"]},"foundryStatus":{"type":"string"},"hostname":{"type":"string"},"id":{"type":"string"},"status":{"enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"],"type":"string"},"type":{"const":"custom-domain","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appId","certExpiresAt","computeServiceId","createdAt","dnsRecords","failureCategory","failureReason","foundryStatus","hostname","id","status","type","updatedAt","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"const":false,"type":"boolean"},"nextCursor":{"type":"null"}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"List of custom domains."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Service not found."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit exceeded."}},"summary":"List custom domains for a service","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/services/string/domains\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/services/string/domains'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/services/string/domains\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/services/string/domains\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/services/string/domains', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/services/string/domains', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/services/string/domains\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/services/string/domains\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/services/string/domains\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"post":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nRegisters a custom hostname for the 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).","operationId":"postV1ServicesByServiceIdDomains","parameters":[{"in":"path","name":"serviceId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"hostname":{"maxLength":253,"minLength":1,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z]{2,}$","type":"string"}},"required":["hostname"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appId":{"type":"string"},"certExpiresAt":{"format":"date-time","type":["null","string"]},"computeServiceId":{"deprecated":true,"description":"Deprecated: use `appId` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"dnsRecords":{"items":{"properties":{"name":{"type":"string"},"ttl":{"type":["null","number"]},"type":{"const":"CNAME","type":"string"},"value":{"type":"string"}},"required":["name","ttl","type","value"],"type":"object"},"type":"array"},"failureCategory":{"enum":["dns","acme","storage","unknown",null],"type":["null","string"]},"failureReason":{"type":["null","string"]},"foundryStatus":{"type":"string"},"hostname":{"type":"string"},"id":{"type":"string"},"status":{"enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"],"type":"string"},"type":{"const":"custom-domain","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appId","certExpiresAt","computeServiceId","createdAt","dnsRecords","failureCategory","failureReason","foundryStatus","hostname","id","status","type","updatedAt","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Custom domain already registered on this service."},"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appId":{"type":"string"},"certExpiresAt":{"format":"date-time","type":["null","string"]},"computeServiceId":{"deprecated":true,"description":"Deprecated: use `appId` instead.","type":"string"},"createdAt":{"format":"date-time","type":"string"},"dnsRecords":{"items":{"properties":{"name":{"type":"string"},"ttl":{"type":["null","number"]},"type":{"const":"CNAME","type":"string"},"value":{"type":"string"}},"required":["name","ttl","type","value"],"type":"object"},"type":"array"},"failureCategory":{"enum":["dns","acme","storage","unknown",null],"type":["null","string"]},"failureReason":{"type":["null","string"]},"foundryStatus":{"type":"string"},"hostname":{"type":"string"},"id":{"type":"string"},"status":{"enum":["pending_dns","verifying","verified_routing_blocked","provisioning_tls","active","failed","removing"],"type":"string"},"type":{"const":"custom-domain","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["appId","certExpiresAt","computeServiceId","createdAt","dnsRecords","failureCategory","failureReason","foundryStatus","hostname","id","status","type","updatedAt","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Custom domain created."},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid hostname or DNS verification failed."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Service not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Hostname already registered."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Service has no promoted deployment."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Domain quota exceeded or rate limit exceeded."}},"summary":"Create a custom domain","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/services/string/domains\");\nrequest.Content = new StringContent(\"{\\\"hostname\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/services/string/domains' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"hostname\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"hostname\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/services/string/domains\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/services/string/domains\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"hostname\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/services/string/domains', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"hostname\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/services/string/domains', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"hostname\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/services/string/domains\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"hostname\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/services/string/domains\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"hostname\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/services/string/domains\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"hostname\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/services/{serviceId}/promote":{"post":{"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 service's stable endpoint. The deployment must be running. Returns the service endpoint domain.","operationId":"postV1ServicesByServiceIdPromote","parameters":[{"in":"path","name":"serviceId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"deploymentId":{"pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"versionId":{"deprecated":true,"description":"Deprecated: use `deploymentId` instead. Ignored when `deploymentId` is also present.","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appEndpointDomain":{"type":"string"},"reassignedDomains":{"type":"number"}},"required":["appEndpointDomain","reassignedDomains"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Deployment promoted to service endpoint. The `reassignedDomains` field indicates how many custom domains were moved from the previously-promoted deployment to the new one."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Service or deployment not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The deployment is not running."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. malformed service ID or missing deployment ID)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit or Compute resource limit exceeded."}},"summary":"Promote deployment","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/services/string/promote\");\nrequest.Content = new StringContent(\"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/services/string/promote' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"deploymentId\":\"string\",\"versionId\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"deploymentId\":\"string\",\"versionId\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/services/string/promote\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/services/string/promote\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/services/string/promote', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"deploymentId\":\"string\",\"versionId\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/services/string/promote', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/services/string/promote\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/services/string/promote\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"deploymentId\":\"string\",\"versionId\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/services/string/promote\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/services/{serviceId}/rollback":{"post":{"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 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 deployment keeps serving with zero downtime. Returns the service endpoint domain.","operationId":"postV1ServicesByServiceIdRollback","parameters":[{"in":"path","name":"serviceId","required":true,"schema":{"pattern":"^(cps_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"deploymentId":{"pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"versionId":{"deprecated":true,"description":"Deprecated: use `deploymentId` instead. Ignored when `deploymentId` is also present.","pattern":"^(cpv_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"appEndpointDomain":{"type":"string"},"reassignedDomains":{"type":"number"}},"required":["appEndpointDomain","reassignedDomains"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Deployment made live behind the service endpoint. The `reassignedDomains` field indicates how many custom domains were moved from the previously-live deployment to the new one."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Insufficient permissions to access this resource."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Service or deployment not found, or the deployment's Foundry artifact no longer exists."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"The deployment cannot be made live (e.g. it has no runnable artifact or is mid-teardown and cannot reach a running state)."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Validation failed (e.g. malformed service ID or missing deployment ID)."},"429":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Rate limit or Compute resource limit exceeded."}},"summary":"Roll a service back to an existing deployment","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/services/string/rollback\");\nrequest.Content = new StringContent(\"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/services/string/rollback' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"deploymentId\":\"string\",\"versionId\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"deploymentId\":\"string\",\"versionId\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/services/string/rollback\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/services/string/rollback\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/services/string/rollback', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"deploymentId\":\"string\",\"versionId\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/services/string/rollback', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/services/string/rollback\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/services/string/rollback\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"deploymentId\":\"string\",\"versionId\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/services/string/rollback\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"deploymentId\\\":\\\"string\\\",\\\"versionId\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/source-repositories":{"get":{"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.","operationId":"getV1Source-repositories","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","required":false,"schema":{"default":100,"description":"Limit for pagination","type":"number"}},{"in":"query","name":"projectId","required":true,"schema":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"defaultBranch":{"type":"string"},"id":{"pattern":"^(srcrepo_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"installationId":{"type":"string"},"isPrivate":{"type":"boolean"},"projectId":{"type":"string"},"provider":{"enum":["github"],"type":"string"},"repoFullName":{"type":"string"},"repoId":{"type":"integer"},"status":{"enum":["active","archived"],"type":"string"},"type":{"const":"source-repository","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","defaultBranch","id","installationId","isPrivate","projectId","provider","repoFullName","repoId","status","type","updatedAt","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"type":"boolean"},"nextCursor":{"type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returned the list of source repositories."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project not found."}},"summary":"List source repositories","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/source-repositories?cursor=string&limit=100&projectId=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/source-repositories?cursor=string&limit=100&projectId=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/source-repositories?cursor=string&limit=100&projectId=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/source-repositories?cursor=string&limit=100&projectId=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/source-repositories?cursor=string&limit=100&projectId=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/source-repositories?cursor=string&limit=100&projectId=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/source-repositories?cursor=string&limit=100&projectId=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/source-repositories?cursor=string&limit=100&projectId=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/source-repositories?cursor=string&limit=100&projectId=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"post":{"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.","operationId":"postV1Source-repositories","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"installationId":{"description":"Optional SCM installation ID to use for linking. When omitted, the API auto-picks the workspace's installation.","pattern":"^(scminstall_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"projectId":{"pattern":"^(proj_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"provider":{"const":"github","type":"string"},"providerRepositoryId":{"exclusiveMinimum":0,"type":"integer"}},"required":["projectId","provider","providerRepositoryId"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"defaultBranch":{"type":"string"},"id":{"pattern":"^(srcrepo_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"installationId":{"type":"string"},"isPrivate":{"type":"boolean"},"projectId":{"type":"string"},"provider":{"enum":["github"],"type":"string"},"repoFullName":{"type":"string"},"repoId":{"type":"integer"},"status":{"enum":["active","archived"],"type":"string"},"type":{"const":"source-repository","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","defaultBranch","id","installationId","isPrivate","projectId","provider","repoFullName","repoId","status","type","updatedAt","url"],"type":"object"},"hint":{"type":"string"}},"required":["data"],"type":"object"}}},"description":"Source repository linked."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"SCM installation is suspended, uninstalled, or actor lacks access."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Project or SCM installation not found."},"409":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Repository or project already linked."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Repository not accessible to the installation."}},"summary":"Link a source repository to a project","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/source-repositories\");\nrequest.Content = new StringContent(\"{\\\"installationId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"provider\\\":\\\"github\\\",\\\"providerRepositoryId\\\":0}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/source-repositories' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"installationId\":\"string\",\"projectId\":\"string\",\"provider\":\"github\",\"providerRepositoryId\":0}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"installationId\":\"string\",\"projectId\":\"string\",\"provider\":\"github\",\"providerRepositoryId\":0}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/source-repositories\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/source-repositories\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"installationId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"provider\\\":\\\"github\\\",\\\"providerRepositoryId\\\":0}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/source-repositories', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"installationId\":\"string\",\"projectId\":\"string\",\"provider\":\"github\",\"providerRepositoryId\":0}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/source-repositories', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"installationId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"provider\\\":\\\"github\\\",\\\"providerRepositoryId\\\":0}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/source-repositories\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"installationId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"provider\\\":\\\"github\\\",\\\"providerRepositoryId\\\":0}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/source-repositories\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"installationId\":\"string\",\"projectId\":\"string\",\"provider\":\"github\",\"providerRepositoryId\":0}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/source-repositories\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"installationId\\\":\\\"string\\\",\\\"projectId\\\":\\\"string\\\",\\\"provider\\\":\\\"github\\\",\\\"providerRepositoryId\\\":0}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/source-repositories/{id}":{"delete":{"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.","operationId":"deleteV1Source-repositoriesById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(srcrepo_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Source repository disconnected."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Source repository not found."}},"summary":"Disconnect a source repository","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/source-repositories/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/source-repositories/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/source-repositories/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/source-repositories/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/source-repositories/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/source-repositories/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/source-repositories/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/source-repositories/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/source-repositories/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"},"get":{"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.","operationId":"getV1Source-repositoriesById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(srcrepo_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"defaultBranch":{"type":"string"},"id":{"pattern":"^(srcrepo_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"installationId":{"type":"string"},"isPrivate":{"type":"boolean"},"projectId":{"type":"string"},"provider":{"enum":["github"],"type":"string"},"repoFullName":{"type":"string"},"repoId":{"type":"integer"},"status":{"enum":["active","archived"],"type":"string"},"type":{"const":"source-repository","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","defaultBranch","id","installationId","isPrivate","projectId","provider","repoFullName","repoId","status","type","updatedAt","url"],"type":"object"},"hint":{"type":"string"}},"required":["data"],"type":"object"}}},"description":"Returned the source repository."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Source repository not found."}},"summary":"Get a source repository","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/source-repositories/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/source-repositories/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/source-repositories/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/source-repositories/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/source-repositories/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/source-repositories/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/source-repositories/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/source-repositories/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/source-repositories/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/workspaces":{"get":{"description":"Returns the list of workspaces the current token can access.","operationId":"getV1Workspaces","parameters":[{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":"string"},"type":{"const":"workspace","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","id","name","type","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returns the list of workspaces the current token can access."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."}},"summary":"Get list of workspaces","tags":["Workspaces"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/workspaces?cursor=string&limit=100\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/workspaces?cursor=string&limit=100'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/workspaces?cursor=string&limit=100\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/workspaces?cursor=string&limit=100\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/workspaces?cursor=string&limit=100', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/workspaces?cursor=string&limit=100', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/workspaces?cursor=string&limit=100\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/workspaces?cursor=string&limit=100\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/workspaces?cursor=string&limit=100\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"description":"⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️\n\nCreates a new free-plan workspace owned by the authenticated user. For agent tokens the workspace is created for the agent's sponsor, and the agent's permission policy treats this as an admin action — under the default policy the sponsor approves it first.","operationId":"postV1Workspaces","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"properties":{"displayName":{"maxLength":100,"minLength":1,"type":"string"}},"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":"string"},"type":{"const":"workspace","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","id","name","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"The created workspace."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"403":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Workspace integration tokens cannot create workspaces; a user-attributable actor is required."},"413":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Request body exceeds this endpoint's size cap."}},"summary":"Create a workspace","tags":["[Experimental]"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/workspaces\");\nrequest.Content = new StringContent(\"{\\\"displayName\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/workspaces' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"displayName\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"displayName\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/workspaces\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/workspaces\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"displayName\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/workspaces', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"displayName\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/workspaces', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"displayName\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/workspaces\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"displayName\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/workspaces\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"displayName\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/workspaces\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"displayName\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-prisma-stability":"experimental"}},"/v1/workspaces/{id}":{"get":{"description":"Returns the workspace with the given ID.","operationId":"getV1WorkspacesById","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"pattern":"^(wksp_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":"string"},"type":{"const":"workspace","type":"string"},"url":{"format":"uri","type":"string"}},"required":["createdAt","id","name","type","url"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Workspace retrieved."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Workspace with the specified ID was not found."}},"summary":"Get workspace","tags":["Workspaces"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/workspaces/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/workspaces/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/workspaces/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/workspaces/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/workspaces/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/workspaces/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/workspaces/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/workspaces/{id}/subscription":{"get":{"description":"Returns subscription information for the workspace with the given ID.","operationId":"getV1WorkspacesByIdSubscription","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"planName":{"type":"string"},"upgradeUrl":{"format":"uri","type":"string"},"usageBlocked":{"type":"boolean"}},"required":["planName","upgradeUrl","usageBlocked"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Workspace subscription retrieved."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Workspace with the specified ID was not found."}},"summary":"Get workspace subscription","tags":["Workspaces"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/workspaces/string/subscription\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/workspaces/string/subscription'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/workspaces/string/subscription\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/workspaces/string/subscription\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string/subscription', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string/subscription', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/workspaces/string/subscription\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/workspaces/string/subscription\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/workspaces/string/subscription\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/workspaces/{workspaceId}/integrations":{"get":{"description":"Returns integrations for the given workspace.","operationId":"getV1WorkspacesByWorkspaceIdIntegrations","parameters":[{"in":"path","name":"workspaceId","required":true,"schema":{"pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Limit for pagination","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"client":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["createdAt","id","name"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"createdByUser":{"properties":{"displayName":{"type":["null","string"]},"email":{"type":"string"},"id":{"type":"string"}},"required":["displayName","email","id"],"type":"object"},"id":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"url":{"format":"uri","type":"string"}},"required":["client","createdAt","createdByUser","id","scopes","url"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returned the integrations for the given workspace ID."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Workspace with the given ID was not found."}},"summary":"Get list of integrations","tags":["Integrations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/workspaces/string/integrations?cursor=string&limit=100\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/workspaces/string/integrations?cursor=string&limit=100'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/workspaces/string/integrations?cursor=string&limit=100\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/workspaces/string/integrations?cursor=string&limit=100\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string/integrations?cursor=string&limit=100', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string/integrations?cursor=string&limit=100', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/workspaces/string/integrations?cursor=string&limit=100\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/workspaces/string/integrations?cursor=string&limit=100\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/workspaces/string/integrations?cursor=string&limit=100\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/workspaces/{workspaceId}/integrations/{clientId}":{"delete":{"description":"Revokes the integration tokens with the given client ID.","operationId":"deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId","parameters":[{"in":"path","name":"clientId","required":true,"schema":{"pattern":"^(itgr_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"workspaceId","required":true,"schema":{"pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Revoked the integration tokens."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Integration with the given client ID was not found."}},"summary":"Revoke integration tokens","tags":["Integrations"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/workspaces/string/integrations/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/workspaces/string/integrations/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/workspaces/string/integrations/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/workspaces/string/integrations/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string/integrations/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string/integrations/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/workspaces/string/integrations/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/workspaces/string/integrations/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/workspaces/string/integrations/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/workspaces/{workspaceId}/service-tokens":{"get":{"description":"Returns the service tokens for the given workspace, newest first.","operationId":"getV1WorkspacesByWorkspaceIdService-tokens","parameters":[{"in":"path","name":"workspaceId","required":true,"schema":{"pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"query","name":"cursor","schema":{"description":"Cursor for pagination","type":["null","string"]}},{"in":"query","name":"limit","schema":{"default":100,"description":"Page size, 1-100","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"createdAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":["null","string"]},"id":{"pattern":"^(itgr_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":"string"},"type":{"const":"serviceToken","type":"string"},"valueHint":{"type":"string"}},"required":["createdAt","id","name","type","valueHint"],"type":"object"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Whether there are more items to paginate","type":"boolean"},"nextCursor":{"description":"Next cursor to continue pagination","type":["null","string"]}},"required":["hasMore","nextCursor"],"type":"object"}},"required":["data","pagination"],"type":"object"}}},"description":"Returns the list of service tokens. Empty when the workspace does not exist or the caller is not a member of it."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."}},"summary":"List service tokens","tags":["Service Tokens"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.prisma.io/v1/workspaces/string/service-tokens?cursor=string&limit=100\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.prisma.io/v1/workspaces/string/service-tokens?cursor=string&limit=100'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.prisma.io/v1/workspaces/string/service-tokens?cursor=string&limit=100\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/workspaces/string/service-tokens?cursor=string&limit=100\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string/service-tokens?cursor=string&limit=100', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string/service-tokens?cursor=string&limit=100', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/workspaces/string/service-tokens?cursor=string&limit=100\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.prisma.io/v1/workspaces/string/service-tokens?cursor=string&limit=100\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/workspaces/string/service-tokens?cursor=string&limit=100\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]},"post":{"description":"Creates a new service token for the given workspace. The `value` field is returned exactly once in this response and is never stored — copy it immediately.","operationId":"postV1WorkspacesByWorkspaceIdService-tokens","parameters":[{"in":"path","name":"workspaceId","required":true,"schema":{"pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"Display name for the service token.","maxLength":256,"minLength":1,"type":"string"}},"required":["name"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"createdAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":["null","string"]},"id":{"pattern":"^(itgr_)([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"},"name":{"type":"string"},"type":{"const":"serviceToken","type":"string"},"value":{"type":"string"},"valueHint":{"type":"string"}},"required":["createdAt","id","name","type","value","valueHint"],"type":"object"}},"required":["data"],"type":"object"}}},"description":"Created a new service token. The token value is returned once in the response body."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Workspace with the given ID was not found."},"422":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Invalid request parameters."}},"summary":"Create service token","tags":["Service Tokens"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.prisma.io/v1/workspaces/string/service-tokens\");\nrequest.Content = new StringContent(\"{\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.prisma.io/v1/workspaces/string/service-tokens' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.prisma.io/v1/workspaces/string/service-tokens\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/workspaces/string/service-tokens\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string/service-tokens', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string/service-tokens', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/workspaces/string/service-tokens\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.prisma.io/v1/workspaces/string/service-tokens\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/workspaces/string/service-tokens\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v1/workspaces/{workspaceId}/service-tokens/{serviceTokenId}":{"delete":{"description":"Revokes the service token with the given ID by deleting it.","operationId":"deleteV1WorkspacesByWorkspaceIdService-tokensByServiceTokenId","parameters":[{"in":"path","name":"workspaceId","required":true,"schema":{"pattern":"^(wksp_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}},{"in":"path","name":"serviceTokenId","required":true,"schema":{"pattern":"^(itgr_)?([cC][^\\s-]{8,}|[a-z0-9]+)$","type":"string"}}],"responses":{"204":{"description":"Deleted the service token successfully."},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Missing or invalid authorization token."},"404":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"}}},"description":"Workspace not found, or the service token does not exist in it."}},"summary":"Delete service token","tags":["Service Tokens"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.prisma.io/v1/workspaces/string/service-tokens/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.prisma.io/v1/workspaces/string/service-tokens/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.prisma.io/v1/workspaces/string/service-tokens/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.prisma.io/v1/workspaces/string/service-tokens/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string/service-tokens/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.prisma.io/v1/workspaces/string/service-tokens/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.prisma.io/v1/workspaces/string/service-tokens/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.prisma.io/v1/workspaces/string/service-tokens/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.prisma.io/v1/workspaces/string/service-tokens/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}}},"security":[{"OAuth2":["offline_access","workspace:admin"]},{"Bearer":[]}],"servers":[{"url":"https://api.prisma.io"}],"tags":[{"name":"Projects"},{"name":"Databases"},{"name":"Databases Connections"},{"name":"Database Backups"},{"name":"Database Usage"},{"name":"Connections"},{"name":"Integrations"},{"name":"Service Tokens"},{"name":"Workspaces"},{"name":"Regions"},{"name":"Misc"},{"description":"Experimental endpoints are in active development and may change at any time without notice.","name":"[Experimental]"}]}