{"openapi":"3.0.0","info":{"version":"2.0.0","title":"Fine-Grained Proxy (FGP) API","description":"Stateless HTTP proxy that adds fine-grained token scoping on top of any API. Zero storage: the token and permission config are encrypted in the URL itself."},"components":{"schemas":{"SaltResponse":{"type":"object","properties":{"salt":{"type":"string"}},"required":["salt"]},"SaltError500":{"type":"object","properties":{"error":{"type":"string","enum":["server_error","internal_error"]},"message":{"type":"string"}},"required":["error","message"]},"DecodeResponse":{"type":"object","properties":{"target":{"type":"string"},"auth":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","enum":["headers"]},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"valueRedacted":{"type":"string"}},"required":["name","valueRedacted"]}}},"required":["type","headers"]},{"type":"object","properties":{"type":{"type":"string","enum":["scalingo-addon"]},"app":{"type":"string","minLength":1,"example":"my-app"},"addonId":{"type":"string","minLength":1,"example":"ad-1111-2222-3333"},"apiUrl":{"type":"string","example":"https://api.osc-fr1.scalingo.com"}},"required":["type","app","addonId"]}],"description":"Auth mode. Structured AuthSpec are returned with every secret redacted (header values)."},"scopes":{"type":"array","items":{"nullable":true}},"ttl":{"type":"number"},"createdAt":{"type":"number"},"version":{"type":"number"},"tokenRedacted":{"type":"string","example":"tk-us-****xxxx","description":"Token with only last 4 chars visible"}},"required":["target","auth","scopes","ttl","createdAt","version","tokenRedacted"]},"DecodeError400":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_body"]},"message":{"type":"string"}},"required":["error","message"]},"DecodeError401":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_credentials"]},"message":{"type":"string"}},"required":["error","message"]},"PayloadTooLargeError":{"type":"object","properties":{"error":{"type":"string","enum":["payload_too_large"]},"message":{"type":"string"}},"required":["error","message"]},"UnsupportedMediaTypeError":{"type":"object","properties":{"error":{"type":"string","enum":["unsupported_media_type"]},"message":{"type":"string"}},"required":["error","message"]},"DecodeError500":{"type":"object","properties":{"error":{"type":"string","enum":["server_error","internal_error"]},"message":{"type":"string"}},"required":["error","message"]},"DecodeBody":{"type":"object","properties":{"blob":{"type":"string","minLength":1,"example":"eyJhbGci..."},"key":{"type":"string","minLength":1,"example":"a7f2c9d4-1234-5678-abcd-ef0123456789"}},"required":["blob","key"]},"ShareEncodeResponse":{"type":"object","properties":{"encoded":{"type":"string"},"url":{"type":"string"}},"required":["encoded","url"]},"ShareEncodeError400":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_body"]},"message":{"type":"string"}},"required":["error","message"]},"InternalError":{"type":"object","properties":{"error":{"type":"string","enum":["internal_error"]},"message":{"type":"string"}},"required":["error","message"]},"ShareEncodeBody":{"type":"object","properties":{"target":{"type":"string","minLength":1,"example":"https://api.osc-fr1.scalingo.com"},"auth":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"type":{"type":"string","enum":["headers"]},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["name","value"]}}},"required":["type","headers"]},{"type":"object","properties":{"type":{"type":"string","enum":["scalingo-addon"]},"app":{"type":"string"},"addonId":{"type":"string"},"apiUrl":{"type":"string"}},"required":["type","app","addonId"]}],"example":"scalingo-exchange"},"scopes":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"methods":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"pattern":{"type":"string"},"bodyFilters":{"type":"array","items":{"type":"object","properties":{"objectPath":{"type":"string","minLength":1},"objectValue":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"value":{"nullable":true}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["wildcard"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["stringwildcard"]},"value":{"type":"string"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["regex"]},"value":{"type":"string"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["and"]},"value":{"type":"array","items":{"nullable":true}}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["not"]},"value":{"nullable":true}},"required":["type"]}]},"minItems":1}},"required":["objectPath","objectValue"],"additionalProperties":false}},"queryFilters":{"type":"array","items":{"type":"object","properties":{"param":{"type":"string","minLength":1},"values":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"value":{"nullable":true}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["wildcard"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["stringwildcard"]},"value":{"type":"string"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["regex"]},"value":{"type":"string"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["and"]},"value":{"type":"array","items":{"nullable":true}}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["not"]},"value":{"nullable":true}},"required":["type"]}]},"minItems":1},"required":{"type":"boolean"}},"required":["param","values"],"additionalProperties":false}}},"required":["methods","pattern"],"additionalProperties":false}]},"minItems":1,"example":["GET:/v1/apps/*"]},"ttl":{"type":"number","example":3600},"test":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"body":{"type":"string"}},"required":["method","path"]}},"required":["target","auth","scopes","ttl"]},"ShareDecodeResponse":{"type":"object","properties":{"target":{"type":"string"},"auth":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"type":{"type":"string","enum":["headers"]},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["name","value"]}}},"required":["type","headers"]},{"type":"object","properties":{"type":{"type":"string","enum":["scalingo-addon"]},"app":{"type":"string"},"addonId":{"type":"string"},"apiUrl":{"type":"string"}},"required":["type","app","addonId"]}]},"scopes":{"type":"array","items":{"nullable":true}},"ttl":{"type":"number"},"test":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"},"body":{"type":"string"}},"required":["method","path"]}},"required":["target","auth","scopes","ttl"]},"ShareDecodeError400":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_body","invalid_encoded"]},"message":{"type":"string"}},"required":["error","message"]},"ShareDecodeBody":{"type":"object","properties":{"encoded":{"type":"string","minLength":1,"maxLength":8192}},"required":["encoded"]},"GenerateResponse":{"type":"object","properties":{"url":{"type":"string","example":"https://fgp.example.com/eyJhbGci.../"},"key":{"type":"string","example":"a7f2c9d4-1234-5678-abcd-ef0123456789"},"blob":{"type":"string","example":"eyJhbGci...","description":"Raw encrypted blob, for use with X-FGP-Blob header mode"}},"required":["url","key","blob"]},"GenerateError400":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_body","blob_too_large","scope_limit_exceeded","auth_limit_exceeded","invalid_key","invalid_target","invalid_scope"]},"message":{"type":"string"}},"required":["error","message"]},"GenerateError500":{"type":"object","properties":{"error":{"type":"string","enum":["server_error","internal_error"]},"message":{"type":"string"}},"required":["error","message"]},"GenerateBody":{"type":"object","properties":{"token":{"type":"string","minLength":1,"example":"tk-us-xxxxxxxxxxxxxxxxxxxxxxxxxxxx","description":"Upstream secret. Required for every auth mode except the headers AuthSpec."},"target":{"type":"string","minLength":1,"example":"https://api.osc-fr1.scalingo.com"},"auth":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"type":{"type":"string","enum":["headers"]},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"example":"X-API-Key"},"value":{"type":"string","minLength":1,"example":"sk-live-xxxxxxxxxxxx"}},"required":["name","value"]},"minItems":1}},"required":["type","headers"]},{"type":"object","properties":{"type":{"type":"string","enum":["scalingo-addon"]},"app":{"type":"string","minLength":1,"example":"my-app"},"addonId":{"type":"string","minLength":1,"example":"ad-1111-2222-3333"},"apiUrl":{"type":"string","example":"https://api.osc-fr1.scalingo.com"}},"required":["type","app","addonId"]}],"example":"scalingo-exchange","description":"Auth mode: bearer, basic, scalingo-exchange, header:{name}, or a structured AuthSpec"},"key":{"type":"string","example":"K7x_qP2mVz9-tRbN4wYsH1jGcE8aLdFu","description":"Client key to use instead of a server-generated one. 24 to 256 printable ASCII characters, no space."},"scopes":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"methods":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"pattern":{"type":"string"},"bodyFilters":{"type":"array","items":{"type":"object","properties":{"objectPath":{"type":"string","minLength":1},"objectValue":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"value":{"nullable":true}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["wildcard"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["stringwildcard"]},"value":{"type":"string"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["regex"]},"value":{"type":"string"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["and"]},"value":{"type":"array","items":{"nullable":true}}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["not"]},"value":{"nullable":true}},"required":["type"]}]},"minItems":1}},"required":["objectPath","objectValue"],"additionalProperties":false}},"queryFilters":{"type":"array","items":{"type":"object","properties":{"param":{"type":"string","minLength":1},"values":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"value":{"nullable":true}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["wildcard"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["stringwildcard"]},"value":{"type":"string"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["regex"]},"value":{"type":"string"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["and"]},"value":{"type":"array","items":{"nullable":true}}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["not"]},"value":{"nullable":true}},"required":["type"]}]},"minItems":1},"required":{"type":"boolean"}},"required":["param","values"],"additionalProperties":false}}},"required":["methods","pattern"],"additionalProperties":false}]},"example":["GET:/v1/apps/*","POST:/v1/apps/my-app/scale"],"description":"List of scopes: string patterns or structured ScopeEntry objects"},"ttl":{"type":"number","example":3600,"description":"Validity duration in seconds. 0 = no expiration"},"name":{"type":"string","example":"Production Scalingo","description":"Human-readable configuration name stored in the blob (optional)"},"logs":{"$ref":"#/components/schemas/LogsConfig"}},"required":["target","auth","scopes","ttl"]},"LogsConfig":{"type":"object","properties":{"enabled":{"type":"boolean"},"detailed":{"type":"boolean"}},"required":["enabled","detailed"],"description":"Enable in-memory logs capture for this blob (optional)"},"ListAppsResponse":{"type":"object","properties":{"apps":{"type":"array","items":{"type":"string"},"example":["my-app","other-app","staging-app"]}},"required":["apps"]},"ListAppsError400":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_body","invalid_target"]},"message":{"type":"string"}},"required":["error","message"]},"ListAppsError401":{"type":"object","properties":{"error":{"type":"string","enum":["token_exchange_failed"]},"message":{"type":"string"}},"required":["error","message"]},"ListAppsError502":{"type":"object","properties":{"error":{"type":"string","enum":["upstream_unreachable","upstream_list_apps_failed"]},"message":{"type":"string"}},"required":["error","message"]},"ListAppsBody":{"type":"object","properties":{"token":{"type":"string","minLength":1,"example":"tk-us-xxxxxxxxxxxxxxxxxxxxxxxxxxxx","description":"Scalingo API token (tk-us-...)"},"target":{"type":"string","example":"https://api.osc-fr1.scalingo.com","description":"Scalingo API URL (defaults to osc-fr1 if omitted)"}},"required":["token"]},"ListAddonsResponse":{"type":"object","properties":{"addons":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"ad-1111-2222-3333","description":"Addon identifier. The only field stored in a blob, as addonId."},"resourceId":{"type":"string","example":"my-db-123","description":"Display-only readable name. Never stored in a blob."},"provider":{"type":"string","example":"PostgreSQL","description":"Display-only. Never stored in a blob."},"plan":{"type":"string","example":"postgresql-starter-512","description":"Display-only. Never stored in a blob."}},"required":["id","resourceId","provider","plan"]},"description":"Addons of the application. Only id reaches a blob: resourceId, provider and plan are display-only."}},"required":["addons"]},"ListAddonsError400":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_body","invalid_target"]},"message":{"type":"string"}},"required":["error","message"]},"ListAddonsError401":{"type":"object","properties":{"error":{"type":"string","enum":["token_exchange_failed"]},"message":{"type":"string"}},"required":["error","message"]},"ListAddonsError404":{"type":"object","properties":{"error":{"type":"string","enum":["app_not_found"]},"message":{"type":"string"}},"required":["error","message"]},"ListAddonsError502":{"type":"object","properties":{"error":{"type":"string","enum":["upstream_unreachable","upstream_list_addons_failed"]},"message":{"type":"string"}},"required":["error","message"]},"ListAddonsBody":{"type":"object","properties":{"token":{"type":"string","minLength":1,"example":"tk-us-xxxxxxxxxxxxxxxxxxxxxxxxxxxx","description":"Scalingo API token (tk-us-...)"},"app":{"type":"string","minLength":1,"example":"my-app","description":"Scalingo application name"},"target":{"type":"string","example":"https://api.osc-fr1.scalingo.com","description":"Scalingo API URL of the region (defaults to osc-fr1 if omitted)"}},"required":["token","app"]},"TestProxyResponse":{"type":"object","properties":{"allowed":{"type":"boolean"},"reason":{"type":"string"},"upstream":{"$ref":"#/components/schemas/UpstreamResponse"}},"required":["allowed"]},"UpstreamResponse":{"type":"object","properties":{"status":{"type":"number"},"body":{"nullable":true}},"required":["status"]},"TestProxyError400":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_body"]},"message":{"type":"string"}},"required":["error","message"]},"TestProxyBody":{"type":"object","properties":{"method":{"type":"string","minLength":1,"example":"GET"},"path":{"type":"string","minLength":1,"example":"/v1/apps/my-app"},"token":{"type":"string","minLength":1,"example":"tk-us-xxxxxxxxxxxxxxxxxxxxxxxxxxxx"},"target":{"type":"string","minLength":1,"example":"https://api.osc-fr1.scalingo.com"},"auth":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"type":{"type":"string","enum":["headers"]},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"example":"X-API-Key"},"value":{"type":"string","minLength":1,"example":"sk-live-xxxxxxxxxxxx"}},"required":["name","value"]},"minItems":1}},"required":["type","headers"]},{"type":"object","properties":{"type":{"type":"string","enum":["scalingo-addon"]},"app":{"type":"string","minLength":1,"example":"my-app"},"addonId":{"type":"string","minLength":1,"example":"ad-1111-2222-3333"},"apiUrl":{"type":"string","example":"https://api.osc-fr1.scalingo.com"}},"required":["type","app","addonId"]}],"example":"scalingo-exchange"},"scopes":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"methods":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"pattern":{"type":"string"},"bodyFilters":{"type":"array","items":{"type":"object","properties":{"objectPath":{"type":"string","minLength":1},"objectValue":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"value":{"nullable":true}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["wildcard"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["stringwildcard"]},"value":{"type":"string"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["regex"]},"value":{"type":"string"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["and"]},"value":{"type":"array","items":{"nullable":true}}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["not"]},"value":{"nullable":true}},"required":["type"]}]},"minItems":1}},"required":["objectPath","objectValue"],"additionalProperties":false}},"queryFilters":{"type":"array","items":{"type":"object","properties":{"param":{"type":"string","minLength":1},"values":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"value":{"nullable":true}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["wildcard"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["stringwildcard"]},"value":{"type":"string"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["regex"]},"value":{"type":"string"}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["and"]},"value":{"type":"array","items":{"nullable":true}}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["not"]},"value":{"nullable":true}},"required":["type"]}]},"minItems":1},"required":{"type":"boolean"}},"required":["param","values"],"additionalProperties":false}}},"required":["methods","pattern"],"additionalProperties":false}]},"minItems":1},"body":{"nullable":true}},"required":["method","path","target","auth","scopes"]}},"parameters":{}},"paths":{"/api/salt":{"get":{"tags":["Configuration"],"summary":"Get server salt","description":"Returns the server salt used for PBKDF2 key derivation.","responses":{"200":{"description":"Server salt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaltResponse"}}}},"500":{"description":"FGP_SALT missing from the environment, or an unhandled exception rendered by the global error handler","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaltError500"}}}}}}},"/api/decode":{"post":{"tags":["Configuration"],"summary":"Decode an FGP blob","description":"Decrypts a blob with the provided client key and returns the config with redacted token.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecodeBody"}}}},"responses":{"200":{"description":"Decoded config with redacted token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecodeResponse"}}}},"400":{"description":"Invalid body (missing or malformed fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecodeError400"}}}},"401":{"description":"Unable to decrypt blob (wrong key or corrupted blob)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecodeError401"}}}},"413":{"description":"Request body exceeds the body size cap of this route","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"415":{"description":"Content-Type is absent or is not application/json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"500":{"description":"Server misconfigured (FGP_SALT missing)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecodeError500"}}}}}}},"/api/share/encode":{"post":{"tags":["Configuration"],"summary":"Encode a public config URL","description":"Compresses a config (without token) into a gzip+base64url string for sharing via ?c= parameter.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareEncodeBody"}}}},"responses":{"200":{"description":"Encoded config and full URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareEncodeResponse"}}}},"400":{"description":"Invalid body (missing or malformed fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareEncodeError400"}}}},"413":{"description":"Request body exceeds the body size cap of this route","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"415":{"description":"Content-Type is absent or is not application/json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"500":{"description":"Unhandled exception, rendered by the global error handler","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}},"/api/share/decode":{"post":{"tags":["Configuration"],"summary":"Decode a public config URL","description":"Decompresses a gzip+base64url encoded config string back to its components.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareDecodeBody"}}}},"responses":{"200":{"description":"Decoded public config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareDecodeResponse"}}}},"400":{"description":"Invalid body or unable to decode the shared config string","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareDecodeError400"}}}},"413":{"description":"Request body exceeds the body size cap of this route","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"415":{"description":"Content-Type is absent or is not application/json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"500":{"description":"Unhandled exception, rendered by the global error handler","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}},"/api/generate":{"post":{"tags":["Configuration"],"summary":"Generate an FGP URL","description":"Server-side encrypted URL generation. Creates a client key, encrypts the blob, returns URL + key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateBody"}}}},"responses":{"200":{"description":"Generated URL and client key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Invalid body, generated blob exceeds 4KB, or scope limits violated (body filters, depth, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateError400"}}}},"413":{"description":"Request body exceeds the body size cap of this route","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"415":{"description":"Content-Type is absent or is not application/json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"500":{"description":"Server misconfigured (FGP_SALT missing)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateError500"}}}}}}},"/api/list-apps":{"post":{"tags":["Scalingo"],"summary":"List Scalingo apps","description":"Scalingo helper: lists apps accessible with the provided token via token exchange.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAppsBody"}}}},"responses":{"200":{"description":"Sorted list of app names","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAppsResponse"}}}},"400":{"description":"Invalid body (missing or malformed fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAppsError400"}}}},"401":{"description":"Scalingo token exchange failed (token invalid or unauthorized)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAppsError401"}}}},"413":{"description":"Request body exceeds the body size cap of this route","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"415":{"description":"Content-Type is absent or is not application/json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"500":{"description":"Unhandled exception, rendered by the global error handler","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"Scalingo API unreachable (fetch throw) or returned a non-ok status when listing apps","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAppsError502"}}}}}}},"/api/list-addons":{"post":{"tags":["Scalingo"],"summary":"List the addons of a Scalingo app","description":"Scalingo helper: lists the addons of an application via token exchange. Returns both addon identifiers (id and resource_id) plus display-only provider and plan.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAddonsBody"}}}},"responses":{"200":{"description":"Addons of the application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAddonsResponse"}}}},"400":{"description":"Invalid body (missing or malformed fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAddonsError400"}}}},"401":{"description":"Scalingo token exchange failed (token invalid or unauthorized)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAddonsError401"}}}},"404":{"description":"The application does not exist on this Scalingo account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAddonsError404"}}}},"413":{"description":"Request body exceeds the body size cap of this route","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"415":{"description":"Content-Type is absent or is not application/json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"500":{"description":"Unhandled exception, rendered by the global error handler","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}},"502":{"description":"Scalingo API unreachable (fetch throw) or returned a non-ok status when listing addons","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAddonsError502"}}}}}}},"/api/test-proxy":{"post":{"tags":["Configuration"],"summary":"Test proxy end-to-end","description":"Checks scopes, authenticates, and forwards a real request to the target API. Returns the upstream response.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestProxyBody"}}}},"responses":{"200":{"description":"Proxy test result with upstream response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestProxyResponse"}}}},"400":{"description":"Invalid body (missing or malformed fields)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestProxyError400"}}}},"413":{"description":"Request body exceeds the body size cap of this route","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLargeError"}}}},"415":{"description":"Content-Type is absent or is not application/json","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsupportedMediaTypeError"}}}},"500":{"description":"Unhandled exception, rendered by the global error handler","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}}}