BellD / DevelopersDocumentation · latest

Control API reference

Source: docs/04-api/control-api/openapi.yaml

Download OpenAPI 3.1 · Authentication, errors, pagination and versioning

Security

{
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "securitySchemes": {
    "bearerAuth": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "JWT"
    }
  }
}

GET /v1/workspaces/{ws}/products/{prod}/environments/{env}/egress

Read outbound declarations, last deployment policy and recently blocked connections

{
  "summary": "Read outbound declarations, last deployment policy and recently blocked connections",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "env",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "preview",
          "staging",
          "production"
        ]
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/EnvironmentEgress"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/products/{prod}/variables

List variables (secret values are never returned)

{
  "summary": "List variables (secret values are never returned)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProductBuildVariables"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PUT /v1/workspaces/{ws}/products/{prod}/variables/{name}

Set a service build variable

{
  "summary": "Set a service build variable",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/BuildVariableRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProductVariable"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/products/{prod}/variables/{name}

Delete a variable (production requires owner/admin)

{
  "summary": "Delete a variable (production requires owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Variable deleted"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/products/{prod}/environments/{env}/variables

List variables (secret values are never returned)

{
  "summary": "List variables (secret values are never returned)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "env",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "preview",
          "staging",
          "production"
        ]
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProductVariables"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PUT /v1/workspaces/{ws}/products/{prod}/environments/{env}/variables/{name}

Set an environment variable (production requires owner/admin)

{
  "summary": "Set an environment variable (production requires owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "env",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "preview",
          "staging",
          "production"
        ]
      }
    },
    {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/EnvironmentVariableRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProductVariable"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/products/{prod}/environments/{env}/variables/{name}

Delete a variable (production requires owner/admin)

{
  "summary": "Delete a variable (production requires owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "env",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "preview",
          "staging",
          "production"
        ]
      }
    },
    {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Variable deleted"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/apps/{app}/variables

List variables (secret values are never returned)

{
  "summary": "List variables (secret values are never returned)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AppVariables"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PUT /v1/workspaces/{ws}/apps/{app}/variables/{name}

Set an App build variable

{
  "summary": "Set an App build variable",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AppBuildVariableRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AppVariable"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/apps/{app}/variables/{name}

Delete a variable (production requires owner/admin)

{
  "summary": "Delete a variable (production requires owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Variable deleted"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/apps/{app}/environments/{env}/variables

List variables (secret values are never returned)

{
  "summary": "List variables (secret values are never returned)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "env",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "preview",
          "staging",
          "production"
        ]
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AppVariables"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PUT /v1/workspaces/{ws}/apps/{app}/environments/{env}/variables/{name}

Set an environment variable (production requires owner/admin)

{
  "summary": "Set an environment variable (production requires owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "env",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "preview",
          "staging",
          "production"
        ]
      }
    },
    {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AppEnvironmentVariableRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AppVariable"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/apps/{app}/environments/{env}/variables/{name}

Delete a variable (production requires owner/admin)

{
  "summary": "Delete a variable (production requires owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "env",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "preview",
          "staging",
          "production"
        ]
      }
    },
    {
      "name": "name",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Variable deleted"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/members

List WorkspaceMembers

{
  "summary": "List WorkspaceMembers",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/WorkspaceMembers"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PATCH /v1/workspaces/{ws}/members/{usr}

Change a workspace member role (human owner/admin)

{
  "summary": "Change a workspace member role (human owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "usr",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^usr_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MemberRoleRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/WorkspaceMember"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/members/{usr}

Remove a workspace member (human owner/admin)

{
  "summary": "Remove a workspace member (human owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "usr",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^usr_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Member removed"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/invitations

List MemberInvitations

{
  "summary": "List MemberInvitations",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/MemberInvitations"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/invitations

Invite a workspace member by email (human owner/admin)

{
  "summary": "Invite a workspace member by email (human owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MemberInvitationRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/MemberInvitation"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/invitations/{minv}

Revoke a workspace invitation (human owner/admin)

{
  "summary": "Revoke a workspace invitation (human owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "minv",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^minv_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Invitation revoked"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/accounts/me/invitations

List AccountInvitations

{
  "summary": "List AccountInvitations",
  "parameters": [
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AccountInvitations"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/accounts/me/invitations/{minv}/accept

Accept an invitation matching the verified email

{
  "summary": "Accept an invitation matching the verified email",
  "parameters": [
    {
      "name": "minv",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^minv_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Workspace"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/pending-operations

List pending operations (human owner/admin)

{
  "summary": "List pending operations (human owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "status",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "pending",
          "all"
        ],
        "default": "pending"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PendingOperations"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/pending-operations/{pend}/approve

Approve pending operation (human owner/admin)

{
  "summary": "Approve pending operation (human owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "pend",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^pend_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": false,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PendingDecision"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PendingOperation"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/pending-operations/{pend}/reject

Reject pending operation (human owner/admin)

{
  "summary": "Reject pending operation (human owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "pend",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^pend_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": false,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PendingDecision"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PendingOperation"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/products/{prod}/schedules

List active schedules for the service's staging environment (owner/admin/developer)

{
  "summary": "List active schedules for the service's staging environment (owner/admin/developer)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Schedules"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/products/{prod}/schedule-runs

List schedule runs for the service, newest first (owner/admin/developer)

{
  "summary": "List schedule runs for the service, newest first (owner/admin/developer)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 2048
      }
    },
    {
      "name": "schedule_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ScheduleRuns"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/products/{prod}/inbound-webhooks

Create an inbound webhook for the service's staging environment (owner/admin/developer)

{
  "summary": "Create an inbound webhook for the service's staging environment (owner/admin/developer)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/InboundWebhookCreate"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/InboundWebhookCreated"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  },
  "description": "At most 10 active webhooks per service. github generates a secret, returned only on creation and same-account idempotent replay. standard_webhooks requires a whsec_ prefixed base64 secret decoding to 24–64 bytes and never returns it. The service's deployment is resolved at delivery time."
}

GET /v1/workspaces/{ws}/products/{prod}/inbound-webhooks

List active inbound webhooks without secrets (owner/admin/developer)

{
  "summary": "List active inbound webhooks without secrets (owner/admin/developer)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/InboundWebhooks"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/products/{prod}/inbound-webhooks/{trg}

Delete an inbound webhook; its URL stops accepting deliveries immediately (owner/admin/developer)

{
  "summary": "Delete an inbound webhook; its URL stops accepting deliveries immediately (owner/admin/developer)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "trg",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^trg_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Webhook deleted"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/products/{prod}/inbound-webhook-deliveries

List inbound webhook deliveries for the service, newest first (owner/admin/developer)

{
  "summary": "List inbound webhook deliveries for the service, newest first (owner/admin/developer)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "webhook_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "description": "Opaque base64url JSON cursor for received_at, webhook_id, delivery_key.",
      "schema": {
        "type": "string",
        "maxLength": 2048
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/InboundWebhookDeliveries"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/inbound-webhooks/{trg}

Verify an inbound webhook and forward it to the service's staging deployment

{
  "summary": "Verify an inbound webhook and forward it to the service's staging deployment",
  "security": [],
  "description": "Raw application/json bytes, maximum 1048576 bytes; JSON is never parsed. Rate limit precedes HMAC verification. Standard Webhooks timestamps allow a 300 second difference. Successful deliveries deduplicate; in-flight deliveries return 409 for two minutes; failed deliveries may be retried by the sender. Synchronous forwarding has a 35 second limit including wake-up. Service response headers are limited to content-type and retry-after.",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "trg",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^trg_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Hub-Signature-256",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 71
      }
    },
    {
      "name": "X-GitHub-Event",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      }
    },
    {
      "name": "X-GitHub-Delivery",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      }
    },
    {
      "name": "webhook-id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      }
    },
    {
      "name": "webhook-timestamp",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 32
      }
    },
    {
      "name": "webhook-signature",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 4096
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {}
      }
    }
  },
  "responses": {
    "200": {
      "description": "GitHub ping acknowledged without a delivery record",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/InboundWebhookAcknowledged"
          }
        }
      }
    },
    "202": {
      "description": "Duplicate of a previously successful delivery",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/InboundWebhookAcknowledged"
          }
        }
      }
    },
    "400": {
      "description": "Invalid Content-Type, oversized body or invalid signed delivery identifier",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Missing or invalid signature or timestamp",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Webhook not available",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Delivery in progress or service closure has stopped new access",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "429": {
      "description": "Inbound webhook rate limit exceeded",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "504": {
      "description": "Surface upstream timeout",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "default": {
      "description": "Status and body returned by the service"
    }
  }
}

POST /v1/workspaces/{ws}/products/{prod}/auto-deploy

Enable auto-deploy (owner/admin/developer)

{
  "summary": "Enable auto-deploy (owner/admin/developer)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AutoDeployCreate"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AutoDeployEnabled"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  },
  "description": "Uses the latest repository revision; archive input returns 422, closed/closing service or an enabled hook returns 409. Secret is returned at creation and same-account Idempotency-Key replay only; stored replay metadata never contains plaintext."
}

GET /v1/workspaces/{ws}/products/{prod}/auto-deploy

Get enabled auto-deploy hook without secret (owner/admin/developer)

{
  "summary": "Get enabled auto-deploy hook without secret (owner/admin/developer)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AutoDeployHook"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/products/{prod}/auto-deploy

Disable auto-deploy (owner/admin/developer)

{
  "summary": "Disable auto-deploy (owner/admin/developer)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Hook disabled; re-enabling creates a new hook and secret"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/products/{prod}/auto-deploy:github-app

Enable GitHub App auto-deploy (owner/admin/developer)

{
  "summary": "Enable GitHub App auto-deploy (owner/admin/developer)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AutoDeployCreate"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AutoDeployHook"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "404": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "409": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "422": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    }
  },
  "description": "Uses the latest repository input and its GitHub connection unless credential_id is supplied. Creation and replay never return a secret. When source is github_app, the returned url does not accept pushes (404); delivery uses the platform App webhook."
}

POST /v1/github/app-webhook

Receive GitHub App push deliveries

{
  "summary": "Receive GitHub App push deliveries",
  "security": [],
  "parameters": [
    {
      "name": "X-Hub-Signature-256",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 71
      }
    },
    {
      "name": "X-GitHub-Event",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      }
    },
    {
      "name": "X-GitHub-Delivery",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Ping acknowledged",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AutoDeployAcknowledged"
          }
        }
      }
    },
    "202": {
      "description": "Delivery acknowledged",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AutoDeployAcknowledged"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  },
  "description": "Raw application/json, at most 1048576 bytes. Content type and size errors return 400 before configuration checks. Disabled App or missing platform secrets returns 503 with reason github_app_webhook_unconfigured. Both configured secrets verify raw bytes. Signed malformed JSON or push/delivery fields return 400. Ping returns 200; other events return 202. Valid pushes always acknowledge without disclosing matched hooks or deliveries.",
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "additionalProperties": true
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/products/{prod}/auto-deploy/deliveries

List deliveries across all of the service's hooks, including disabled hooks (owner/admin/developer)

{
  "summary": "List deliveries across all of the service's hooks, including disabled hooks (owner/admin/developer)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "description": "Opaque base64url JSON cursor for received_at, hook_id, delivery_id.",
      "schema": {
        "type": "string",
        "maxLength": 2048
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AutoDeployDeliveries"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/auto-deploy/{hook}/github

Verify GitHub delivery and start a source freeze as the enabler

{
  "summary": "Verify GitHub delivery and start a source freeze as the enabler",
  "security": [],
  "description": "Raw application/json body, maximum 1048576 bytes. Other Content-Types, oversized bodies and malformed signed JSON return 400. Unknown, disabled and foreign-workspace hooks share one 404 problem. Signature uses HMAC-SHA256 of the raw bytes. Ping returns 200 without a record; non-push events return 202 without a record. Push deliveries are deduplicated before authorization and freeze admission. No mainline run is started.",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "hook",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^hook_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "X-Hub-Signature-256",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 71
      }
    },
    {
      "name": "X-GitHub-Event",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      }
    },
    {
      "name": "X-GitHub-Delivery",
      "in": "header",
      "required": false,
      "description": "Required for push events.",
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9-]{1,128}$"
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "additionalProperties": true
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Ping acknowledged without a delivery record",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AutoDeployAcknowledged"
          }
        }
      }
    },
    "202": {
      "description": "Recorded push, duplicate delivery, or ignored event",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AutoDeployWebhookResponse"
          }
        }
      }
    },
    "400": {
      "description": "Non-JSON Content-Type, body over 1 MiB, invalid JSON or invalid push/delivery identifier",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Missing or incorrect GitHub signature",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Hook not available",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/mainline-runs

List MainlineRuns

{
  "summary": "List MainlineRuns",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "product_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/MainlineRuns"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/mainline-runs

Create a mainline run

{
  "summary": "Create a mainline run",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MainlineRunCreate"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/MainlineRun"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/mainline-runs/{mrun}

Get a mainline run

{
  "summary": "Get a mainline run",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "mrun",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^mrun_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/MainlineRun"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/mainline-runs/{mrun}/continue

Continue a stopped mainline run

{
  "summary": "Continue a stopped mainline run",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "mrun",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^mrun_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MainlineRunAction"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/MainlineRun"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/mainline-runs/{mrun}/cancel

Cancel a mainline run

{
  "summary": "Cancel a mainline run",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "mrun",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^mrun_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MainlineRunAction"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/MainlineRun"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/products/{prod}/closure

Request service retirement with 30-day grace (owner)

{
  "summary": "Request service retirement with 30-day grace (owner)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "202": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Closure"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/products/{prod}/closure

Withdraw service retirement before grace ends (owner)

{
  "summary": "Withdraw service retirement before grace ends (owner)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Closure"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/closure

Request workspace closure with 30-day grace (owner)

{
  "summary": "Request workspace closure with 30-day grace (owner)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "202": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Closure"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/closure

Withdraw workspace closure before grace ends (owner)

{
  "summary": "Withdraw workspace closure before grace ends (owner)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Closure"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/accounts/me/closure

Request account closure; sole workspace owners receive conflict with workspace IDs

{
  "summary": "Request account closure; sole workspace owners receive conflict with workspace IDs",
  "parameters": [
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "202": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Closure"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/accounts/me/closure

Withdraw own account closure before grace ends

{
  "summary": "Withdraw own account closure before grace ends",
  "parameters": [
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Closure"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/accounts/me/developer

Become a developer: turn the caller's personal workspace into an owned workspace and grant a one-time signup promo

{
  "summary": "Become a developer: turn the caller's personal workspace into an owned workspace and grant a one-time signup promo",
  "parameters": [
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Workspace"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/audit-records

List workspace audit records

{
  "summary": "List workspace audit records",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
        "default": 50,
        "type": "integer",
        "minimum": 1,
        "maximum": 200
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "action",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "enum": [
          "variable.set",
          "variable.deleted",
          "capability.dev_invoked",
          "inbound_webhook.created",
          "inbound_webhook.deleted",
          "auto_deploy.enabled",
          "auto_deploy.disabled",
          "auto_deploy.triggered",
          "closure.requested",
          "closure.completed",
          "billing.payment_succeeded",
          "billing.payment_failed",
          "billing.refunded",
          "billing.subscription_changed",
          "billing.profile_changed",
          "billing.invoice_issued",
          "billing.granted",
          "billing.adjusted",
          "billing.tier_changed",
          "billing.rate_card_updated",
          "billing.subscription_tier_updated",
          "credential.created",
          "credential.revoked",
          "credential.rotated",
          "binding.requested",
          "binding.ready",
          "binding.failed",
          "binding.revoked",
          "binding.expired",
          "service_identity.created",
          "service_identity.revoked",
          "service_identity.secret_rotated",
          "member.upserted",
          "member.role_changed",
          "member.removed",
          "platform.bootstrapped",
          "platform.outbox_redelivered",
          "platform.outbox_closed",
          "app.forwarding_updated",
          "app.created",
          "app.deleted",
          "app.closure_requested",
          "product.moved",
          "product.created",
          "release.created",
          "deployment.requested",
          "deployment.stop_requested",
          "deployment.ready",
          "deployment.stopped",
          "plan.changed",
          "budget.changed",
          "capability.denied",
          "capability.output_blocked",
          "capability.fallback",
          "capability.usage_unreported",
          "bridge.rejected",
          "usage.denied",
          "access.qualified",
          "access.denied",
          "access.revoked",
          "isolation.unenforced_run",
          "isolation.blocked",
          "pending.resolved",
          "fix.requested",
          "fix.decided",
          "fix.patch_withheld",
          "adjudication.decided",
          "authz.forbidden",
          "authz.workspace_mismatch",
          "audit.exported",
          "managed_resource.kv_restored",
          "audit.retention_deleted"
        ]
      }
    },
    {
      "name": "actor_id",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "target_id",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "correlation_id",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "pattern": "^(brk|rsm|pvar|minv|trg|hook|mrun|mres|ws|app|usr|prod|rev|ver|rel|env|dep|srf|acc|ses|inv|exe|evt|pend|ddl|ntf|pipe|fnd|qual|cred|bind|hdl|cap|svc|frz|adj|fix|upl|dom|wb|ctx|aud|pay|ivc|rfd)_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
      }
    },
    {
      "name": "since",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
      }
    },
    {
      "name": "until",
      "in": "query",
      "required": false,
      "schema": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AuditRecords"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/audit-records/{aud}

Get a visible audit record

{
  "summary": "Get a visible audit record",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "aud",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^aud_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AuditRecord"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/correlations/{evt}/events

Get correlation event headers without payload

{
  "summary": "Get correlation event headers without payload",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "evt",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^evt_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CorrelationEvents"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/domains

List Domains

{
  "summary": "List Domains",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "product_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Domains"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/domains

Create a custom domain (owner/admin)

{
  "summary": "Create a custom domain (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "201": {
      "description": "Domain created",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Domain"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Hostname already bound",
      "content": {
        "application/problem+json": {
          "schema": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "status": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "detail": {
                "type": "string"
              },
              "instance": {
                "type": "string"
              },
              "code": {
                "type": "string",
                "enum": [
                  "domain_hostname_taken",
                  "validation_failed"
                ]
              },
              "correlation_id": {
                "type": "string",
                "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              "reason": {
                "type": "string"
              },
              "errors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "path",
                    "message"
                  ]
                }
              },
              "errors_total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "detail",
              "instance",
              "code",
              "correlation_id"
            ]
          }
        }
      }
    },
    "422": {
      "description": "Validation or domain limit failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "status": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "detail": {
                "type": "string"
              },
              "instance": {
                "type": "string"
              },
              "code": {
                "type": "string",
                "enum": [
                  "domain_limit_exceeded",
                  "validation_failed"
                ]
              },
              "correlation_id": {
                "type": "string",
                "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              "reason": {
                "type": "string"
              },
              "errors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "path",
                    "message"
                  ]
                }
              },
              "errors_total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "detail",
              "instance",
              "code",
              "correlation_id"
            ]
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  },
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "product_id": {
              "type": "string",
              "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "environment_type": {
              "type": "string",
              "enum": [
                "staging",
                "production"
              ]
            },
            "hostname": {
              "type": "string"
            }
          },
          "required": [
            "product_id",
            "environment_type",
            "hostname"
          ]
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/domains/{dom}

Get a custom domain

{
  "summary": "Get a custom domain",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "dom",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^dom_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Domain"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/domains/{dom}

Remove a custom domain (owner/admin)

{
  "summary": "Remove a custom domain (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "dom",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^dom_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Domain removed"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/domains/{dom}/verify

Verify a custom domain (owner/admin)

{
  "summary": "Verify a custom domain (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "dom",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^dom_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "202": {
      "description": "Verification accepted",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Domain"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "429": {
      "description": "Rate limited",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/notifications

List notification delivery status (owner/admin)

{
  "summary": "List notification delivery status (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 2048
      },
      "description": "Opaque cursor. Ordered by created_at descending, then id descending."
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Notifications"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/outbox/dead-letters

List outbox dead letters (owner/admin)

{
  "summary": "List outbox dead letters (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/DeadLetters"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces

List Workspaces

{
  "summary": "List Workspaces",
  "parameters": [
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Workspaces"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/capabilities

List the capability catalog

{
  "summary": "List the capability catalog",
  "parameters": [
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CapabilityCatalog"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/capability-invocations

List CapabilityInvocations

{
  "summary": "List CapabilityInvocations",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "product_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "outcome",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "requested",
          "completed",
          "denied",
          "failed"
        ]
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CapabilityInvocations"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/surfaces

List Surfaces

{
  "summary": "List Surfaces",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "product_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Surfaces"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/products/{prod}

Get a service

{
  "summary": "Get a service",
  "operationId": "getProduct",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Product"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/revisions/{rev}

Get a Revision

{
  "summary": "Get a Revision",
  "operationId": "getRevision",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RevisionDetail"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/apps/{app}/graph

Get an App dependency graph (workspace members, including automation)

{
  "summary": "Get an App dependency graph (workspace members, including automation)",
  "operationId": "getAppGraph",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "environment",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "staging",
          "production"
        ]
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AppGraph"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/apps/{app}/versions

List App versions (workspace members)

{
  "summary": "List App versions (workspace members)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "App versions",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AppVersions"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  },
  "operationId": "listAppVersions",
  "description": "Groups all revisions of the app’s current services by source commit; archive revisions each form a separate version. Pagination is not guaranteed to be stable: versions are grouped at read time and latest_created_at can change. If a group gains a revision (for example, an AI fix) between pages, it can move to the front, causing duplicate or missing groups while paging."
}

GET /v1/workspaces/{ws}/provider-bindings/{bind}/dependents

Get services eligible for or recently using a binding (owner/admin)

{
  "summary": "Get services eligible for or recently using a binding (owner/admin)",
  "operationId": "getBindingDependents",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "bind",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^bind_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/BindingDependents"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/credentials/{cred}/dependents

Get dependents of all bindings for a credential (owner/admin)

{
  "summary": "Get dependents of all bindings for a credential (owner/admin)",
  "operationId": "getCredentialDependents",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "cred",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^cred_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CredentialDependents"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/revisions/{rev}/graph

Get a Revision dependency graph

{
  "summary": "Get a Revision dependency graph",
  "operationId": "getRevisionGraph",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RevisionGraph"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/revisions/{rev}/graph/packages

List Revision dependency packages

{
  "summary": "List Revision dependency packages",
  "operationId": "listRevisionGraphPackages",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      },
      "description": "Opaque next position and package-list SHA-256; a changed list returns 422."
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RevisionGraphPackages"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/revisions/{rev}/draft-descriptor

Get a draft descriptor

{
  "summary": "Get a draft descriptor",
  "operationId": "getDraftDescriptor",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/DraftDescriptor"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  },
  "description": "Read platform detection before confirmation. rev is the input revision ID used by descriptor:confirm; a confirmed revision ID is also accepted. Once confirmed, descriptor and descriptor_hash contain the actual confirmed values; confidence, material_fields_complete and diagnostics describe the original detection."
}

GET /v1/workspaces/{ws}/deployments/{dep}/log

Read a deployment workload log (member; redacted, last 256 KiB)

{
  "summary": "Read a deployment workload log (member; redacted, last 256 KiB)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "dep",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^dep_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/LogContent"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/deployments/{dep}

Get a Deployment

{
  "summary": "Get a Deployment",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "dep",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^dep_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Deployment"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/deployments/{dep}:stop

Stop a staging or production Deployment

{
  "summary": "Stop a staging or production Deployment",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "dep",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^dep_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "202": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Deployment"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/deployments/{dep}:start

Start a stopped staging or production Deployment

{
  "summary": "Start a stopped staging or production Deployment",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "dep",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^dep_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "202": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/DeploymentAccepted"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/deployments

List Deployments

{
  "summary": "List Deployments",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "product_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "revision_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "release_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^rel_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Deployments"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/breakages

List Breakages

{
  "summary": "List Breakages",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "state",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "open",
          "closed"
        ]
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "product_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Breakages"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  },
  "description": "List open and closed breakage episodes for workspace members, ordered by episode_id (opening time). product_id and app_id are mutually exclusive; supplying both returns 422 validation_failed at app_id."
}

GET /v1/workspaces/{ws}/revisions

List Revisions

{
  "summary": "List Revisions",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "product_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Revisions"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/runner/pipeline-runs/{pipe}/build-variables:fetch

Fetch the build variables frozen for a pipeline request

{
  "x-belld-audience": "runner",
  "summary": "Fetch the build variables frozen for a pipeline request",
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "description": "Runner service identity only. Repeatable using the H-016 event id until the run is terminal or the request is more than 24 hours old. No Idempotency-Key is used. Errors: 404 pipeline_run_not_found; 403 request_event_mismatch; 409 build_variables_absent; 410 request_expired; 500 internal when the retained set is missing; 503 unavailable when a dependency is unavailable. Request and response bodies are never logged. All responses use Cache-Control: no-store.",
  "parameters": [
    {
      "name": "pipe",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^pipe_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/BuildVariablesFetchRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Frozen build variables sorted by name byte order",
      "headers": {
        "Cache-Control": {
          "schema": {
            "type": "string",
            "const": "no-store"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/BuildVariablesFetchResponse"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "410": {
      "description": "Request expired",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/runner/deployments/{dep}/secrets:fetch

Fetch runtime and secret variables once for a deployment start

{
  "x-belld-audience": "runner",
  "summary": "Fetch runtime and secret variables once for a deployment start",
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "description": "Runner service identity only. Exchange an H-042 apply or H-113 start event within 30 minutes for runtime and secret variables in this deployment environment. Exactly 30 minutes is accepted. No Idempotency-Key is used. Errors: 404 deployment_not_found; 403 start_event_mismatch; 410 start_expired; 409 start_already_redeemed. Read or decryption failures return 503 unavailable and roll back redemption so the same event can be retried.",
  "parameters": [
    {
      "name": "dep",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^dep_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/RuntimeSecretsFetchRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Runtime and secret variables sorted by name",
      "headers": {
        "Cache-Control": {
          "schema": {
            "type": "string",
            "const": "no-store"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RuntimeSecretsFetchResponse"
          },
          "example": {
            "variables": [
              {
                "name": "…",
                "value": "…"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "410": {
      "description": "Start expired",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/runner/egress-reports

Report a deployment egress usage window

{
  "x-belld-audience": "runner",
  "summary": "Report a deployment egress usage window",
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/EgressReport"
        }
      }
    }
  },
  "responses": {
    "202": {
      "description": "Egress report accepted"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/runner/egress-policy

Read current workspace and Free pool egress caps

{
  "x-belld-audience": "runner",
  "summary": "Read current workspace and Free pool egress caps",
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "responses": {
    "200": {
      "description": "Egress policy",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/EgressPolicy"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/runner/capability-invocations

Invoke a capability for an in-flight runner execution

{
  "x-belld-audience": "runner",
  "summary": "Invoke a capability for an in-flight runner execution",
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/RunnerCapabilityRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "H-361 capability result",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RunnerCapabilityResult"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/dev/capability-invocations

Invoke a capability for the latest revision as a workspace developer

{
  "summary": "Invoke a capability for the latest revision as a workspace developer",
  "parameters": [
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/DevCapabilityRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Unwrapped capability output",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "429": {
      "description": "Rate or workspace budget exhausted",
      "headers": {
        "Retry-After": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/platform/service-identities

Create a platform service identity (ws_platform owner/admin)

{
  "summary": "Create a platform service identity (ws_platform owner/admin)",
  "parameters": [
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PlatformServiceIdentityRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ServiceIdentityCreated"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/platform/service-identities/{svc}

Read platform service identity (ws_platform owner/admin)

{
  "summary": "Read platform service identity (ws_platform owner/admin)",
  "parameters": [
    {
      "name": "svc",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^svc_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ServiceIdentity"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/platform/service-identities/{svc}:revoke

Revoke platform service identity (ws_platform owner/admin)

{
  "summary": "Revoke platform service identity (ws_platform owner/admin)",
  "parameters": [
    {
      "name": "svc",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^svc_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ServiceIdentity"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/service-identities

List ServiceIdentities

{
  "summary": "List ServiceIdentities",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ServiceIdentities"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/service-identities

Create a service identity (owner/admin); provider secret is returned once and omitted on replay

{
  "summary": "Create a service identity (owner/admin); provider secret is returned once and omitted on replay",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/WorkspaceServiceIdentityRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ServiceIdentityCreated"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/service-identities/{svc}

Read service identity metadata (owner/admin)

{
  "summary": "Read service identity metadata (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "svc",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^svc_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ServiceIdentity"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/service-identities/{svc}

Permanently revoke a service identity (owner/admin)

{
  "summary": "Permanently revoke a service identity (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "svc",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^svc_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ServiceIdentity"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/capability-invocations/{cap}

Get a capability invocation and content summaries

{
  "summary": "Get a capability invocation and content summaries",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "cap",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^cap_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CapabilityInvocation"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /healthz

Health check

{
  "summary": "Health check",
  "security": [],
  "parameters": [
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Health"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /readyz

Readiness check

{
  "summary": "Readiness check",
  "security": [],
  "parameters": [
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Ready or degraded",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Readiness"
          }
        }
      }
    },
    "503": {
      "description": "Not ready",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Readiness"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/releases

List Releases

{
  "summary": "List Releases",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "product_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Releases"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/releases

Create and validate a staged Release

{
  "summary": "Create and validate a staged Release",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ReleaseCreateRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Release"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/releases/{rel}

Get a Release

{
  "summary": "Get a Release",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rel",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rel_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Release"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/releases/{rel}/deployments

Deploy a Release to staging

{
  "summary": "Deploy a Release to staging",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rel",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rel_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ReleaseDeploymentRequest"
        }
      }
    }
  },
  "responses": {
    "202": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/DeploymentAccepted"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/products/{prod}/revisions/{rev}/fixes

List fixes for a revision

{
  "summary": "List fixes for a revision",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FixRuns"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/products/{prod}/revisions/{rev}/fixes

Request a fix for a failed build or startup check

{
  "summary": "Request a fix for a failed build or startup check",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/FixRequest"
        }
      }
    }
  },
  "responses": {
    "202": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FixRun"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/products/{prod}/revisions/{rev}/fixes/{fix}

Get fix evidence and reverify status

{
  "summary": "Get fix evidence and reverify status",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "fix",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^fix_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FixRun"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/products/{prod}/revisions/{rev}/fixes/{fix}:approve

Approve a verified patch and create a new revision

{
  "summary": "Approve a verified patch and create a new revision",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "fix",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^fix_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FixRun"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/products/{prod}/revisions/{rev}/fixes/{fix}:reject

Reject a fix candidate

{
  "summary": "Reject a fix candidate",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "fix",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^fix_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FixRun"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/products/{prod}/revisions/{rev}/fixes/{fix}:cancel

Cancel an active fix

{
  "summary": "Cancel an active fix",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "fix",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^fix_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FixRun"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/products/{prod}/revisions/{rev}/fixes/{fix}/patch

Read the original fix patch

{
  "summary": "Read the original fix patch",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "fix",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^fix_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Original patch bytes",
      "content": {
        "text/x-diff": {
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/github-connections:start

Start a GitHub installation connection (owner/admin)

{
  "summary": "Start a GitHub installation connection (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/GitHubConnectionStartRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionStarted"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "404": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "409": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "422": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/github-connections

Connect a GitHub installation (owner/admin)

{
  "summary": "Connect a GitHub installation (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/GitHubConnectionRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Renewed connection",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnection"
          }
        }
      }
    },
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnection"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "404": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "409": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "422": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/github-connections

List GitHub connections (member)

{
  "summary": "List GitHub connections (member)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnections"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "404": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "409": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "422": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/github-connections/{cred}/repositories

List GitHub repositories (member)

{
  "summary": "List GitHub repositories (member)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "cred",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^cred_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
        "type": "integer",
        "minimum": 1,
        "default": 1
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubRepositories"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "404": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "409": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "422": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/github-connections/{cred}/branches

List GitHub repository branches (owner/admin/developer)

{
  "summary": "List GitHub repository branches (owner/admin/developer)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "cred",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^cred_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "repository",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string"
      },
      "description": "GitHub repository in the form owner/name."
    },
    {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
        "type": "integer",
        "minimum": 1,
        "default": 1
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubBranches"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "404": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "409": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "422": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "GitHub connection problem",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/GitHubConnectionProblem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/credentials

List Credentials

{
  "summary": "List Credentials",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Credentials"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/credentials

Register a write-only encrypted credential (owner/admin)

{
  "summary": "Register a write-only encrypted credential (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "anyOf": [
          {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          {
            "type": "string",
            "const": "ws_platform"
          }
        ]
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/CredentialRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Credential"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/credentials/{cred}

Get credential metadata (owner/admin)

{
  "summary": "Get credential metadata (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "cred",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^cred_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Credential"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/credentials/{cred}

Revoke a credential and its active bindings (owner/admin)

{
  "summary": "Revoke a credential and its active bindings (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "cred",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^cred_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CredentialRevoked"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/credentials/{cred}:rotate

Rotate credential secret (owner/admin)

{
  "summary": "Rotate credential secret (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "cred",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^cred_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/CredentialRotateRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Credential"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/managed-resources

Request a managed resource (owner/admin)

{
  "summary": "Request a managed resource (owner/admin)",
  "parameters": [
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ManagedResourceRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Existing resource",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ManagedResource"
          }
        }
      }
    },
    "201": {
      "description": "Created resource",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ManagedResource"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/managed-resources

List managed resources (member)

{
  "summary": "List managed resources (member)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "product_id",
      "in": "query",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "environment_type",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "preview",
          "staging",
          "production"
        ]
      }
    },
    {
      "name": "kind",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "kv"
        ]
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "default": 50
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ManagedResources"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/managed-resources/{mres}

Get a managed resource (member)

{
  "summary": "Get a managed resource (member)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "mres",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^mres_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ManagedResource"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/managed-resources/{mres}

Delete a managed resource (owner/admin)

{
  "summary": "Delete a managed resource (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "mres",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^mres_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Resource deleted"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/managed-resources/{mres}/kv-history

List KV history metadata (member)

{
  "summary": "List KV history metadata (member)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "mres",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^mres_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "key",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/KvHistory"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/managed-resources/{mres}/kv-history:restore

Restore a KV historical value (owner/admin)

{
  "summary": "Restore a KV historical value (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "mres",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^mres_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/KvRestoreRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/KvRestored"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/managed-resources/{mres}/detach

Detach a managed resource (owner/admin)

{
  "summary": "Detach a managed resource (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "mres",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^mres_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ManagedResource"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/managed-resources/{mres}/reattach

Reattach a managed resource (owner/admin)

{
  "summary": "Reattach a managed resource (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "mres",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^mres_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ManagedResource"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/provider-bindings

Create a scoped provider binding (owner/admin)

{
  "summary": "Create a scoped provider binding (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "anyOf": [
          {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          {
            "type": "string",
            "const": "ws_platform"
          }
        ]
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ProviderBindingRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Existing binding",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProviderBinding"
          }
        }
      }
    },
    "201": {
      "description": "Created binding",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProviderBinding"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/provider-bindings

List provider bindings (owner/admin)

{
  "summary": "List provider bindings (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "anyOf": [
          {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          {
            "type": "string",
            "const": "ws_platform"
          }
        ]
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProviderBindings"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/provider-bindings/{bind}

Get a provider binding (owner/admin)

{
  "summary": "Get a provider binding (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "anyOf": [
          {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          {
            "type": "string",
            "const": "ws_platform"
          }
        ]
      }
    },
    {
      "name": "bind",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^bind_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProviderBinding"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/provider-bindings/{bind}

Revoke a provider binding (owner/admin)

{
  "summary": "Revoke a provider binding (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "anyOf": [
          {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          {
            "type": "string",
            "const": "ws_platform"
          }
        ]
      }
    },
    {
      "name": "bind",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^bind_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProviderBinding"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/billing-profile

Get billing profile (owner/admin)

{
  "summary": "Get billing profile (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProfile"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

PUT /v1/workspaces/{ws}/billing-profile

Replace billing profile (owner)

{
  "summary": "Replace billing profile (owner)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/BillingProfileWrite"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProfile"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/wallet/checkout

Checkout topup or subscription upgrade (owner)

{
  "summary": "Checkout topup or subscription upgrade (owner)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PaymentCheckout"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentCheckoutResult"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/wallet/orders

List PaymentOrders

{
  "summary": "List PaymentOrders",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentOrders"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/wallet/orders/{pay}

Get payment order (owner/admin)

{
  "summary": "Get payment order (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "pay",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^pay_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentOrder"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/subscription

Get subscription (owner/admin)

{
  "summary": "Get subscription (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentSubscription"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

PUT /v1/workspaces/{ws}/subscription

Cancel renewal at cycle end; only free accepted (owner)

{
  "summary": "Cancel renewal at cycle end; only free accepted (owner)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PaymentSubscriptionWrite"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentSubscription"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/invoices

List Invoices

{
  "summary": "List Invoices",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Invoices"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

POST /v1/payments/callbacks/{gateway}

Verify gateway callback and settle payment

{
  "summary": "Verify gateway callback and settle payment",
  "security": [],
  "parameters": [
    {
      "name": "gateway",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "newebpay",
          "ecpay"
        ]
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/x-www-form-urlencoded": {
        "schema": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Accepted or replayed",
      "content": {
        "text/plain": {
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

GET /v1/platform/payments/attention

List pending cancellations and refunds (platform administrator)

{
  "summary": "List pending cancellations and refunds (platform administrator)",
  "parameters": [
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentAttention"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

GET /v1/platform/payments/reconciliation

Read monthly payment reconciliation in Asia/Taipei (platform administrator)

{
  "summary": "Read monthly payment reconciliation in Asia/Taipei (platform administrator)",
  "parameters": [
    {
      "name": "month",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentReconciliation"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

POST /v1/platform/payments/mandates/{pay}:mark-cancelled

Mark a pending mandate cancelled after provider confirmation (platform administrator)

{
  "summary": "Mark a pending mandate cancelled after provider confirmation (platform administrator)",
  "parameters": [
    {
      "name": "pay",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^pay_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/MandateCancelled"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

POST /v1/platform/wallets/{ws}/refunds

Manually refund payment (platform administrator)

{
  "summary": "Manually refund payment (platform administrator)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PaymentRefundWrite"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentRefund"
          }
        }
      }
    },
    "400": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "404": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "409": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "422": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Payment operation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/PaymentProblem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/wallet

Get Bell Credit wallet

{
  "summary": "Get Bell Credit wallet",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Wallet"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Wallet or resource not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed or provider default rate missing",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/wallet/transactions

List CreditTransactions

{
  "summary": "List CreditTransactions",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "since",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^rel_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "until",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^rel_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "category",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^rel_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CreditTransactions"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Wallet or resource not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed or provider default rate missing",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/platform/wallets/{ws}/grants

Grant Bell Credit (platform administrator)

{
  "summary": "Grant Bell Credit (platform administrator)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/CreditGrant"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CreditTransaction"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Wallet or resource not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed or provider default rate missing",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PUT /v1/platform/wallets/{ws}/subscription

Set subscription (platform administrator)

{
  "summary": "Set subscription (platform administrator)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/WalletSubscription"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Wallet"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Wallet or resource not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed or provider default rate missing",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/platform/outbox/stuck-deliveries

List stuck external deliveries across workspaces (platform owner/admin)

{
  "summary": "List stuck external deliveries across workspaces (platform owner/admin)",
  "parameters": [
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/StuckDeliveries"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/platform/outbox/stuck-deliveries/{evt}:redeliver

Redeliver a stuck external delivery (platform owner/admin)

{
  "summary": "Redeliver a stuck external delivery (platform owner/admin)",
  "parameters": [
    {
      "name": "evt",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^evt_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/StuckDelivery"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  },
  "description": "Only subscribed external consumers declaring redeliverUnconfirmed support redelivery. Otherwise returns 409 outbox_not_redeliverable: This consumer does not support safe redelivery. Close the delivery instead. Non-stuck or locked deliveries return 404."
}

POST /v1/platform/outbox/stuck-deliveries/{evt}:close

Close a stuck external delivery as failed (platform owner/admin)

{
  "summary": "Close a stuck external delivery as failed (platform owner/admin)",
  "parameters": [
    {
      "name": "evt",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^evt_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PlatformDeadLetter"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/platform/outbox/dead-letters

List dead letters across workspaces (platform owner/admin, read-only)

{
  "summary": "List dead letters across workspaces (platform owner/admin, read-only)",
  "parameters": [
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PlatformDeadLetters"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/platform/north-star

Get daily production north star and staging trial (platform owner/admin)

{
  "summary": "Get daily production north star and staging trial (platform owner/admin)",
  "parameters": [
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/NorthStar"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  },
  "description": "Requests rejected before admission (including exhausted quota, busy services and app_unavailable) have no execution and are not counted as real requests.\n\nThe executions index is created with ordinary CREATE INDEX inside the migration transaction, which blocks writes while it builds. Staging volume is small; a large production table needs separate rollout planning, such as applying this version while the table is still empty.\n\nDeveloper visits and external monitoring are counted as real requests because they cannot be distinguished.\n\nStaging Surfaces are member-only, so staging trial usage mostly comes from developers and webhooks.\n\nBackfilled days use current app membership and closure state. Launch timestamps overwritten before this change cannot be recovered, so staging launch dates may be later than the actual dates."
}

GET /v1/platform/north-star/apps

List daily north star app details (platform owner/admin)

{
  "summary": "List daily north star app details (platform owner/admin)",
  "parameters": [
    {
      "name": "environment",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "production",
          "staging"
        ]
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/NorthStarApps"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  },
  "description": "Requests rejected before admission (including exhausted quota, busy services and app_unavailable) have no execution and are not counted as real requests.\n\nThe executions index is created with ordinary CREATE INDEX inside the migration transaction, which blocks writes while it builds. Staging volume is small; a large production table needs separate rollout planning, such as applying this version while the table is still empty.\n\nDeveloper visits and external monitoring are counted as real requests because they cannot be distinguished.\n\nStaging Surfaces are member-only, so staging trial usage mostly comes from developers and webhooks.\n\nBackfilled days use current app membership and closure state. Launch timestamps overwritten before this change cannot be recovered, so staging launch dates may be later than the actual dates."
}

GET /v1/platform/background-jobs

Get background job status and outbox counts (platform owner/admin)

{
  "summary": "Get background job status and outbox counts (platform owner/admin)",
  "parameters": [
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/BackgroundJobs"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/platform/rate-cards

List RateCards

{
  "summary": "List RateCards",
  "parameters": [
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RateCards"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Wallet or resource not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed or provider default rate missing",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PUT /v1/platform/rate-cards/{provider}/{model}

Append rate card version (platform administrator)

{
  "summary": "Append rate card version (platform administrator)",
  "parameters": [
    {
      "name": "provider",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "model",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/RateCardWrite"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RateCard"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Wallet or resource not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed or provider default rate missing",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/platform/subscription-tiers

List subscription tiers (platform administrator)

{
  "summary": "List subscription tiers (platform administrator)",
  "parameters": [
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SubscriptionTiers"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Wallet or resource not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed or provider default rate missing",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PUT /v1/platform/subscription-tiers/{tier}

Set tier values (platform administrator)

{
  "summary": "Set tier values (platform administrator)",
  "parameters": [
    {
      "name": "tier",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "free",
          "starter",
          "pro"
        ]
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SubscriptionTierWrite"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SubscriptionTier"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Wallet or resource not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed or provider default rate missing",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/BillingProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/plan

Get workspace plan and entitlements

{
  "summary": "Get workspace plan and entitlements",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Plan"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/apps/{app}/budget

Get App monthly budget and current cycle usage

{
  "summary": "Get App monthly budget and current cycle usage",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProductBudget"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PUT /v1/workspaces/{ws}/apps/{app}/budget

Set App monthly Bell Credit cap (owner/admin)

{
  "summary": "Set App monthly Bell Credit cap (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ProductBudgetRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProductBudget"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/products/{prod}/budget

Get app monthly budget and current cycle usage

{
  "summary": "Get app monthly budget and current cycle usage",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProductBudget"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PUT /v1/workspaces/{ws}/products/{prod}/budget

Set app monthly Bell Credit cap (owner/admin)

{
  "summary": "Set app monthly Bell Credit cap (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ProductBudgetRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProductBudget"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/budgets

List current UTC month budgets and usage

{
  "summary": "List current UTC month budgets and usage",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Budgets"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PUT /v1/workspaces/{ws}/budgets/{category}

Set category budget within plan ceiling (owner only)

{
  "summary": "Set category budget within plan ceiling (owner only)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "category",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "ai_tokens",
          "runtime",
          "provider_call",
          "storage"
        ]
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/BudgetRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Budget"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/uploads

Create a ZIP upload URL (15 minute TTL; signed Content-Length, maximum 200 MiB)

{
  "summary": "Create a ZIP upload URL (15 minute TTL; signed Content-Length, maximum 200 MiB)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/UploadRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Upload"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/apps

List Apps

{
  "summary": "List Apps",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Apps"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/apps

Create an App without services (maximum 20 per workspace)

{
  "summary": "Create an App without services (maximum 20 per workspace)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AppCreateRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/App"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/apps/{app}

Get an App and its services

{
  "summary": "Get an App and its services",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AppDetail"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/apps/{app}

Delete an App without services (owner/admin)

{
  "summary": "Delete an App without services (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "204": {
      "description": "App deleted"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/apps/{app}/forwarding

Get App forwarding (workspace members)

{
  "summary": "Get App forwarding (workspace members)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AppForwarding"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

PUT /v1/workspaces/{ws}/apps/{app}/forwarding

Replace App forwarding (owner/admin)

{
  "summary": "Replace App forwarding (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AppForwardingRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AppForwarding"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

DELETE /v1/workspaces/{ws}/apps/{app}/forwarding

Delete App forwarding (owner/admin)

{
  "summary": "Delete App forwarding (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "204": {
      "description": "Forwarding removed (also succeeds when absent)"
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/apps/{app}/closure

Close an App with individual 30-day service retirements (owner)

{
  "summary": "Close an App with individual 30-day service retirements (owner)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "app",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "202": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AppClosure"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/products/{prod}:move

Move an active service to another active App (owner/admin)

{
  "summary": "Move an active service to another active App (owner/admin)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ProductMoveRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Product"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/products

List services

{
  "summary": "List services",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "app_id",
      "in": "query",
      "schema": {
        "type": "string",
        "pattern": "^app_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Products"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/products

Queue a repository or ZIP source freeze

{
  "summary": "Queue a repository or ZIP source freeze",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ProductIntakeRequest"
        }
      }
    }
  },
  "responses": {
    "202": {
      "description": "Source freeze pending",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SourceFreezeAccepted"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Source intake rejected",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SourceIntakeProblem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/subdirectory-scans

Scan repository subdirectories

{
  "summary": "Scan repository subdirectories",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SubdirectoryScanRequest"
        }
      }
    }
  },
  "responses": {
    "202": {
      "description": "Subdirectory scan pending",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^frz_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              "status": {
                "type": "string",
                "const": "pending"
              },
              "links": {
                "type": "object",
                "properties": {
                  "self": {
                    "type": "string"
                  }
                },
                "required": [
                  "self"
                ]
              }
            },
            "required": [
              "id",
              "status",
              "links"
            ]
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/subdirectory-scans/{frz}

Read repository subdirectories

{
  "summary": "Read repository subdirectories",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "frz",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^frz_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SubdirectoryScan"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/source-freezes/{frz}

Read source freeze status

{
  "summary": "Read source freeze status",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "frz",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^frz_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SourceFreeze"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/products/{prod}/revisions/{rev}/descriptor:confirm

Confirm the detected descriptor

{
  "summary": "Confirm the detected descriptor",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "prod",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^prod_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/DescriptorConfirmationRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Revision"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{workspace_id}/revisions/{revision_id}/capability-contract

Get the frozen Capability Contract or rejection

{
  "summary": "Get the frozen Capability Contract or rejection",
  "parameters": [
    {
      "name": "workspace_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "revision_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Contract or rejection",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CapabilityContract"
              },
              {
                "$ref": "#/components/schemas/CapabilityContractRejected"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/revisions/{rev}/evaluations

Return the preview evaluation or request qualification

{
  "summary": "Return the preview evaluation or request qualification",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": false,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/EvaluationRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PipelineRun"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/versions/{ver}

Get a qualified Version

{
  "summary": "Get a qualified Version",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "ver",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ver_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Version"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/revisions/{rev}/versions

List VersionList

{
  "summary": "List VersionList",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 200,
        "default": 50
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "schema": {
        "type": "string",
        "maxLength": 128
      }
    },
    {
      "name": "order",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ],
        "default": "desc"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/VersionList"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/pipeline-runs/{pipe}

Get a Pipeline Run

{
  "summary": "Get a Pipeline Run",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "pipe",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^pipe_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PipelineRun"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/pipeline-runs/{pipe}:cancel

Cancel an active preview or qualification

{
  "summary": "Cancel an active preview or qualification",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "pipe",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^pipe_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PipelineRun"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/pipeline-runs/{pipe}/stages/{stage}/log

Read a pipeline stage log (member; redacted, last 256 KiB)

{
  "summary": "Read a pipeline stage log (member; redacted, last 256 KiB)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "pipe",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^pipe_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "stage",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "build",
          "scan",
          "startup_check"
        ]
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/LogContent"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/pipeline-runs/{pipe}/stages

Get Pipeline Run stages

{
  "summary": "Get Pipeline Run stages",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "pipe",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^pipe_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PipelineStages"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/pipeline-runs/{pipe}/stages/{stage}/log/live

Read a live pipeline stage log tail (member; redacted complete lines)

{
  "summary": "Read a live pipeline stage log tail (member; redacted complete lines)",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "pipe",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^pipe_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "stage",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "build",
          "scan",
          "startup_check"
        ]
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/LiveLogTail"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/workspaces/{ws}/revisions/{rev}/deployments

Ensure and return the automatic preview Deployment

{
  "summary": "Ensure and return the automatic preview Deployment",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "rev",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^rev_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": false,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/EnsureRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Deployment"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/workspaces/{ws}/surfaces/{srf}

Get a Surface

{
  "summary": "Get a Surface",
  "parameters": [
    {
      "name": "ws",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ws_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "srf",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^srf_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Surface"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/surfaces/{srf}/access

Qualify Consumer access to a Surface

{
  "summary": "Qualify Consumer access to a Surface",
  "parameters": [
    {
      "name": "srf",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^srf_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": false,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AccessRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Access"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/sessions

Expose the Session opened by access qualification

{
  "summary": "Expose the Session opened by access qualification",
  "parameters": [
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SessionCreateRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Session"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

POST /v1/sessions/{ses}/invocations

Create a Consumer Invocation

{
  "summary": "Create a Consumer Invocation",
  "parameters": [
    {
      "name": "ses",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ses_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/InvocationCreateRequest"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Invocation"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

GET /v1/sessions/{ses}/invocations/{inv}

Get admission and execution presentation for an Invocation

{
  "summary": "Get admission and execution presentation for an Invocation",
  "parameters": [
    {
      "name": "ses",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^ses_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "inv",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^inv_[0-7][0-9a-hjkmnp-tv-z]{25}$"
      }
    },
    {
      "name": "X-Correlation-Id",
      "in": "header",
      "required": false,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Invocation"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "401": {
      "description": "Unauthenticated",
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "409": {
      "description": "Conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "500": {
      "description": "Internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    },
    "503": {
      "description": "Unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/Problem"
          }
        }
      }
    }
  }
}

Components

securitySchemes

bearerAuth

{
  "type": "http",
  "scheme": "bearer",
  "bearerFormat": "JWT"
}

schemas

ProductMoveRequest

{
  "type": "object",
  "properties": {
    "app_id": {
      "type": "string",
      "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  },
  "required": [
    "app_id"
  ],
  "additionalProperties": false
}

AppClosure

{
  "type": "object",
  "properties": {
    "app_id": {
      "type": "string",
      "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "state": {
      "type": "string",
      "enum": [
        "retiring",
        "retired"
      ]
    },
    "grace_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "product_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
      }
    }
  },
  "required": [
    "app_id",
    "state",
    "grace_until",
    "product_ids"
  ]
}

App

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "name": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "active",
        "retiring",
        "retired"
      ]
    },
    "source_repository_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "service_count": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "created_at": {
      "$ref": "#/$defs/__schema0"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema0"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "name",
    "state",
    "source_repository_url",
    "service_count",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

AppDetail

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "name": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "active",
        "retiring",
        "retired"
      ]
    },
    "source_repository_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "service_count": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "created_at": {
      "$ref": "#/$defs/__schema0"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema0"
    },
    "services": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "closure_state": {
            "type": "string",
            "enum": [
              "active",
              "closure_pending",
              "retired"
            ]
          }
        },
        "required": [
          "product_id",
          "closure_state"
        ]
      }
    }
  },
  "required": [
    "id",
    "workspace_id",
    "name",
    "state",
    "source_repository_url",
    "service_count",
    "created_at",
    "updated_at",
    "services"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

AppCreateRequest

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    }
  },
  "required": [
    "name"
  ]
}

SubdirectoryScanRequest

{
  "type": "object",
  "properties": {
    "repo_url": {
      "type": "string",
      "minLength": 1
    },
    "ref": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "credential_id": {
      "type": "string",
      "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  },
  "required": [
    "repo_url",
    "ref"
  ],
  "additionalProperties": false
}

SubdirectoryScan

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^frz_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "completed",
        "rejected",
        "failed"
      ]
    },
    "repo_url": {
      "type": "string"
    },
    "ref": {
      "type": "string"
    },
    "commit_sha": {
      "type": [
        "string",
        "null"
      ]
    },
    "candidates": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "root_path": {
            "type": "string"
          },
          "lockfile": {
            "type": "string",
            "enum": [
              "subdirectory",
              "repository_root",
              "none"
            ]
          }
        },
        "required": [
          "root_path",
          "lockfile"
        ]
      }
    },
    "truncated": {
      "type": "boolean"
    },
    "problem": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "detail": {
          "type": "string"
        },
        "instance": {
          "type": "string"
        },
        "code": {
          "type": "string",
          "enum": [
            "bad_request",
            "unauthenticated",
            "forbidden",
            "not_found",
            "conflict",
            "validation_failed",
            "rate_limited",
            "internal",
            "unavailable"
          ]
        },
        "correlation_id": {
          "type": "string",
          "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "reason": {
          "type": "string"
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "path"
            ]
          }
        },
        "errors_total": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "title",
        "status",
        "detail",
        "instance",
        "code",
        "correlation_id"
      ]
    }
  },
  "required": [
    "id",
    "status",
    "repo_url",
    "ref",
    "commit_sha",
    "candidates",
    "truncated"
  ]
}

EnvironmentEgress

{
  "type": "object",
  "properties": {
    "environment": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    },
    "deployment_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "revision_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "declared": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string"
          },
          "port": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "host",
          "port"
        ]
      }
    },
    "sent": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "string",
              "const": "deny"
            },
            {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "const": "allowlist"
                },
                "tier": {
                  "type": "string",
                  "enum": [
                    "free",
                    "paid"
                  ]
                },
                "entries": {
                  "minItems": 1,
                  "maxItems": 50,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema0"
                  }
                }
              },
              "required": [
                "mode",
                "entries"
              ],
              "additionalProperties": false
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "open_ports": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 1,
        "maximum": 65535
      }
    },
    "blocked_since": {
      "$ref": "#/$defs/__schema1"
    },
    "blocked": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "sni",
              "dns",
              "shared_front"
            ]
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "last_at": {
            "$ref": "#/$defs/__schema1"
          }
        },
        "required": [
          "domain",
          "kind",
          "count",
          "last_at"
        ]
      }
    }
  },
  "required": [
    "environment",
    "deployment_id",
    "revision_id",
    "declared",
    "sent",
    "open_ports",
    "blocked_since",
    "blocked"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string",
          "maxLength": 253,
          "pattern": "^(\\*\\.)?([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]([a-z0-9-]{0,61}[a-z0-9])?$"
        },
        "port": {
          "type": "integer",
          "minimum": 1,
          "maximum": 65535
        }
      },
      "required": [
        "host",
        "port"
      ],
      "additionalProperties": false
    },
    "__schema1": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

SourceFreezeAccepted

{
  "type": "object",
  "properties": {
    "source_freeze_id": {
      "type": "string",
      "pattern": "^frz_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "status": {
      "type": "string",
      "const": "pending"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string"
        }
      },
      "required": [
        "self"
      ]
    }
  },
  "required": [
    "source_freeze_id",
    "status",
    "product_id",
    "links"
  ]
}

SourceFreeze

{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "frozen",
        "rejected",
        "failed"
      ]
    },
    "provenance": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "repository"
            },
            "repo_url": {
              "type": "string"
            },
            "ref": {
              "type": "string"
            },
            "commit_sha": {
              "type": "string",
              "pattern": "^[0-9a-f]{40}$"
            }
          },
          "required": [
            "kind",
            "repo_url",
            "ref",
            "commit_sha"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "archive"
            },
            "upload_id": {
              "type": "string",
              "pattern": "^upl_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "sha256": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          },
          "required": [
            "kind",
            "upload_id",
            "sha256"
          ]
        }
      ]
    },
    "product": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "workspace_id": {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "type": {
          "type": "string",
          "const": "hosted-app"
        },
        "created_at": {
          "$ref": "#/$defs/__schema0"
        }
      },
      "required": [
        "id",
        "workspace_id",
        "type",
        "created_at"
      ]
    },
    "revision": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "product_id": {
          "type": "string",
          "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "input_type": {
          "type": "string",
          "enum": [
            "repository",
            "archive"
          ]
        },
        "created_at": {
          "$ref": "#/$defs/__schema0"
        }
      },
      "required": [
        "id",
        "product_id",
        "input_type",
        "created_at"
      ]
    },
    "snapshot": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "minLength": 1
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "size_bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "uri",
        "sha256",
        "size_bytes"
      ]
    },
    "replayed": {
      "type": "boolean"
    },
    "rejection": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "size_limit",
                "file_count_limit",
                "depth_limit",
                "file_size_limit",
                "path_length",
                "traversal",
                "symlink_escape",
                "ref_not_found",
                "host_not_allowed",
                "private_source_unsupported",
                "fetch_timeout",
                "fetch_failed",
                "archive_bomb",
                "nested_archive",
                "archive_invalid",
                "upload_mismatch",
                "workspace_unavailable",
                "storage_unavailable",
                "report_missing",
                "internal_error",
                "runner_unavailable"
              ]
            },
            "detail": {
              "type": "object",
              "properties": {
                "actual": {
                  "type": "number"
                },
                "limit": {
                  "type": "number"
                }
              },
              "required": [
                "actual",
                "limit"
              ]
            }
          },
          "required": [
            "code"
          ]
        },
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "const": "credential_in_descriptor"
            },
            "detail": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                }
              },
              "required": [
                "field"
              ]
            }
          },
          "required": [
            "code"
          ]
        }
      ]
    },
    "problem": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "detail": {
          "type": "string"
        },
        "instance": {
          "type": "string"
        },
        "code": {
          "type": "string",
          "enum": [
            "bad_request",
            "unauthenticated",
            "forbidden",
            "not_found",
            "conflict",
            "validation_failed",
            "rate_limited",
            "internal",
            "unavailable"
          ]
        },
        "correlation_id": {
          "type": "string",
          "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "reason": {
          "type": "string"
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "path"
            ]
          }
        },
        "errors_total": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "type",
        "title",
        "status",
        "detail",
        "instance",
        "code",
        "correlation_id"
      ]
    }
  },
  "required": [
    "status"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

SourceIntakeProblem

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "bad_request",
        "unauthenticated",
        "forbidden",
        "not_found",
        "conflict",
        "validation_failed",
        "rate_limited",
        "internal",
        "unavailable"
      ]
    },
    "correlation_id": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "reason": {
      "type": "string"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "path"
        ]
      }
    },
    "errors_total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "type",
    "title",
    "status",
    "detail",
    "instance",
    "code",
    "correlation_id"
  ]
}

ReleaseCreateRequest

{
  "type": "object",
  "properties": {
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "version_id": {
      "type": "string",
      "pattern": "^ver_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "channel": {
      "type": "string",
      "const": "staged"
    },
    "audience": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "internal"
          ]
        }
      },
      "required": [
        "kind"
      ]
    },
    "window": {
      "type": "object",
      "properties": {
        "starts_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "ends_at": {
          "type": "null"
        }
      },
      "required": [
        "starts_at",
        "ends_at"
      ]
    }
  },
  "required": [
    "product_id",
    "version_id",
    "channel",
    "audience",
    "window"
  ]
}

Release

{
  "type": "object",
  "properties": {
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "version_id": {
      "type": "string",
      "pattern": "^ver_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "channel": {
      "type": "string",
      "enum": [
        "preview_internal",
        "staged",
        "production"
      ]
    },
    "audience": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "internal",
            "workspace",
            "custom"
          ]
        }
      },
      "required": [
        "kind"
      ]
    },
    "window": {
      "type": "object",
      "properties": {
        "starts_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "ends_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "starts_at",
        "ends_at"
      ]
    },
    "id": {
      "type": "string",
      "pattern": "^rel_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "ready",
        "live",
        "retired",
        "blocked",
        "pending_approval"
      ]
    },
    "frozen_at": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema0"
        },
        {
          "type": "null"
        }
      ]
    },
    "reason_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "$ref": "#/$defs/__schema0"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema0"
    }
  },
  "required": [
    "product_id",
    "version_id",
    "channel",
    "audience",
    "window",
    "id",
    "workspace_id",
    "status",
    "frozen_at",
    "reason_code",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

ReleaseDeploymentRequest

{
  "type": "object",
  "properties": {
    "environment_type": {
      "default": "staging",
      "type": "string",
      "enum": [
        "staging",
        "production"
      ]
    }
  }
}

ReleaseDeployment

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "pipeline_run_id": {
      "type": "string",
      "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_id": {
      "type": "string",
      "pattern": "^env_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_type": {
      "type": "string",
      "enum": [
        "staging",
        "production"
      ]
    },
    "slot": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "planned",
        "applying",
        "active",
        "superseded",
        "stopped",
        "blocked",
        "failed"
      ]
    },
    "reason_code": {
      "type": "string"
    },
    "required_isolation_profile": {
      "type": "string",
      "const": "isolated-vm"
    },
    "egress": {
      "anyOf": [
        {
          "type": "string",
          "const": "deny"
        },
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "const": "allowlist"
            },
            "tier": {
              "type": "string",
              "enum": [
                "free",
                "paid"
              ]
            },
            "entries": {
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            }
          },
          "required": [
            "mode",
            "entries"
          ],
          "additionalProperties": false
        }
      ]
    },
    "database_check": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "result": {
              "type": "string",
              "const": "unreachable"
            },
            "phase": {
              "type": "string",
              "enum": [
                "dns",
                "no_public_ipv4",
                "connect",
                "timeout"
              ]
            },
            "checked_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "result",
            "phase",
            "checked_at"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "result": {
              "type": "string",
              "const": "blocked"
            },
            "blocked_reason": {
              "type": "string",
              "enum": [
                "not_declared",
                "platform",
                "no_egress"
              ]
            },
            "checked_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "result",
            "blocked_reason",
            "checked_at"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "result": {
              "type": "string",
              "enum": [
                "ok",
                "auth_failed",
                "database_not_found",
                "rejected",
                "invalid_url",
                "tls_unsupported",
                "tls_failed"
              ]
            },
            "checked_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "result",
            "checked_at"
          ],
          "additionalProperties": false
        }
      ]
    },
    "isolation": {
      "type": "object",
      "properties": {
        "profile": {
          "type": "string",
          "const": "isolated-vm"
        },
        "enforced": {
          "type": "boolean"
        }
      },
      "required": [
        "profile",
        "enforced"
      ]
    },
    "health": {
      "type": "object",
      "properties": {
        "checked_at": {
          "$ref": "#/$defs/__schema1"
        },
        "attempts": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "latency_ms": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "observed": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "state": {
                  "type": "string",
                  "enum": [
                    "healthy",
                    "unhealthy",
                    "not_running",
                    "missing",
                    "asleep",
                    "unknown"
                  ]
                },
                "sampled_at": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/__schema1"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_healthy_at": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/__schema1"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "consecutive_failures": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "last_status_code": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "latency_ms": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "exit_code": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason_code": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "http_status",
                        "timeout",
                        "connection_failed",
                        "process_exited",
                        "not_registered",
                        "workload_absent"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "state",
                "sampled_at",
                "last_healthy_at",
                "consecutive_failures",
                "last_status_code",
                "latency_ms",
                "exit_code",
                "reason_code"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "checked_at",
        "attempts",
        "latency_ms",
        "observed"
      ]
    },
    "endpoint": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "address"
      ]
    },
    "superseded_deployment_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "surface_id": {
      "type": "string",
      "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "location": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "line": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "path",
                  "line"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "rule_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "dependency": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "package": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  },
                  "advisory_id": {
                    "type": "string"
                  },
                  "cvss": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "fixed_in": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "package",
                  "version",
                  "advisory_id",
                  "cvss",
                  "fixed_in"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kind",
          "severity",
          "code",
          "message"
        ]
      }
    },
    "created_at": {
      "$ref": "#/$defs/__schema1"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema1"
    },
    "source": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "release"
        },
        "release_id": {
          "type": "string",
          "pattern": "^rel_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "version_id": {
          "type": "string",
          "pattern": "^ver_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        }
      },
      "required": [
        "kind",
        "release_id",
        "version_id"
      ]
    }
  },
  "required": [
    "id",
    "workspace_id",
    "product_id",
    "revision_id",
    "environment_type",
    "slot",
    "status",
    "required_isolation_profile",
    "egress",
    "findings",
    "created_at",
    "updated_at",
    "source"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string",
          "maxLength": 253,
          "pattern": "^(\\*\\.)?([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]([a-z0-9-]{0,61}[a-z0-9])?$"
        },
        "port": {
          "type": "integer",
          "minimum": 1,
          "maximum": 65535
        }
      },
      "required": [
        "host",
        "port"
      ],
      "additionalProperties": false
    },
    "__schema1": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

DeploymentAccepted

{
  "type": "object",
  "properties": {
    "deployment_id": {
      "type": "string",
      "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "status": {
      "type": "string",
      "const": "pending"
    },
    "links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string"
        }
      },
      "required": [
        "self"
      ]
    }
  },
  "required": [
    "deployment_id",
    "status",
    "links"
  ]
}

CapabilityContract

{
  "type": "object",
  "properties": {
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "capabilities": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "const": "ai.generate"
              },
              "required": {
                "$ref": "#/$defs/__schema0"
              },
              "actions": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema1"
                }
              },
              "scope": {
                "type": "object",
                "properties": {
                  "models": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema2"
                    }
                  },
                  "max_tokens_per_call": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "models",
                  "max_tokens_per_call"
                ]
              },
              "credential_owner": {
                "$ref": "#/$defs/__schema3"
              },
              "provider": {
                "$ref": "#/$defs/__schema4"
              }
            },
            "required": [
              "id",
              "required",
              "actions",
              "scope",
              "credential_owner",
              "provider"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "const": "storage.object"
              },
              "required": {
                "$ref": "#/$defs/__schema0"
              },
              "actions": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema5"
                }
              },
              "scope": {
                "type": "object",
                "properties": {
                  "prefix": {
                    "type": "string",
                    "pattern": "^\\/(?!.*\\.\\.).*$"
                  },
                  "max_object_bytes": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "prefix",
                  "max_object_bytes"
                ]
              },
              "credential_owner": {
                "$ref": "#/$defs/__schema3"
              },
              "provider": {
                "$ref": "#/$defs/__schema4"
              }
            },
            "required": [
              "id",
              "required",
              "actions",
              "scope",
              "credential_owner",
              "provider"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "const": "data.kv"
              },
              "required": {
                "$ref": "#/$defs/__schema0"
              },
              "actions": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema6"
                }
              },
              "scope": {
                "type": "object",
                "properties": {
                  "prefix": {
                    "type": "string",
                    "pattern": "^\\/(?!.*\\.\\.).*$"
                  },
                  "max_value_bytes": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 65536
                  },
                  "max_keys": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 100000
                  }
                },
                "required": [
                  "prefix",
                  "max_value_bytes",
                  "max_keys"
                ]
              },
              "credential_owner": {
                "type": "string",
                "const": "platform"
              },
              "provider": {
                "type": "object",
                "properties": {
                  "allow": {
                    "minItems": 1,
                    "maxItems": 1,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema7"
                    }
                  },
                  "prefer": {
                    "type": "string",
                    "const": "platform"
                  },
                  "fallback": {
                    "type": "string",
                    "const": "none"
                  }
                },
                "required": [
                  "allow",
                  "fallback"
                ]
              }
            },
            "required": [
              "id",
              "required",
              "actions",
              "scope",
              "credential_owner",
              "provider"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "const": "email.send"
              },
              "required": {
                "$ref": "#/$defs/__schema0"
              },
              "actions": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema8"
                }
              },
              "scope": {
                "type": "object",
                "properties": {
                  "from_addresses": {
                    "minItems": 1,
                    "maxItems": 32,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema9"
                    }
                  },
                  "recipient_domains": {
                    "minItems": 1,
                    "maxItems": 32,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema10"
                    }
                  },
                  "max_recipients": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50
                  },
                  "max_message_bytes": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1048576
                  }
                },
                "required": [
                  "from_addresses",
                  "recipient_domains",
                  "max_recipients",
                  "max_message_bytes"
                ]
              },
              "credential_owner": {
                "$ref": "#/$defs/__schema3"
              },
              "provider": {
                "$ref": "#/$defs/__schema4"
              }
            },
            "required": [
              "id",
              "required",
              "actions",
              "scope",
              "credential_owner",
              "provider"
            ]
          }
        ]
      }
    },
    "contract_hash": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "confirmed_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "created_at": {
      "$ref": "#/$defs/__schema11"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema11"
    }
  },
  "required": [
    "product_id",
    "revision_id",
    "workspace_id",
    "capabilities",
    "contract_hash",
    "confirmed_at",
    "id",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "boolean"
    },
    "__schema1": {
      "type": "string",
      "enum": [
        "generate"
      ]
    },
    "__schema2": {
      "type": "string",
      "enum": [
        "text",
        "embedding"
      ]
    },
    "__schema3": {
      "type": "string",
      "const": "workspace"
    },
    "__schema4": {
      "type": "object",
      "properties": {
        "allow": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "prefer": {
          "type": "string"
        },
        "fallback": {
          "type": "string",
          "enum": [
            "none",
            "listed"
          ]
        }
      },
      "required": [
        "allow",
        "fallback"
      ]
    },
    "__schema5": {
      "type": "string",
      "enum": [
        "read",
        "write",
        "delete",
        "list"
      ]
    },
    "__schema6": {
      "type": "string",
      "enum": [
        "get",
        "set",
        "delete",
        "list",
        "increment"
      ]
    },
    "__schema7": {
      "type": "string",
      "const": "platform"
    },
    "__schema8": {
      "type": "string",
      "enum": [
        "send"
      ]
    },
    "__schema9": {
      "type": "string",
      "maxLength": 254,
      "pattern": "^(?!.*[A-Z])(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[ !#-[\\]-~]|\\\\[ -~])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
    },
    "__schema10": {
      "type": "string",
      "maxLength": 253,
      "pattern": "^(?:\\*|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$"
    },
    "__schema11": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Plan

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "plan": {
      "type": "string",
      "enum": [
        "free",
        "starter",
        "pro"
      ]
    },
    "entitlements": {
      "type": "object",
      "properties": {
        "ai_tokens": {
          "type": "boolean"
        },
        "runtime": {
          "type": "boolean"
        },
        "provider_call": {
          "type": "boolean"
        },
        "storage": {
          "type": "boolean"
        }
      },
      "required": [
        "ai_tokens",
        "runtime",
        "provider_call",
        "storage"
      ]
    },
    "created_at": {
      "$ref": "#/$defs/__schema0"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema0"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "plan",
    "entitlements",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

BudgetRequest

{
  "type": "object",
  "properties": {
    "limit_units": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "limit_units"
  ]
}

Budget

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "usage_category": {
      "type": "string",
      "enum": [
        "ai_tokens",
        "runtime",
        "provider_call",
        "storage"
      ]
    },
    "month": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}$"
    },
    "limit_units": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema0"
        },
        {
          "type": "null"
        }
      ],
      "description": "Monthly usage limit. For storage, this is the storage transfer limit in bytes."
    },
    "used_units": {
      "type": "number",
      "minimum": 0,
      "description": "Usage in the UTC month. For storage, this is storage transfer in bytes."
    },
    "reserved_units": {
      "type": "number",
      "minimum": 0
    },
    "stored_limit_bytes": {
      "description": "Plan-defined limit in bytes for platform-managed KV data stored, including earlier versions. Only on the storage item; not customizable.",
      "$ref": "#/$defs/__schema1"
    },
    "stored_bytes": {
      "description": "Bytes of platform-managed KV data, including earlier versions (up to 10 per key, kept for 7 days). Only on the storage item.",
      "$ref": "#/$defs/__schema2"
    },
    "created_at": {
      "$ref": "#/$defs/__schema3"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema3"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "usage_category",
    "month",
    "limit_units",
    "used_units",
    "reserved_units",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "number",
      "minimum": 0
    },
    "__schema1": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "__schema2": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "__schema3": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Budgets

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "usage_category": {
            "type": "string",
            "enum": [
              "ai_tokens",
              "runtime",
              "provider_call",
              "storage"
            ]
          },
          "month": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}$"
          },
          "limit_units": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ],
            "description": "Monthly usage limit. For storage, this is the storage transfer limit in bytes."
          },
          "used_units": {
            "type": "number",
            "minimum": 0,
            "description": "Usage in the UTC month. For storage, this is storage transfer in bytes."
          },
          "reserved_units": {
            "type": "number",
            "minimum": 0
          },
          "stored_limit_bytes": {
            "description": "Plan-defined limit in bytes for platform-managed KV data stored, including earlier versions. Only on the storage item; not customizable.",
            "$ref": "#/$defs/__schema1"
          },
          "stored_bytes": {
            "description": "Bytes of platform-managed KV data, including earlier versions (up to 10 per key, kept for 7 days). Only on the storage item.",
            "$ref": "#/$defs/__schema2"
          },
          "created_at": {
            "$ref": "#/$defs/__schema3"
          },
          "updated_at": {
            "$ref": "#/$defs/__schema3"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "usage_category",
          "month",
          "limit_units",
          "used_units",
          "reserved_units",
          "created_at",
          "updated_at"
        ]
      }
    },
    "next_cursor": {
      "type": "null"
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "number",
      "minimum": 0
    },
    "__schema1": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "__schema2": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "__schema3": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Health

{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ok",
        "ready"
      ]
    }
  },
  "required": [
    "status"
  ]
}

ProductIntakeRequest

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "product_id": {
          "type": "string",
          "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "app_id": {
          "type": "string",
          "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "repo_url": {
          "type": "string",
          "minLength": 1
        },
        "root_path": {
          "type": "string",
          "maxLength": 256
        },
        "ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "auth": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "none"
                }
              },
              "required": [
                "kind"
              ]
            }
          ]
        },
        "credential_id": {
          "type": "string",
          "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "product_type": {
          "type": "string",
          "const": "hosted-app"
        },
        "input_type": {
          "type": "string",
          "const": "repository"
        }
      },
      "required": [
        "repo_url",
        "ref",
        "auth"
      ]
    },
    {
      "type": "object",
      "properties": {
        "product_id": {
          "type": "string",
          "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "app_id": {
          "type": "string",
          "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "input_type": {
          "type": "string",
          "const": "archive"
        },
        "archive": {
          "type": "object",
          "properties": {
            "upload_id": {
              "type": "string",
              "pattern": "^upl_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            }
          },
          "required": [
            "upload_id"
          ]
        },
        "product_type": {
          "type": "string",
          "const": "hosted-app"
        }
      },
      "required": [
        "input_type",
        "archive"
      ]
    }
  ]
}

UploadRequest

{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "const": "archive"
    },
    "size_bytes": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 209715200
    },
    "sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    }
  },
  "required": [
    "kind",
    "size_bytes",
    "sha256"
  ]
}

Upload

{
  "type": "object",
  "properties": {
    "upload_id": {
      "type": "string",
      "pattern": "^upl_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "put_url": {
      "type": "string",
      "format": "uri"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "upload_id",
    "put_url",
    "expires_at"
  ]
}

DescriptorConfirmationRequest

{
  "type": "object",
  "properties": {
    "edits": {
      "type": "object",
      "properties": {
        "build_plan": {
          "type": "object",
          "properties": {
            "install": {
              "type": "object",
              "properties": {
                "command": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "command"
              ],
              "additionalProperties": false
            },
            "build": {
              "type": "object",
              "properties": {
                "command": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "command"
              ],
              "additionalProperties": false
            },
            "start": {
              "type": "object",
              "properties": {
                "command": {
                  "type": "string"
                }
              },
              "required": [
                "command"
              ],
              "additionalProperties": false
            },
            "health": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "pattern": "^\\/.*"
                }
              },
              "required": [
                "path"
              ],
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "runtime": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "node"
            },
            "version": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "version"
          ]
        },
        "entrypoint": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string",
              "minLength": 1
            },
            "args": {
              "maxItems": 256,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            }
          },
          "required": [
            "command",
            "args"
          ]
        },
        "ports": {
          "maxItems": 16,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        }
      }
    }
  },
  "$defs": {
    "__schema0": {
      "type": "string"
    },
    "__schema1": {
      "type": "object",
      "properties": {
        "port": {
          "type": "integer",
          "minimum": 1,
          "maximum": 65535
        },
        "protocol": {
          "type": "string",
          "const": "http"
        }
      },
      "required": [
        "port",
        "protocol"
      ]
    }
  }
}

EnsureRequest

{
  "type": "object",
  "properties": {}
}

EvaluationRequest

{
  "type": "object",
  "properties": {
    "intent": {
      "type": "string",
      "enum": [
        "preview",
        "qualification"
      ]
    },
    "rerun": {
      "type": "boolean"
    }
  }
}

AccessRequest

{
  "type": "object",
  "properties": {}
}

SessionCreateRequest

{
  "type": "object",
  "properties": {
    "surface_id": {
      "type": "string",
      "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  },
  "required": [
    "surface_id"
  ]
}

InvocationCreateRequest

{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "const": "http_request"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE",
        "HEAD",
        "OPTIONS"
      ]
    },
    "path": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "pattern": "^\\/[^?#]*$"
    },
    "query_evidence": {
      "$ref": "#/$defs/__schema0"
    },
    "body_evidence": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema0"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "kind",
    "method",
    "path",
    "body_evidence"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "minLength": 1
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "size_bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "uri",
        "sha256",
        "size_bytes"
      ]
    }
  }
}

Product

{
  "type": "object",
  "properties": {
    "app_budget": {
      "type": "object",
      "properties": {
        "app_id": {
          "type": "string",
          "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "monthly_cap_credits": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "settled_credits": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "reserved_credits": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "app_id",
        "monthly_cap_credits",
        "settled_credits",
        "reserved_credits"
      ]
    },
    "app_id": {
      "type": "string",
      "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "root_path": {
      "default": null,
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "type": {
      "type": "string",
      "const": "hosted-app"
    },
    "input_revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "created_at": {
      "$ref": "#/$defs/__schema0"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema0"
    }
  },
  "required": [
    "app_id",
    "id",
    "workspace_id",
    "type",
    "input_revision_id",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Revision

{
  "type": "object",
  "properties": {
    "capability_contract": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "rejected"
        },
        "reason": {
          "type": "string",
          "enum": [
            "unknown_capability",
            "unknown_action",
            "scope_invalid",
            "scope_widened",
            "owner_not_supported",
            "contract_too_large"
          ]
        }
      },
      "required": [
        "status",
        "reason"
      ]
    },
    "id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "input_revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_type": {
      "type": "string",
      "const": "hosted-app"
    },
    "descriptor": {
      "type": "object",
      "properties": {
        "build_plan": {
          "type": "object",
          "properties": {
            "runtime": {
              "$ref": "#/$defs/__schema0"
            },
            "workdir": {
              "$ref": "#/$defs/__schema1"
            },
            "install": {
              "$ref": "#/$defs/__schema2"
            },
            "build": {
              "$ref": "#/$defs/__schema3"
            },
            "start": {
              "$ref": "#/$defs/__schema4"
            },
            "port": {
              "$ref": "#/$defs/__schema5"
            },
            "health": {
              "$ref": "#/$defs/__schema6"
            },
            "env": {
              "$ref": "#/$defs/__schema7"
            }
          },
          "required": [
            "runtime",
            "workdir",
            "install",
            "build",
            "start",
            "port",
            "health",
            "env"
          ]
        },
        "runtime": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "node",
                "shell"
              ]
            },
            "version": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "kind",
            "version"
          ]
        },
        "entrypoint": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "args": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "command",
            "args"
          ]
        },
        "ports": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "port": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "protocol": {
                "type": "string",
                "const": "http"
              }
            },
            "required": [
              "port",
              "protocol"
            ]
          }
        },
        "field_sources": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string",
            "enum": [
              "detected",
              "developer"
            ]
          }
        }
      },
      "required": [
        "runtime",
        "entrypoint",
        "ports",
        "field_sources"
      ]
    },
    "descriptor_hash": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "build_variables_hash": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "confirmed_by": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "created_at": {
      "$ref": "#/$defs/__schema8"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema8"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "product_id",
    "input_revision_id",
    "product_type",
    "descriptor",
    "descriptor_hash",
    "confirmed_by",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "node",
            "shell"
          ]
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "kind",
        "version"
      ]
    },
    "__schema1": {
      "type": "string",
      "pattern": "^\\/.*"
    },
    "__schema2": {
      "type": "object",
      "properties": {
        "package_manager": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "pnpm",
                "npm",
                "yarn"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "command": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "package_manager",
        "command"
      ]
    },
    "__schema3": {
      "type": "object",
      "properties": {
        "command": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "command"
      ]
    },
    "__schema4": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string"
        }
      },
      "required": [
        "command"
      ]
    },
    "__schema5": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65535
    },
    "__schema6": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "pattern": "^\\/.*"
        },
        "timeout_ms": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "path",
        "timeout_ms"
      ]
    },
    "__schema7": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "PORT",
          "NODE_ENV"
        ]
      }
    },
    "__schema8": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

CapabilityContractRejected

{
  "type": "object",
  "properties": {
    "capability_contract": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "rejected"
        },
        "reason": {
          "type": "string",
          "enum": [
            "unknown_capability",
            "unknown_action",
            "scope_invalid",
            "scope_widened",
            "owner_not_supported",
            "contract_too_large"
          ]
        }
      },
      "required": [
        "status",
        "reason"
      ]
    }
  },
  "required": [
    "capability_contract"
  ]
}

PipelineRun

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "intent": {
      "type": "string",
      "enum": [
        "preview",
        "qualification",
        "reassessment",
        "fix_reverify"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "pending_snapshot",
        "authorization_requested",
        "blocked",
        "admitted",
        "requested",
        "reported",
        "completed",
        "failed",
        "passed",
        "warning",
        "unsafe"
      ]
    },
    "reason_code": {
      "type": "string"
    },
    "evidence": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "stage": {
            "type": "string",
            "enum": [
              "build",
              "scan",
              "startup_check"
            ]
          },
          "log_evidence": {
            "type": "object",
            "properties": {
              "uri": {
                "type": "string",
                "minLength": 1
              },
              "sha256": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "size_bytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "uri",
              "sha256",
              "size_bytes"
            ]
          }
        },
        "required": [
          "stage",
          "log_evidence"
        ]
      }
    },
    "qualification": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "qualified",
            "stopped",
            "pending"
          ]
        },
        "reason": {
          "type": "string",
          "enum": [
            "missing_evidence",
            "blocking_findings",
            "verification_blocked"
          ]
        },
        "version_id": {
          "type": "string",
          "pattern": "^ver_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        }
      },
      "required": [
        "status"
      ]
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "location": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "line": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "path",
                  "line"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "rule_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "dependency": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "package": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  },
                  "advisory_id": {
                    "type": "string"
                  },
                  "cvss": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "fixed_in": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "package",
                  "version",
                  "advisory_id",
                  "cvss",
                  "fixed_in"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kind",
          "severity",
          "code",
          "message"
        ]
      }
    },
    "created_at": {
      "$ref": "#/$defs/__schema0"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema0"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "revision_id",
    "intent",
    "status",
    "findings",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

PipelineStages

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "stage": {
            "type": "string",
            "enum": [
              "build",
              "scan",
              "startup_check"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "ok",
              "failed",
              "timed_out",
              "skipped"
            ]
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "exit_code": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "stage",
          "status",
          "duration_ms",
          "exit_code",
          "message"
        ]
      }
    },
    "next_cursor": {
      "type": "null"
    },
    "phase": {
      "type": "string",
      "enum": [
        "queued",
        "preparing",
        "running"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

Version

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^ver_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "qualification_record_id": {
      "type": "string",
      "pattern": "^qual_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "pipeline_run_id": {
      "type": "string",
      "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "descriptor_hash": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "artifact": {
      "type": "object",
      "properties": {
        "uri": {
          "$ref": "#/$defs/__schema0"
        },
        "sha256": {
          "$ref": "#/$defs/__schema1"
        },
        "size_bytes": {
          "$ref": "#/$defs/__schema2"
        },
        "kind": {
          "type": "string",
          "enum": [
            "image",
            "snapshot"
          ]
        }
      },
      "required": [
        "uri",
        "sha256",
        "size_bytes",
        "kind"
      ]
    },
    "evidence": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "stage": {
            "type": "string",
            "enum": [
              "build",
              "scan",
              "startup_check"
            ]
          },
          "log_evidence": {
            "type": "object",
            "properties": {
              "uri": {
                "$ref": "#/$defs/__schema0"
              },
              "sha256": {
                "$ref": "#/$defs/__schema1"
              },
              "size_bytes": {
                "$ref": "#/$defs/__schema2"
              }
            },
            "required": [
              "uri",
              "sha256",
              "size_bytes"
            ]
          }
        },
        "required": [
          "stage",
          "log_evidence"
        ]
      }
    },
    "qualified_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "revision_id",
    "product_id",
    "qualification_record_id",
    "pipeline_run_id",
    "descriptor_hash",
    "evidence",
    "qualified_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "minLength": 1
    },
    "__schema1": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "__schema2": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

Deployment

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "pipeline_run_id": {
      "type": "string",
      "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_id": {
      "type": "string",
      "pattern": "^env_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_type": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    },
    "slot": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "planned",
        "applying",
        "active",
        "superseded",
        "stopped",
        "blocked",
        "failed"
      ]
    },
    "reason_code": {
      "type": "string"
    },
    "required_isolation_profile": {
      "type": "string",
      "const": "isolated-vm"
    },
    "egress": {
      "anyOf": [
        {
          "type": "string",
          "const": "deny"
        },
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "const": "allowlist"
            },
            "tier": {
              "type": "string",
              "enum": [
                "free",
                "paid"
              ]
            },
            "entries": {
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            }
          },
          "required": [
            "mode",
            "entries"
          ],
          "additionalProperties": false
        }
      ]
    },
    "database_check": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "result": {
              "type": "string",
              "const": "unreachable"
            },
            "phase": {
              "type": "string",
              "enum": [
                "dns",
                "no_public_ipv4",
                "connect",
                "timeout"
              ]
            },
            "checked_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "result",
            "phase",
            "checked_at"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "result": {
              "type": "string",
              "const": "blocked"
            },
            "blocked_reason": {
              "type": "string",
              "enum": [
                "not_declared",
                "platform",
                "no_egress"
              ]
            },
            "checked_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "result",
            "blocked_reason",
            "checked_at"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "result": {
              "type": "string",
              "enum": [
                "ok",
                "auth_failed",
                "database_not_found",
                "rejected",
                "invalid_url",
                "tls_unsupported",
                "tls_failed"
              ]
            },
            "checked_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "result",
            "checked_at"
          ],
          "additionalProperties": false
        }
      ]
    },
    "isolation": {
      "type": "object",
      "properties": {
        "profile": {
          "type": "string",
          "const": "isolated-vm"
        },
        "enforced": {
          "type": "boolean"
        }
      },
      "required": [
        "profile",
        "enforced"
      ]
    },
    "health": {
      "type": "object",
      "properties": {
        "checked_at": {
          "$ref": "#/$defs/__schema1"
        },
        "attempts": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "latency_ms": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "observed": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "state": {
                  "type": "string",
                  "enum": [
                    "healthy",
                    "unhealthy",
                    "not_running",
                    "missing",
                    "asleep",
                    "unknown"
                  ]
                },
                "sampled_at": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/__schema1"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_healthy_at": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/__schema1"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "consecutive_failures": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "last_status_code": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "latency_ms": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "exit_code": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason_code": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "http_status",
                        "timeout",
                        "connection_failed",
                        "process_exited",
                        "not_registered",
                        "workload_absent"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "state",
                "sampled_at",
                "last_healthy_at",
                "consecutive_failures",
                "last_status_code",
                "latency_ms",
                "exit_code",
                "reason_code"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "checked_at",
        "attempts",
        "latency_ms",
        "observed"
      ]
    },
    "endpoint": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "address"
      ]
    },
    "superseded_deployment_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "surface_id": {
      "type": "string",
      "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "location": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "line": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "path",
                  "line"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "rule_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "dependency": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "package": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  },
                  "advisory_id": {
                    "type": "string"
                  },
                  "cvss": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "fixed_in": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "package",
                  "version",
                  "advisory_id",
                  "cvss",
                  "fixed_in"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kind",
          "severity",
          "code",
          "message"
        ]
      }
    },
    "created_at": {
      "$ref": "#/$defs/__schema1"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema1"
    },
    "source": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "revision"
            }
          },
          "required": [
            "kind"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "release"
            },
            "release_id": {
              "type": "string",
              "pattern": "^rel_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "version_id": {
              "type": "string",
              "pattern": "^ver_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            }
          },
          "required": [
            "kind",
            "release_id",
            "version_id"
          ]
        }
      ]
    }
  },
  "required": [
    "id",
    "workspace_id",
    "product_id",
    "revision_id",
    "environment_type",
    "slot",
    "status",
    "required_isolation_profile",
    "egress",
    "findings",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string",
          "maxLength": 253,
          "pattern": "^(\\*\\.)?([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]([a-z0-9-]{0,61}[a-z0-9])?$"
        },
        "port": {
          "type": "integer",
          "minimum": 1,
          "maximum": 65535
        }
      },
      "required": [
        "host",
        "port"
      ],
      "additionalProperties": false
    },
    "__schema1": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Surface

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "deployment_id": {
      "type": "string",
      "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_id": {
      "type": "string",
      "pattern": "^env_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_type": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    },
    "surface_type": {
      "type": "string",
      "const": "web"
    },
    "status": {
      "type": "string",
      "enum": [
        "awaiting_expiration_registration",
        "validating",
        "active",
        "expiration_registration_failed",
        "configuration_failed",
        "expired"
      ]
    },
    "reason_code": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "route": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string"
        },
        "path": {
          "type": "string"
        }
      },
      "required": [
        "host",
        "path"
      ]
    },
    "identity_requirement": {
      "type": "string",
      "enum": [
        "none",
        "workspace_member"
      ]
    },
    "access_policy": {
      "type": "string",
      "enum": [
        "preview_direct",
        "workspace_private"
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema0"
        },
        {
          "type": "null"
        }
      ]
    },
    "deadline_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^ddl_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "reachability": {
      "type": "object",
      "properties": {
        "checked_at": {
          "$ref": "#/$defs/__schema0"
        },
        "status_code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "latency_ms": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "checked_at",
        "status_code",
        "latency_ms"
      ]
    },
    "activated_at": {
      "$ref": "#/$defs/__schema0"
    },
    "created_at": {
      "$ref": "#/$defs/__schema0"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema0"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "product_id",
    "deployment_id",
    "environment_id",
    "environment_type",
    "surface_type",
    "status",
    "identity_requirement",
    "access_policy",
    "expires_at",
    "deadline_id",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Access

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^acc_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "account_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "surface_id": {
      "type": "string",
      "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "deployment_id": {
      "type": "string",
      "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "access_entry": {
      "type": "string",
      "const": "direct_surface"
    },
    "entitlement_source": {
      "type": "string",
      "const": "direct"
    },
    "expires_at": {
      "$ref": "#/$defs/__schema0"
    },
    "session_id": {
      "type": "string",
      "pattern": "^ses_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "reused_existing_access": {
      "type": "boolean"
    },
    "created_at": {
      "$ref": "#/$defs/__schema0"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema0"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "account_id",
    "product_id",
    "surface_id",
    "deployment_id",
    "access_entry",
    "entitlement_source",
    "expires_at",
    "reused_existing_access",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Session

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^ses_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "surface_id": {
      "type": "string",
      "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "account_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "access_id": {
      "type": "string",
      "pattern": "^acc_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_id": {
      "type": "string",
      "pattern": "^env_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "state": {
      "type": "string",
      "enum": [
        "active",
        "closed"
      ]
    },
    "closed_at": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema0"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "$ref": "#/$defs/__schema0"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema0"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "product_id",
    "surface_id",
    "account_id",
    "access_id",
    "environment_id",
    "state",
    "closed_at",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Invocation

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^inv_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "session_id": {
      "type": "string",
      "pattern": "^ses_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "surface_id": {
      "type": "string",
      "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "account_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "access_id": {
      "type": "string",
      "pattern": "^acc_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "sequence": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "input": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "http_request"
        },
        "method": {
          "type": "string",
          "enum": [
            "GET",
            "POST",
            "PUT",
            "PATCH",
            "DELETE",
            "HEAD",
            "OPTIONS"
          ]
        },
        "path": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048,
          "pattern": "^\\/[^?#]*$"
        },
        "query_evidence": {
          "$ref": "#/$defs/__schema0"
        },
        "body_evidence": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema0"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "kind",
        "method",
        "path",
        "body_evidence"
      ]
    },
    "admission": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "invocation_id": {
              "$ref": "#/$defs/__schema1"
            },
            "session_id": {
              "$ref": "#/$defs/__schema2"
            },
            "workspace_id": {
              "$ref": "#/$defs/__schema3"
            },
            "product_id": {
              "$ref": "#/$defs/__schema4"
            },
            "surface_id": {
              "$ref": "#/$defs/__schema5"
            },
            "account_id": {
              "$ref": "#/$defs/__schema6"
            },
            "outcome": {
              "$ref": "#/$defs/__schema7"
            },
            "reason": {
              "$ref": "#/$defs/__schema8"
            },
            "execution_id": {
              "$ref": "#/$defs/__schema9"
            },
            "pending_operation_id": {
              "$ref": "#/$defs/__schema10"
            },
            "checks": {
              "$ref": "#/$defs/__schema11"
            },
            "message": {
              "$ref": "#/$defs/__schema13"
            },
            "decided_at": {
              "$ref": "#/$defs/__schema14"
            }
          },
          "required": [
            "invocation_id",
            "session_id",
            "workspace_id",
            "product_id",
            "surface_id",
            "account_id",
            "outcome",
            "reason",
            "execution_id",
            "pending_operation_id",
            "checks",
            "message",
            "decided_at"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "execution": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "execution_id": {
              "$ref": "#/$defs/__schema15"
            },
            "invocation_id": {
              "$ref": "#/$defs/__schema16"
            },
            "session_id": {
              "$ref": "#/$defs/__schema17"
            },
            "workspace_id": {
              "$ref": "#/$defs/__schema18"
            },
            "product_id": {
              "$ref": "#/$defs/__schema19"
            },
            "deployment_id": {
              "$ref": "#/$defs/__schema20"
            },
            "execution_mode": {
              "$ref": "#/$defs/__schema21"
            },
            "status": {
              "$ref": "#/$defs/__schema22"
            },
            "failure": {
              "$ref": "#/$defs/__schema23"
            },
            "result": {
              "$ref": "#/$defs/__schema24"
            },
            "log_evidence": {
              "$ref": "#/$defs/__schema26"
            },
            "usage": {
              "$ref": "#/$defs/__schema27"
            },
            "started_at": {
              "$ref": "#/$defs/__schema28"
            },
            "finished_at": {
              "$ref": "#/$defs/__schema29"
            }
          },
          "required": [
            "execution_id",
            "invocation_id",
            "session_id",
            "workspace_id",
            "product_id",
            "deployment_id",
            "execution_mode",
            "status",
            "failure",
            "result",
            "log_evidence",
            "usage",
            "started_at",
            "finished_at"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "$ref": "#/$defs/__schema30"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema30"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "product_id",
    "session_id",
    "surface_id",
    "account_id",
    "access_id",
    "sequence",
    "input",
    "admission",
    "execution",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "minLength": 1
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "size_bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "uri",
        "sha256",
        "size_bytes"
      ]
    },
    "__schema1": {
      "type": "string",
      "pattern": "^inv_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema2": {
      "type": "string",
      "pattern": "^ses_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema3": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema4": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema5": {
      "type": "string",
      "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema6": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema7": {
      "type": "string",
      "enum": [
        "admitted",
        "denied",
        "pending"
      ]
    },
    "__schema8": {
      "type": "string",
      "enum": [
        "admitted",
        "permission_denied",
        "policy_blocked",
        "binding_unavailable",
        "verification_blocked",
        "usage_denied",
        "rate_limited",
        "pending_consent"
      ]
    },
    "__schema9": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^exe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema10": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^pend_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema11": {
      "minItems": 1,
      "maxItems": 5,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema12"
      }
    },
    "__schema12": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "enum": [
            "permission",
            "policy",
            "binding",
            "verification",
            "usage"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "passed",
            "failed",
            "skipped"
          ]
        }
      },
      "required": [
        "name",
        "status"
      ]
    },
    "__schema13": {
      "type": "string",
      "maxLength": 512
    },
    "__schema14": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema15": {
      "type": "string",
      "pattern": "^exe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema16": {
      "type": "string",
      "pattern": "^inv_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema17": {
      "type": "string",
      "pattern": "^ses_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema18": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema19": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema20": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema21": {
      "type": "string",
      "enum": [
        "managed",
        "remote",
        "bridge"
      ]
    },
    "__schema22": {
      "type": "string",
      "enum": [
        "completed",
        "failed",
        "cancelled",
        "timed_out"
      ]
    },
    "__schema23": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "enum": [
                "product_error",
                "runtime_error",
                "timeout",
                "cancelled",
                "isolation_violation"
              ]
            },
            "message": {
              "type": "string",
              "maxLength": 2048
            }
          },
          "required": [
            "code",
            "message"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema24": {
      "type": "object",
      "properties": {
        "http_status": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            {
              "type": "null"
            }
          ]
        },
        "body_evidence": {
          "anyOf": [
            {
              "$ref": "#/$defs/__schema25"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "http_status",
        "body_evidence"
      ]
    },
    "__schema25": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "minLength": 1
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "size_bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "uri",
        "sha256",
        "size_bytes"
      ]
    },
    "__schema26": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema25"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema27": {
      "type": "object",
      "properties": {
        "duration_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "cpu_ms": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "memory_peak_bytes": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "duration_ms",
        "cpu_ms",
        "memory_peak_bytes"
      ]
    },
    "__schema28": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema29": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema30": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Problem

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "bad_request",
        "unauthenticated",
        "forbidden",
        "not_found",
        "conflict",
        "validation_failed",
        "rate_limited",
        "internal",
        "unavailable",
        "outbox_not_redeliverable",
        "log_not_available"
      ]
    },
    "correlation_id": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "reason": {
      "type": "string"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "message"
        ]
      }
    },
    "errors_total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "issue_class": {
      "type": "string"
    }
  },
  "required": [
    "type",
    "title",
    "status",
    "detail",
    "instance",
    "code",
    "correlation_id"
  ]
}

LogContent

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "workspace_id": {
          "$ref": "#/$defs/__schema0"
        },
        "reported_at": {
          "$ref": "#/$defs/__schema1"
        },
        "stored_size_bytes": {
          "$ref": "#/$defs/__schema2"
        },
        "stored_sha256": {
          "$ref": "#/$defs/__schema3"
        },
        "content": {
          "$ref": "#/$defs/__schema4"
        },
        "content_bytes": {
          "$ref": "#/$defs/__schema5"
        },
        "is_truncated": {
          "$ref": "#/$defs/__schema6"
        },
        "redaction_count": {
          "$ref": "#/$defs/__schema7"
        },
        "source": {
          "type": "string",
          "const": "pipeline_stage"
        },
        "pipeline_run_id": {
          "type": "string",
          "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "stage": {
          "type": "string",
          "enum": [
            "build",
            "scan",
            "startup_check"
          ]
        }
      },
      "required": [
        "workspace_id",
        "reported_at",
        "stored_size_bytes",
        "stored_sha256",
        "content",
        "content_bytes",
        "is_truncated",
        "redaction_count",
        "source",
        "pipeline_run_id",
        "stage"
      ]
    },
    {
      "type": "object",
      "properties": {
        "workspace_id": {
          "$ref": "#/$defs/__schema0"
        },
        "reported_at": {
          "$ref": "#/$defs/__schema1"
        },
        "stored_size_bytes": {
          "$ref": "#/$defs/__schema2"
        },
        "stored_sha256": {
          "$ref": "#/$defs/__schema3"
        },
        "content": {
          "$ref": "#/$defs/__schema4"
        },
        "content_bytes": {
          "$ref": "#/$defs/__schema5"
        },
        "is_truncated": {
          "$ref": "#/$defs/__schema6"
        },
        "redaction_count": {
          "$ref": "#/$defs/__schema7"
        },
        "source": {
          "type": "string",
          "const": "deployment"
        },
        "deployment_id": {
          "type": "string",
          "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        }
      },
      "required": [
        "workspace_id",
        "reported_at",
        "stored_size_bytes",
        "stored_sha256",
        "content",
        "content_bytes",
        "is_truncated",
        "redaction_count",
        "source",
        "deployment_id"
      ]
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema1": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema2": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "__schema3": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "__schema4": {
      "type": "string"
    },
    "__schema5": {
      "type": "integer",
      "minimum": 0,
      "maximum": 262144
    },
    "__schema6": {
      "type": "boolean"
    },
    "__schema7": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

LiveLogTail

{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "pipeline_run_id": {
      "type": "string",
      "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "stage": {
      "type": "string",
      "enum": [
        "build",
        "scan",
        "startup_check"
      ]
    },
    "observed_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "content": {
      "type": "string"
    },
    "content_bytes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "total_bytes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "is_truncated": {
      "type": "boolean"
    },
    "line_in_progress": {
      "type": "boolean"
    },
    "withheld_long_lines": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "withheld_reason": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "too_large",
            "not_streamed"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "redaction_count": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "workspace_id",
    "pipeline_run_id",
    "stage",
    "observed_at",
    "content",
    "content_bytes",
    "total_bytes",
    "is_truncated",
    "line_in_progress",
    "withheld_long_lines",
    "withheld_reason",
    "redaction_count"
  ]
}

VersionList

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^ver_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "revision_id": {
            "type": "string",
            "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "qualification_record_id": {
            "type": "string",
            "pattern": "^qual_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "pipeline_run_id": {
            "type": "string",
            "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "descriptor_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "artifact": {
            "type": "object",
            "properties": {
              "uri": {
                "$ref": "#/$defs/__schema0"
              },
              "sha256": {
                "$ref": "#/$defs/__schema1"
              },
              "size_bytes": {
                "$ref": "#/$defs/__schema2"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "image",
                  "snapshot"
                ]
              }
            },
            "required": [
              "uri",
              "sha256",
              "size_bytes",
              "kind"
            ]
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stage": {
                  "type": "string",
                  "enum": [
                    "build",
                    "scan",
                    "startup_check"
                  ]
                },
                "log_evidence": {
                  "type": "object",
                  "properties": {
                    "uri": {
                      "$ref": "#/$defs/__schema0"
                    },
                    "sha256": {
                      "$ref": "#/$defs/__schema1"
                    },
                    "size_bytes": {
                      "$ref": "#/$defs/__schema2"
                    }
                  },
                  "required": [
                    "uri",
                    "sha256",
                    "size_bytes"
                  ]
                }
              },
              "required": [
                "stage",
                "log_evidence"
              ]
            }
          },
          "qualified_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "revision_id",
          "product_id",
          "qualification_record_id",
          "pipeline_run_id",
          "descriptor_hash",
          "evidence",
          "qualified_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "minLength": 1
    },
    "__schema1": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "__schema2": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

ProductBudgetRequest

{
  "type": "object",
  "properties": {
    "monthly_cap_credits": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "monthly_cap_credits"
  ],
  "additionalProperties": false
}

ProductBudget

{
  "type": "object",
  "properties": {
    "app_id": {
      "type": "string",
      "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "monthly_cap_credits": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "cycle_started_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "cycle_ends_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "settled_credits": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "reserved_credits": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "platform_cost_estimate_credits": {
      "type": "number",
      "const": 0
    },
    "forecast_credits": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "forecast_is_estimate": {
      "type": "boolean",
      "const": true
    },
    "thresholds_reached": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "number",
            "const": 70
          },
          {
            "type": "number",
            "const": 85
          },
          {
            "type": "number",
            "const": 95
          },
          {
            "type": "number",
            "const": 100
          }
        ]
      }
    }
  },
  "required": [
    "app_id",
    "monthly_cap_credits",
    "cycle_started_at",
    "cycle_ends_at",
    "settled_credits",
    "reserved_credits",
    "platform_cost_estimate_credits",
    "forecast_credits",
    "forecast_is_estimate",
    "thresholds_reached"
  ]
}

DevCapabilityRequest

{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "capability_id": {
      "type": "string",
      "minLength": 1
    },
    "action": {
      "type": "string",
      "minLength": 1
    },
    "request": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "input": {},
    "idempotency_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    }
  },
  "required": [
    "workspace_id",
    "product_id",
    "capability_id",
    "action",
    "request",
    "input",
    "idempotency_key"
  ],
  "additionalProperties": false
}

BillingProblem

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "bad_request",
        "unauthenticated",
        "forbidden",
        "not_found",
        "conflict",
        "validation_failed",
        "rate_limited",
        "internal",
        "unavailable",
        "wallet_not_found",
        "rate_card_missing"
      ]
    },
    "correlation_id": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "reason": {
      "type": "string"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "message"
        ]
      }
    },
    "errors_total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "type",
    "title",
    "status",
    "detail",
    "instance",
    "code",
    "correlation_id"
  ]
}

Wallet

{
  "type": "object",
  "properties": {
    "exhausted_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_tier": {
      "type": "string",
      "enum": [
        "free",
        "starter",
        "pro"
      ]
    },
    "cycle_started_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "cycle_ends_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "available_credits": {
      "$ref": "#/$defs/__schema0"
    },
    "reserved_credits": {
      "$ref": "#/$defs/__schema0"
    },
    "arrears_credits": {
      "$ref": "#/$defs/__schema0"
    },
    "buckets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "promo",
              "subscription",
              "purchased"
            ]
          },
          "remaining_credits": {
            "$ref": "#/$defs/__schema0"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kind",
          "remaining_credits",
          "expires_at"
        ]
      }
    }
  },
  "required": [
    "subscription_tier",
    "cycle_started_at",
    "cycle_ends_at",
    "available_credits",
    "reserved_credits",
    "buckets"
  ],
  "$defs": {
    "__schema0": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

CreditTransaction

{
  "type": "object",
  "properties": {
    "product_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "native_units": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema0"
        },
        {
          "type": "null"
        }
      ]
    },
    "unit": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "ms",
            "byte_days",
            "tokens",
            "calls",
            "bytes"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "type": "string",
      "pattern": "^ctx_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "kind": {
      "type": "string",
      "enum": [
        "grant",
        "reserve",
        "settle",
        "release",
        "refund",
        "adjust",
        "cycle_reset"
      ]
    },
    "credits": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "bucket_breakdown": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "integer",
        "minimum": -9007199254740991,
        "maximum": 9007199254740991
      }
    },
    "usage_category": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "ai_tokens",
            "runtime",
            "storage",
            "provider_call"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "subject_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "evidence_key": {
      "type": [
        "string",
        "null"
      ]
    },
    "rate_card_version": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "actor": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "usr"
            },
            "id": {
              "type": "string",
              "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            }
          },
          "required": [
            "kind",
            "id"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "system"
            },
            "id": {
              "type": "string",
              "const": "platform"
            }
          },
          "required": [
            "kind",
            "id"
          ]
        }
      ]
    },
    "detail": {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string"
        },
        "model": {
          "type": "string"
        },
        "input_units": {
          "$ref": "#/$defs/__schema0"
        },
        "output_units": {
          "$ref": "#/$defs/__schema0"
        },
        "input_rate": {
          "$ref": "#/$defs/__schema0"
        },
        "output_rate": {
          "$ref": "#/$defs/__schema0"
        },
        "fallback_used": {
          "type": "boolean"
        },
        "rate_card_missing": {
          "type": "boolean",
          "const": true
        }
      }
    }
  },
  "required": [
    "product_id",
    "native_units",
    "unit",
    "id",
    "workspace_id",
    "kind",
    "credits",
    "bucket_breakdown",
    "usage_category",
    "subject_id",
    "evidence_key",
    "rate_card_version",
    "created_at",
    "actor"
  ],
  "$defs": {
    "__schema0": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

CreditTransactions

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "native_units": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "unit": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "ms",
                  "byte_days",
                  "tokens",
                  "calls",
                  "bytes"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "pattern": "^ctx_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "grant",
              "reserve",
              "settle",
              "release",
              "refund",
              "adjust",
              "cycle_reset"
            ]
          },
          "credits": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "bucket_breakdown": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "usage_category": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "ai_tokens",
                  "runtime",
                  "storage",
                  "provider_call"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "subject_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "evidence_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "rate_card_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "actor": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "usr"
                  },
                  "id": {
                    "type": "string",
                    "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  }
                },
                "required": [
                  "kind",
                  "id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "system"
                  },
                  "id": {
                    "type": "string",
                    "const": "platform"
                  }
                },
                "required": [
                  "kind",
                  "id"
                ]
              }
            ]
          },
          "detail": {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string"
              },
              "model": {
                "type": "string"
              },
              "input_units": {
                "$ref": "#/$defs/__schema0"
              },
              "output_units": {
                "$ref": "#/$defs/__schema0"
              },
              "input_rate": {
                "$ref": "#/$defs/__schema0"
              },
              "output_rate": {
                "$ref": "#/$defs/__schema0"
              },
              "fallback_used": {
                "type": "boolean"
              },
              "rate_card_missing": {
                "type": "boolean",
                "const": true
              }
            }
          }
        },
        "required": [
          "product_id",
          "native_units",
          "unit",
          "id",
          "workspace_id",
          "kind",
          "credits",
          "bucket_breakdown",
          "usage_category",
          "subject_id",
          "evidence_key",
          "rate_card_version",
          "created_at",
          "actor"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

CreditGrant

{
  "type": "object",
  "properties": {
    "kind": {
      "$ref": "#/$defs/__schema0"
    },
    "credits": {
      "$ref": "#/$defs/__schema1"
    },
    "expires_at": {
      "$ref": "#/$defs/__schema2"
    },
    "reason": {
      "$ref": "#/$defs/__schema3"
    }
  },
  "required": [
    "kind",
    "credits",
    "reason"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "enum": [
        "promo",
        "purchased"
      ]
    },
    "__schema1": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "__schema2": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema3": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    }
  }
}

WalletSubscription

{
  "type": "object",
  "properties": {
    "tier": {
      "type": "string",
      "enum": [
        "free",
        "starter",
        "pro"
      ]
    }
  },
  "required": [
    "tier"
  ]
}

RateCardWrite

{
  "type": "object",
  "properties": {
    "input_rate": {
      "$ref": "#/$defs/__schema0"
    },
    "output_rate": {
      "$ref": "#/$defs/__schema0"
    },
    "effective_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "input_rate",
    "output_rate",
    "effective_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

RateCard

{
  "type": "object",
  "properties": {
    "input_rate": {
      "$ref": "#/$defs/__schema0"
    },
    "output_rate": {
      "$ref": "#/$defs/__schema0"
    },
    "effective_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "provider": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "model": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "rate_card_version": {
      "type": "string"
    }
  },
  "required": [
    "input_rate",
    "output_rate",
    "effective_at",
    "provider",
    "model",
    "rate_card_version"
  ],
  "$defs": {
    "__schema0": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

RateCards

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "input_rate": {
            "$ref": "#/$defs/__schema0"
          },
          "output_rate": {
            "$ref": "#/$defs/__schema0"
          },
          "effective_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "provider": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "rate_card_version": {
            "type": "string"
          }
        },
        "required": [
          "input_rate",
          "output_rate",
          "effective_at",
          "provider",
          "model",
          "rate_card_version"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

SubscriptionTierWrite

{
  "type": "object",
  "properties": {
    "monthly_credits": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "price_twd": {
      "type": "number",
      "minimum": 0
    }
  },
  "required": [
    "monthly_credits",
    "price_twd"
  ]
}

SubscriptionTier

{
  "type": "object",
  "properties": {
    "monthly_credits": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "price_twd": {
      "type": "number",
      "minimum": 0
    },
    "tier": {
      "type": "string",
      "enum": [
        "free",
        "starter",
        "pro"
      ]
    }
  },
  "required": [
    "monthly_credits",
    "price_twd",
    "tier"
  ]
}

SubscriptionTiers

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "monthly_credits": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "price_twd": {
            "type": "number",
            "minimum": 0
          },
          "tier": {
            "type": "string",
            "enum": [
              "free",
              "starter",
              "pro"
            ]
          }
        },
        "required": [
          "monthly_credits",
          "price_twd",
          "tier"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

PaymentReconciliation

{
  "type": "object",
  "properties": {
    "month": {
      "type": "string",
      "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
    },
    "timezone": {
      "type": "string",
      "const": "Asia/Taipei"
    },
    "from": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "to": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "orders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^pay_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "gateway": {
            "$ref": "#/$defs/__schema0"
          },
          "kind": {
            "type": "string",
            "enum": [
              "topup",
              "subscription",
              "renewal"
            ]
          },
          "amount_twd": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "credits": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "tier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "free",
                  "starter",
                  "pro"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "created",
              "pending",
              "paid",
              "failed",
              "cancelled",
              "refunded",
              "partially_refunded"
            ]
          },
          "gateway_order_no": {
            "type": "string"
          },
          "gateway_trade_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "period_no": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "idempotency_key": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "credit_bucket_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "gateway",
          "kind",
          "amount_twd",
          "credits",
          "tier",
          "status",
          "gateway_order_no",
          "idempotency_key",
          "actor",
          "created_at",
          "paid_at",
          "credit_bucket_id"
        ]
      }
    },
    "refunds": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^rfd_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "payment_order_id": {
            "type": "string",
            "pattern": "^pay_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "amount_twd": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "reason": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "succeeded",
              "failed"
            ]
          },
          "gateway_refund_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "actor": {
            "type": "string",
            "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "invoice_job_status": {
            "type": "string",
            "enum": [
              "pending",
              "in_flight",
              "done",
              "failed",
              "unknown"
            ]
          },
          "invoice_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "gateway": {
            "$ref": "#/$defs/__schema0"
          },
          "gateway_order_no": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "payment_order_id",
          "amount_twd",
          "reason",
          "status",
          "gateway_refund_no",
          "actor",
          "created_at",
          "invoice_job_status",
          "invoice_ref",
          "gateway",
          "gateway_order_no"
        ]
      }
    },
    "totals": {
      "type": "object",
      "properties": {
        "paid_orders": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "paid_amount_twd": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "refunded_amount_twd": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "open_orders": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "not_credited_orders": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "paid_orders",
        "paid_amount_twd",
        "refunded_amount_twd",
        "open_orders",
        "not_credited_orders"
      ]
    }
  },
  "required": [
    "month",
    "timezone",
    "from",
    "to",
    "orders",
    "refunds",
    "totals"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "enum": [
        "newebpay",
        "ecpay"
      ]
    }
  }
}

PaymentAttention

{
  "type": "object",
  "properties": {
    "cancel_pending": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "order_id": {
            "type": "string",
            "pattern": "^pay_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "gateway": {
            "$ref": "#/$defs/__schema0"
          },
          "cancel_attempts": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "next_cancel_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "workspace_id",
          "order_id",
          "gateway",
          "cancel_attempts",
          "next_cancel_at"
        ]
      }
    },
    "refund_due": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "order_id": {
            "type": "string",
            "pattern": "^pay_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "gateway": {
            "$ref": "#/$defs/__schema0"
          },
          "amount_twd": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "workspace_id",
          "order_id",
          "gateway",
          "amount_twd"
        ]
      }
    }
  },
  "required": [
    "cancel_pending",
    "refund_due"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "enum": [
        "newebpay",
        "ecpay"
      ]
    }
  }
}

MandateCancelled

{
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "pattern": "^pay_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "mandate_state": {
      "type": "string",
      "const": "cancelled"
    }
  },
  "required": [
    "order_id",
    "mandate_state"
  ]
}

PaymentProblem

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "bad_request",
        "unauthenticated",
        "forbidden",
        "not_found",
        "conflict",
        "validation_failed",
        "rate_limited",
        "internal",
        "unavailable",
        "billing_profile_required",
        "subscription_change_pending",
        "order_not_payable",
        "refund_exceeds_paid",
        "callback_signature_invalid",
        "gateway_unavailable"
      ]
    },
    "correlation_id": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "reason": {
      "type": "string"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "message"
        ]
      }
    },
    "errors_total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "type",
    "title",
    "status",
    "detail",
    "instance",
    "code",
    "correlation_id"
  ]
}

BillingProfile

{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "buyer_kind": {
      "type": "string",
      "enum": [
        "individual",
        "business"
      ]
    },
    "title": {
      "type": "string"
    },
    "tax_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "invoice_email": {
      "type": "string",
      "maxLength": 50,
      "format": "email",
      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "carrier": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 50
        },
        {
          "type": "null"
        }
      ]
    },
    "donation_code": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d{3,7}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "workspace_id",
    "buyer_kind",
    "title",
    "tax_id",
    "invoice_email",
    "carrier",
    "donation_code",
    "updated_at"
  ]
}

BillingProfileWrite

{
  "oneOf": [
    {
      "$ref": "#/$defs/__schema0"
    },
    {
      "$ref": "#/$defs/__schema4"
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "invoice_email": {
          "$ref": "#/$defs/__schema1"
        },
        "carrier": {
          "$ref": "#/$defs/__schema2"
        },
        "donation_code": {
          "$ref": "#/$defs/__schema3"
        },
        "buyer_kind": {
          "type": "string",
          "const": "individual"
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 30
        },
        "tax_id": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\d{8}$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "invoice_email",
        "carrier",
        "donation_code",
        "buyer_kind",
        "title",
        "tax_id"
      ]
    },
    "__schema1": {
      "type": "string",
      "maxLength": 50,
      "format": "email",
      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "__schema2": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 50
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema3": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d{3,7}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema4": {
      "type": "object",
      "properties": {
        "invoice_email": {
          "$ref": "#/$defs/__schema1"
        },
        "carrier": {
          "$ref": "#/$defs/__schema2"
        },
        "donation_code": {
          "$ref": "#/$defs/__schema3"
        },
        "buyer_kind": {
          "type": "string",
          "const": "business"
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 60
        },
        "tax_id": {
          "type": "string",
          "pattern": "^\\d{8}$"
        }
      },
      "required": [
        "invoice_email",
        "carrier",
        "donation_code",
        "buyer_kind",
        "title",
        "tax_id"
      ]
    }
  }
}

PaymentCheckout

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "topup"
        },
        "gateway": {
          "$ref": "#/$defs/__schema0"
        },
        "amount_twd": {
          "anyOf": [
            {
              "type": "number",
              "const": 100
            },
            {
              "type": "number",
              "const": 300
            },
            {
              "type": "number",
              "const": 500
            }
          ]
        },
        "return_url": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "kind",
        "gateway",
        "amount_twd",
        "return_url"
      ]
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "subscription"
        },
        "gateway": {
          "$ref": "#/$defs/__schema0"
        },
        "tier": {
          "type": "string",
          "enum": [
            "starter",
            "pro"
          ]
        },
        "return_url": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "kind",
        "gateway",
        "tier",
        "return_url"
      ]
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "enum": [
        "newebpay",
        "ecpay"
      ]
    }
  }
}

PaymentOrder

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^pay_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "gateway": {
      "type": "string",
      "enum": [
        "newebpay",
        "ecpay"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "topup",
        "subscription",
        "renewal"
      ]
    },
    "amount_twd": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "credits": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "tier": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "free",
            "starter",
            "pro"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "created",
        "pending",
        "paid",
        "failed",
        "cancelled",
        "refunded",
        "partially_refunded"
      ]
    },
    "gateway_order_no": {
      "type": "string"
    },
    "gateway_trade_no": {
      "type": [
        "string",
        "null"
      ]
    },
    "period_no": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "idempotency_key": {
      "type": "string"
    },
    "actor": {
      "type": "string"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "paid_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "id",
    "workspace_id",
    "gateway",
    "kind",
    "amount_twd",
    "credits",
    "tier",
    "status",
    "gateway_order_no",
    "idempotency_key",
    "actor",
    "created_at",
    "paid_at"
  ]
}

PaymentOrders

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^pay_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "gateway": {
            "type": "string",
            "enum": [
              "newebpay",
              "ecpay"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "topup",
              "subscription",
              "renewal"
            ]
          },
          "amount_twd": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "credits": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "tier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "free",
                  "starter",
                  "pro"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "created",
              "pending",
              "paid",
              "failed",
              "cancelled",
              "refunded",
              "partially_refunded"
            ]
          },
          "gateway_order_no": {
            "type": "string"
          },
          "gateway_trade_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "period_no": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "idempotency_key": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "gateway",
          "kind",
          "amount_twd",
          "credits",
          "tier",
          "status",
          "gateway_order_no",
          "idempotency_key",
          "actor",
          "created_at",
          "paid_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

PaymentSubscription

{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "tier": {
      "type": "string",
      "enum": [
        "free",
        "starter",
        "pro"
      ]
    },
    "gateway": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "newebpay",
            "ecpay"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "recurring_ref": {
      "type": [
        "string",
        "null"
      ]
    },
    "renewal_state": {
      "type": "string",
      "enum": [
        "active",
        "cancel_at_cycle_end",
        "past_due_grace",
        "free"
      ]
    },
    "cycle_ends_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "grace_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_charge_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "workspace_id",
    "tier",
    "gateway",
    "recurring_ref",
    "renewal_state",
    "cycle_ends_at",
    "grace_until",
    "next_charge_at",
    "updated_at"
  ]
}

PaymentSubscriptionWrite

{
  "type": "object",
  "properties": {
    "tier": {
      "type": "string",
      "const": "free"
    }
  },
  "required": [
    "tier"
  ]
}

PaymentCheckoutResult

{
  "type": "object",
  "properties": {
    "order": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^pay_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "workspace_id": {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "gateway": {
          "type": "string",
          "enum": [
            "newebpay",
            "ecpay"
          ]
        },
        "kind": {
          "type": "string",
          "enum": [
            "topup",
            "subscription",
            "renewal"
          ]
        },
        "amount_twd": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "credits": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "tier": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "free",
                "starter",
                "pro"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "created",
            "pending",
            "paid",
            "failed",
            "cancelled",
            "refunded",
            "partially_refunded"
          ]
        },
        "gateway_order_no": {
          "type": "string"
        },
        "gateway_trade_no": {
          "type": [
            "string",
            "null"
          ]
        },
        "period_no": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "idempotency_key": {
          "type": "string"
        },
        "actor": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "paid_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "workspace_id",
        "gateway",
        "kind",
        "amount_twd",
        "credits",
        "tier",
        "status",
        "gateway_order_no",
        "idempotency_key",
        "actor",
        "created_at",
        "paid_at"
      ]
    },
    "redirect": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "method": {
          "type": "string",
          "const": "POST"
        },
        "fields": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "url",
        "method",
        "fields"
      ]
    }
  },
  "required": [
    "order",
    "redirect"
  ]
}

Invoices

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^ivc_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "payment_order_id": {
            "type": "string",
            "pattern": "^pay_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "issuer": {
            "type": "string",
            "const": "ezpay"
          },
          "invoice_no": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "issued",
              "voided",
              "failed"
            ]
          },
          "buyer": {
            "type": "object",
            "properties": {
              "buyer_kind": {
                "type": "string",
                "enum": [
                  "individual",
                  "business"
                ]
              },
              "title": {
                "type": "string"
              },
              "tax_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "carrier": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 50
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "donation_code": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d{3,7}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "buyer_kind",
              "title",
              "tax_id",
              "carrier",
              "donation_code"
            ]
          },
          "issued_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "attempts": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "last_error_code": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "payment_order_id",
          "issuer",
          "invoice_no",
          "status",
          "issued_at",
          "attempts",
          "last_error_code"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

PaymentRefundWrite

{
  "type": "object",
  "properties": {
    "payment_id": {
      "type": "string",
      "pattern": "^pay_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "amount_twd": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    }
  },
  "required": [
    "payment_id",
    "amount_twd",
    "reason"
  ]
}

PaymentRefund

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^rfd_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "payment_order_id": {
      "type": "string",
      "pattern": "^pay_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "amount_twd": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "reason": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "requested",
        "succeeded",
        "failed"
      ]
    },
    "gateway_refund_no": {
      "type": [
        "string",
        "null"
      ]
    },
    "actor": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "invoice_job_status": {
      "type": "string",
      "enum": [
        "pending",
        "in_flight",
        "done",
        "failed",
        "unknown"
      ]
    },
    "invoice_ref": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "workspace_id",
    "payment_order_id",
    "amount_twd",
    "reason",
    "status",
    "gateway_refund_no",
    "actor",
    "created_at",
    "invoice_job_status",
    "invoice_ref"
  ]
}

AuditRecord

{
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/$defs/__schema0"
    },
    "workspace_id": {
      "$ref": "#/$defs/__schema1"
    },
    "occurred_at": {
      "$ref": "#/$defs/__schema2"
    },
    "recorded_at": {
      "$ref": "#/$defs/__schema3"
    },
    "action": {
      "$ref": "#/$defs/__schema4"
    },
    "actor": {
      "$ref": "#/$defs/__schema5"
    },
    "target": {
      "$ref": "#/$defs/__schema6"
    },
    "outcome": {
      "$ref": "#/$defs/__schema10"
    },
    "reason": {
      "$ref": "#/$defs/__schema11"
    },
    "correlation_id": {
      "$ref": "#/$defs/__schema9"
    },
    "source_event_id": {
      "$ref": "#/$defs/__schema13"
    },
    "source_request_id": {
      "$ref": "#/$defs/__schema14"
    },
    "environment": {
      "$ref": "#/$defs/__schema15"
    },
    "detail": {
      "$ref": "#/$defs/__schema16"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "occurred_at",
    "recorded_at",
    "action",
    "actor",
    "target",
    "outcome",
    "reason",
    "correlation_id",
    "source_event_id",
    "source_request_id",
    "environment",
    "detail"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^aud_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema1": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    },
    "__schema2": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema3": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema4": {
      "type": "string",
      "enum": [
        "variable.set",
        "variable.deleted",
        "capability.dev_invoked",
        "inbound_webhook.created",
        "inbound_webhook.deleted",
        "auto_deploy.enabled",
        "auto_deploy.disabled",
        "auto_deploy.triggered",
        "closure.requested",
        "closure.completed",
        "billing.payment_succeeded",
        "billing.payment_failed",
        "billing.refunded",
        "billing.subscription_changed",
        "billing.profile_changed",
        "billing.invoice_issued",
        "billing.granted",
        "billing.adjusted",
        "billing.tier_changed",
        "billing.rate_card_updated",
        "billing.subscription_tier_updated",
        "credential.created",
        "credential.revoked",
        "credential.rotated",
        "binding.requested",
        "binding.ready",
        "binding.failed",
        "binding.revoked",
        "binding.expired",
        "service_identity.created",
        "service_identity.revoked",
        "service_identity.secret_rotated",
        "member.upserted",
        "member.role_changed",
        "member.removed",
        "platform.bootstrapped",
        "platform.outbox_redelivered",
        "platform.outbox_closed",
        "app.forwarding_updated",
        "app.created",
        "app.deleted",
        "app.closure_requested",
        "product.moved",
        "product.created",
        "release.created",
        "deployment.requested",
        "deployment.stop_requested",
        "deployment.ready",
        "deployment.stopped",
        "plan.changed",
        "budget.changed",
        "capability.denied",
        "capability.output_blocked",
        "capability.fallback",
        "capability.usage_unreported",
        "bridge.rejected",
        "usage.denied",
        "access.qualified",
        "access.denied",
        "access.revoked",
        "isolation.unenforced_run",
        "isolation.blocked",
        "pending.resolved",
        "fix.requested",
        "fix.decided",
        "fix.patch_withheld",
        "adjudication.decided",
        "authz.forbidden",
        "authz.workspace_mismatch",
        "audit.exported",
        "managed_resource.kv_restored",
        "audit.retention_deleted"
      ]
    },
    "__schema5": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "usr"
            },
            "id": {
              "type": "string",
              "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "svc"
            },
            "id": {
              "type": "string",
              "pattern": "^svc_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "prod"
            },
            "id": {
              "type": "string",
              "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "system"
            },
            "id": {
              "type": "string",
              "enum": [
                "platform",
                "platform-bootstrap",
                "make",
                "deliver"
              ]
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "runner"
            },
            "id": {
              "type": "string",
              "const": "runner"
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        }
      ]
    },
    "__schema6": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/__schema7"
        },
        "id": {
          "$ref": "#/$defs/__schema8"
        }
      },
      "required": [
        "kind",
        "id"
      ],
      "additionalProperties": false
    },
    "__schema7": {
      "type": "string",
      "enum": [
        "brk",
        "rsm",
        "pvar",
        "minv",
        "trg",
        "hook",
        "mrun",
        "mres",
        "ws",
        "app",
        "usr",
        "prod",
        "rev",
        "ver",
        "rel",
        "env",
        "dep",
        "srf",
        "acc",
        "ses",
        "inv",
        "exe",
        "evt",
        "pend",
        "ddl",
        "ntf",
        "pipe",
        "fnd",
        "qual",
        "cred",
        "bind",
        "hdl",
        "cap",
        "svc",
        "frz",
        "adj",
        "fix",
        "upl",
        "dom",
        "wb",
        "ctx",
        "aud",
        "pay",
        "ivc",
        "rfd"
      ]
    },
    "__schema8": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema9"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    },
    "__schema9": {
      "type": "string",
      "pattern": "^(brk|rsm|pvar|minv|trg|hook|mrun|mres|ws|app|usr|prod|rev|ver|rel|env|dep|srf|acc|ses|inv|exe|evt|pend|ddl|ntf|pipe|fnd|qual|cred|bind|hdl|cap|svc|frz|adj|fix|upl|dom|wb|ctx|aud|pay|ivc|rfd)_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema10": {
      "type": "string",
      "enum": [
        "allowed",
        "denied",
        "failed",
        "changed"
      ]
    },
    "__schema11": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema12"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema12": {
      "type": "string",
      "enum": [
        "insufficient_credit",
        "app_budget_exceeded",
        "outside_contract",
        "permission_denied",
        "policy_blocked",
        "binding_missing",
        "binding_revoked",
        "usage_denied",
        "provider_unavailable",
        "provider_rejected",
        "output_blocked",
        "platform_unavailable",
        "other",
        "scope_denied",
        "rate_limited",
        "budget_exhausted",
        "within_policy",
        "budget_exceeded",
        "plan_not_entitled",
        "approval_rejected",
        "approval_expired",
        "qualified",
        "identity_required",
        "membership_required",
        "rate_card_missing",
        "surface_expired",
        "surface_not_found",
        "trust_blocked",
        "isolation_blocked",
        "sanitized_input",
        "test_fixture",
        "dead_code",
        "not_reachable",
        "sink_reachable",
        "no_sanitizer",
        "pattern_only",
        "model_error",
        "excerpt_missing",
        "timeout",
        "forbidden",
        "workspace_mismatch"
      ]
    },
    "__schema13": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema14": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema15": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "preview",
            "staging",
            "production"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema16": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "from_product_id": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "to_product_id": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "path_prefix": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "/api/"
                },
                {
                  "type": "null"
                }
              ]
            },
            "from_app_id": {
              "type": "string",
              "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "to_app_id": {
              "type": "string",
              "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "variable_name": {
              "type": "string",
              "pattern": "^[A-Z_][A-Z0-9_]{0,63}$"
            },
            "variable_kind": {
              "type": "string",
              "enum": [
                "build",
                "runtime",
                "secret"
              ]
            },
            "gateway": {
              "type": "string",
              "enum": [
                "newebpay",
                "ecpay"
              ]
            },
            "amount_twd": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "order_kind": {
              "type": "string",
              "enum": [
                "topup",
                "subscription",
                "renewal"
              ]
            },
            "credits": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "bucket": {
              "type": "string",
              "enum": [
                "subscription",
                "topup",
                "grant"
              ]
            },
            "tier": {
              "$ref": "#/$defs/__schema17"
            },
            "rate_card_version": {
              "$ref": "#/$defs/__schema17"
            },
            "capability": {
              "$ref": "#/$defs/__schema17"
            },
            "action": {
              "$ref": "#/$defs/__schema17"
            },
            "provider": {
              "$ref": "#/$defs/__schema17"
            },
            "plan": {
              "$ref": "#/$defs/__schema17"
            },
            "budget_category": {
              "$ref": "#/$defs/__schema17"
            },
            "unit": {
              "$ref": "#/$defs/__schema17"
            },
            "units": {
              "type": "number",
              "minimum": 0
            },
            "http_status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "isolation_profile": {
              "type": "string",
              "enum": [
                "isolated-vm",
                "isolated-kernel",
                "trusted"
              ]
            },
            "enforced": {
              "type": "boolean"
            },
            "role": {
              "type": "string",
              "enum": [
                "owner",
                "admin",
                "developer"
              ]
            },
            "environment": {
              "type": "string",
              "enum": [
                "preview",
                "staging",
                "production"
              ]
            },
            "reason": {
              "$ref": "#/$defs/__schema12"
            },
            "route": {
              "type": "string",
              "maxLength": 256
            },
            "method": {
              "type": "string",
              "enum": [
                "GET",
                "POST",
                "PUT",
                "PATCH",
                "DELETE",
                "HEAD",
                "OPTIONS"
              ]
            },
            "usage_category": {
              "type": "string",
              "enum": [
                "ai_tokens",
                "runtime",
                "provider_call",
                "storage"
              ]
            },
            "identity_kind": {
              "type": "string",
              "enum": [
                "workspace-member",
                "consumer",
                "service"
              ]
            },
            "code": {
              "$ref": "#/$defs/__schema17"
            },
            "phase": {
              "type": "string",
              "enum": [
                "apply",
                "startup",
                "health_check"
              ]
            },
            "outcome": {
              "type": "string",
              "enum": [
                "approved",
                "rejected",
                "withdrawn",
                "expired",
                "superseded",
                "false_positive",
                "confirmed",
                "inconclusive"
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema17": {
      "type": "string",
      "maxLength": 256
    }
  }
}

AuditRecords

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/$defs/__schema0"
          },
          "workspace_id": {
            "$ref": "#/$defs/__schema1"
          },
          "occurred_at": {
            "$ref": "#/$defs/__schema2"
          },
          "recorded_at": {
            "$ref": "#/$defs/__schema3"
          },
          "action": {
            "$ref": "#/$defs/__schema4"
          },
          "actor": {
            "$ref": "#/$defs/__schema5"
          },
          "target": {
            "$ref": "#/$defs/__schema6"
          },
          "outcome": {
            "$ref": "#/$defs/__schema10"
          },
          "reason": {
            "$ref": "#/$defs/__schema11"
          },
          "correlation_id": {
            "$ref": "#/$defs/__schema9"
          },
          "source_event_id": {
            "$ref": "#/$defs/__schema13"
          },
          "source_request_id": {
            "$ref": "#/$defs/__schema14"
          },
          "environment": {
            "$ref": "#/$defs/__schema15"
          },
          "detail": {
            "$ref": "#/$defs/__schema16"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "occurred_at",
          "recorded_at",
          "action",
          "actor",
          "target",
          "outcome",
          "reason",
          "correlation_id",
          "source_event_id",
          "source_request_id",
          "environment",
          "detail"
        ],
        "additionalProperties": false
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^aud_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema1": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    },
    "__schema2": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema3": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema4": {
      "type": "string",
      "enum": [
        "variable.set",
        "variable.deleted",
        "capability.dev_invoked",
        "inbound_webhook.created",
        "inbound_webhook.deleted",
        "auto_deploy.enabled",
        "auto_deploy.disabled",
        "auto_deploy.triggered",
        "closure.requested",
        "closure.completed",
        "billing.payment_succeeded",
        "billing.payment_failed",
        "billing.refunded",
        "billing.subscription_changed",
        "billing.profile_changed",
        "billing.invoice_issued",
        "billing.granted",
        "billing.adjusted",
        "billing.tier_changed",
        "billing.rate_card_updated",
        "billing.subscription_tier_updated",
        "credential.created",
        "credential.revoked",
        "credential.rotated",
        "binding.requested",
        "binding.ready",
        "binding.failed",
        "binding.revoked",
        "binding.expired",
        "service_identity.created",
        "service_identity.revoked",
        "service_identity.secret_rotated",
        "member.upserted",
        "member.role_changed",
        "member.removed",
        "platform.bootstrapped",
        "platform.outbox_redelivered",
        "platform.outbox_closed",
        "app.forwarding_updated",
        "app.created",
        "app.deleted",
        "app.closure_requested",
        "product.moved",
        "product.created",
        "release.created",
        "deployment.requested",
        "deployment.stop_requested",
        "deployment.ready",
        "deployment.stopped",
        "plan.changed",
        "budget.changed",
        "capability.denied",
        "capability.output_blocked",
        "capability.fallback",
        "capability.usage_unreported",
        "bridge.rejected",
        "usage.denied",
        "access.qualified",
        "access.denied",
        "access.revoked",
        "isolation.unenforced_run",
        "isolation.blocked",
        "pending.resolved",
        "fix.requested",
        "fix.decided",
        "fix.patch_withheld",
        "adjudication.decided",
        "authz.forbidden",
        "authz.workspace_mismatch",
        "audit.exported",
        "managed_resource.kv_restored",
        "audit.retention_deleted"
      ]
    },
    "__schema5": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "usr"
            },
            "id": {
              "type": "string",
              "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "svc"
            },
            "id": {
              "type": "string",
              "pattern": "^svc_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "prod"
            },
            "id": {
              "type": "string",
              "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "system"
            },
            "id": {
              "type": "string",
              "enum": [
                "platform",
                "platform-bootstrap",
                "make",
                "deliver"
              ]
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "runner"
            },
            "id": {
              "type": "string",
              "const": "runner"
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        }
      ]
    },
    "__schema6": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/__schema7"
        },
        "id": {
          "$ref": "#/$defs/__schema8"
        }
      },
      "required": [
        "kind",
        "id"
      ],
      "additionalProperties": false
    },
    "__schema7": {
      "type": "string",
      "enum": [
        "brk",
        "rsm",
        "pvar",
        "minv",
        "trg",
        "hook",
        "mrun",
        "mres",
        "ws",
        "app",
        "usr",
        "prod",
        "rev",
        "ver",
        "rel",
        "env",
        "dep",
        "srf",
        "acc",
        "ses",
        "inv",
        "exe",
        "evt",
        "pend",
        "ddl",
        "ntf",
        "pipe",
        "fnd",
        "qual",
        "cred",
        "bind",
        "hdl",
        "cap",
        "svc",
        "frz",
        "adj",
        "fix",
        "upl",
        "dom",
        "wb",
        "ctx",
        "aud",
        "pay",
        "ivc",
        "rfd"
      ]
    },
    "__schema8": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema9"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    },
    "__schema9": {
      "type": "string",
      "pattern": "^(brk|rsm|pvar|minv|trg|hook|mrun|mres|ws|app|usr|prod|rev|ver|rel|env|dep|srf|acc|ses|inv|exe|evt|pend|ddl|ntf|pipe|fnd|qual|cred|bind|hdl|cap|svc|frz|adj|fix|upl|dom|wb|ctx|aud|pay|ivc|rfd)_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema10": {
      "type": "string",
      "enum": [
        "allowed",
        "denied",
        "failed",
        "changed"
      ]
    },
    "__schema11": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema12"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema12": {
      "type": "string",
      "enum": [
        "insufficient_credit",
        "app_budget_exceeded",
        "outside_contract",
        "permission_denied",
        "policy_blocked",
        "binding_missing",
        "binding_revoked",
        "usage_denied",
        "provider_unavailable",
        "provider_rejected",
        "output_blocked",
        "platform_unavailable",
        "other",
        "scope_denied",
        "rate_limited",
        "budget_exhausted",
        "within_policy",
        "budget_exceeded",
        "plan_not_entitled",
        "approval_rejected",
        "approval_expired",
        "qualified",
        "identity_required",
        "membership_required",
        "rate_card_missing",
        "surface_expired",
        "surface_not_found",
        "trust_blocked",
        "isolation_blocked",
        "sanitized_input",
        "test_fixture",
        "dead_code",
        "not_reachable",
        "sink_reachable",
        "no_sanitizer",
        "pattern_only",
        "model_error",
        "excerpt_missing",
        "timeout",
        "forbidden",
        "workspace_mismatch"
      ]
    },
    "__schema13": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema14": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema15": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "preview",
            "staging",
            "production"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema16": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "from_product_id": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "to_product_id": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "path_prefix": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "/api/"
                },
                {
                  "type": "null"
                }
              ]
            },
            "from_app_id": {
              "type": "string",
              "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "to_app_id": {
              "type": "string",
              "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "variable_name": {
              "type": "string",
              "pattern": "^[A-Z_][A-Z0-9_]{0,63}$"
            },
            "variable_kind": {
              "type": "string",
              "enum": [
                "build",
                "runtime",
                "secret"
              ]
            },
            "gateway": {
              "type": "string",
              "enum": [
                "newebpay",
                "ecpay"
              ]
            },
            "amount_twd": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "order_kind": {
              "type": "string",
              "enum": [
                "topup",
                "subscription",
                "renewal"
              ]
            },
            "credits": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "bucket": {
              "type": "string",
              "enum": [
                "subscription",
                "topup",
                "grant"
              ]
            },
            "tier": {
              "$ref": "#/$defs/__schema17"
            },
            "rate_card_version": {
              "$ref": "#/$defs/__schema17"
            },
            "capability": {
              "$ref": "#/$defs/__schema17"
            },
            "action": {
              "$ref": "#/$defs/__schema17"
            },
            "provider": {
              "$ref": "#/$defs/__schema17"
            },
            "plan": {
              "$ref": "#/$defs/__schema17"
            },
            "budget_category": {
              "$ref": "#/$defs/__schema17"
            },
            "unit": {
              "$ref": "#/$defs/__schema17"
            },
            "units": {
              "type": "number",
              "minimum": 0
            },
            "http_status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "isolation_profile": {
              "type": "string",
              "enum": [
                "isolated-vm",
                "isolated-kernel",
                "trusted"
              ]
            },
            "enforced": {
              "type": "boolean"
            },
            "role": {
              "type": "string",
              "enum": [
                "owner",
                "admin",
                "developer"
              ]
            },
            "environment": {
              "type": "string",
              "enum": [
                "preview",
                "staging",
                "production"
              ]
            },
            "reason": {
              "$ref": "#/$defs/__schema12"
            },
            "route": {
              "type": "string",
              "maxLength": 256
            },
            "method": {
              "type": "string",
              "enum": [
                "GET",
                "POST",
                "PUT",
                "PATCH",
                "DELETE",
                "HEAD",
                "OPTIONS"
              ]
            },
            "usage_category": {
              "type": "string",
              "enum": [
                "ai_tokens",
                "runtime",
                "provider_call",
                "storage"
              ]
            },
            "identity_kind": {
              "type": "string",
              "enum": [
                "workspace-member",
                "consumer",
                "service"
              ]
            },
            "code": {
              "$ref": "#/$defs/__schema17"
            },
            "phase": {
              "type": "string",
              "enum": [
                "apply",
                "startup",
                "health_check"
              ]
            },
            "outcome": {
              "type": "string",
              "enum": [
                "approved",
                "rejected",
                "withdrawn",
                "expired",
                "superseded",
                "false_positive",
                "confirmed",
                "inconclusive"
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema17": {
      "type": "string",
      "maxLength": 256
    }
  }
}

CorrelationEvents

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "event_type": {
            "type": "string"
          },
          "schema_version": {
            "type": "string"
          },
          "producer": {
            "type": "string"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "causation_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "event_id",
          "event_type",
          "schema_version",
          "producer",
          "occurred_at",
          "causation_id"
        ]
      }
    },
    "next_cursor": {
      "type": "null"
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

RevisionDetail

{
  "type": "object",
  "properties": {
    "capability_contract": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "rejected"
        },
        "reason": {
          "type": "string",
          "enum": [
            "unknown_capability",
            "unknown_action",
            "scope_invalid",
            "scope_widened",
            "owner_not_supported",
            "contract_too_large"
          ]
        }
      },
      "required": [
        "status",
        "reason"
      ]
    },
    "id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "input_revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_type": {
      "type": "string",
      "const": "hosted-app"
    },
    "descriptor": {
      "type": "object",
      "properties": {
        "build_plan": {
          "type": "object",
          "properties": {
            "runtime": {
              "$ref": "#/$defs/__schema0"
            },
            "workdir": {
              "$ref": "#/$defs/__schema1"
            },
            "install": {
              "$ref": "#/$defs/__schema2"
            },
            "build": {
              "$ref": "#/$defs/__schema3"
            },
            "start": {
              "$ref": "#/$defs/__schema4"
            },
            "port": {
              "$ref": "#/$defs/__schema5"
            },
            "health": {
              "$ref": "#/$defs/__schema6"
            },
            "env": {
              "$ref": "#/$defs/__schema7"
            }
          },
          "required": [
            "runtime",
            "workdir",
            "install",
            "build",
            "start",
            "port",
            "health",
            "env"
          ]
        },
        "runtime": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "node",
                "shell"
              ]
            },
            "version": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "kind",
            "version"
          ]
        },
        "entrypoint": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "args": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "command",
            "args"
          ]
        },
        "ports": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "port": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "protocol": {
                "type": "string",
                "const": "http"
              }
            },
            "required": [
              "port",
              "protocol"
            ]
          }
        },
        "field_sources": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string",
            "enum": [
              "detected",
              "developer"
            ]
          }
        }
      },
      "required": [
        "runtime",
        "entrypoint",
        "ports",
        "field_sources"
      ]
    },
    "descriptor_hash": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "build_variables_hash": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "confirmed_by": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "created_at": {
      "$ref": "#/$defs/__schema8"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema8"
    },
    "source": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "repository_url": {
              "type": "string"
            },
            "repository_ref": {
              "type": "string"
            },
            "commit_sha": {
              "type": "string",
              "pattern": "^[0-9a-f]{40}$"
            }
          },
          "required": [
            "repository_url",
            "repository_ref",
            "commit_sha"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "contract_status": {
      "type": "string",
      "enum": [
        "ready",
        "rejected",
        "pending"
      ]
    },
    "current_verification": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "verified",
                "degraded",
                "blocked",
                "revoked"
              ]
            },
            "computed_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "status",
            "computed_at"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "dependency_recheck": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "clean",
                "findings",
                "unavailable",
                "not_covered"
              ]
            },
            "checked_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "snapshot_date": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "findings": {
              "maxItems": 50,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema9"
              }
            },
            "findings_total": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "status",
            "checked_at",
            "snapshot_date",
            "findings",
            "findings_total"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "pipeline_runs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "revision_id": {
            "type": "string",
            "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "intent": {
            "type": "string",
            "enum": [
              "preview",
              "qualification",
              "reassessment",
              "fix_reverify"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending_snapshot",
              "authorization_requested",
              "blocked",
              "admitted",
              "requested",
              "reported",
              "completed",
              "failed",
              "passed",
              "warning",
              "unsafe"
            ]
          },
          "reason_code": {
            "type": "string"
          },
          "evidence": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stage": {
                  "type": "string",
                  "enum": [
                    "build",
                    "scan",
                    "startup_check"
                  ]
                },
                "log_evidence": {
                  "type": "object",
                  "properties": {
                    "uri": {
                      "type": "string",
                      "minLength": 1
                    },
                    "sha256": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "size_bytes": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "uri",
                    "sha256",
                    "size_bytes"
                  ]
                }
              },
              "required": [
                "stage",
                "log_evidence"
              ]
            }
          },
          "qualification": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "qualified",
                  "stopped",
                  "pending"
                ]
              },
              "reason": {
                "type": "string",
                "enum": [
                  "missing_evidence",
                  "blocking_findings",
                  "verification_blocked"
                ]
              },
              "version_id": {
                "type": "string",
                "pattern": "^ver_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              }
            },
            "required": [
              "status"
            ]
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "severity": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "location": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string"
                        },
                        "line": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "path",
                        "line"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rule_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dependency": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "package": {
                          "type": "string"
                        },
                        "version": {
                          "type": "string"
                        },
                        "advisory_id": {
                          "type": "string"
                        },
                        "cvss": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "fixed_in": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "package",
                        "version",
                        "advisory_id",
                        "cvss",
                        "fixed_in"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "severity",
                "code",
                "message"
              ]
            }
          },
          "created_at": {
            "$ref": "#/$defs/__schema8"
          },
          "updated_at": {
            "$ref": "#/$defs/__schema8"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "revision_id",
          "intent",
          "status",
          "findings",
          "created_at",
          "updated_at"
        ]
      }
    }
  },
  "required": [
    "id",
    "workspace_id",
    "product_id",
    "input_revision_id",
    "product_type",
    "descriptor",
    "descriptor_hash",
    "confirmed_by",
    "created_at",
    "updated_at",
    "contract_status",
    "current_verification",
    "dependency_recheck",
    "pipeline_runs"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "node",
            "shell"
          ]
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "kind",
        "version"
      ]
    },
    "__schema1": {
      "type": "string",
      "pattern": "^\\/.*"
    },
    "__schema2": {
      "type": "object",
      "properties": {
        "package_manager": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "pnpm",
                "npm",
                "yarn"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "command": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "package_manager",
        "command"
      ]
    },
    "__schema3": {
      "type": "object",
      "properties": {
        "command": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "command"
      ]
    },
    "__schema4": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string"
        }
      },
      "required": [
        "command"
      ]
    },
    "__schema5": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65535
    },
    "__schema6": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "pattern": "^\\/.*"
        },
        "timeout_ms": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "path",
        "timeout_ms"
      ]
    },
    "__schema7": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "PORT",
          "NODE_ENV"
        ]
      }
    },
    "__schema8": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema9": {
      "type": "object",
      "properties": {
        "package": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "advisory_id": {
          "type": "string"
        },
        "severity": {
          "type": "string",
          "enum": [
            "info",
            "warning",
            "error"
          ]
        },
        "cvss": {
          "type": [
            "string",
            "null"
          ]
        },
        "fixed_in": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "package",
        "version",
        "advisory_id",
        "severity",
        "cvss",
        "fixed_in"
      ]
    }
  }
}

DraftDescriptor

{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "input_revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "status": {
      "type": "string",
      "enum": [
        "detected",
        "confirmed"
      ]
    },
    "revision_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "descriptor_hash": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "descriptor": {
      "type": "object",
      "properties": {
        "build_plan": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "runtime": {
                  "$ref": "#/$defs/__schema0"
                },
                "workdir": {
                  "$ref": "#/$defs/__schema1"
                },
                "install": {
                  "$ref": "#/$defs/__schema2"
                },
                "build": {
                  "$ref": "#/$defs/__schema3"
                },
                "start": {
                  "$ref": "#/$defs/__schema4"
                },
                "port": {
                  "$ref": "#/$defs/__schema5"
                },
                "health": {
                  "$ref": "#/$defs/__schema6"
                },
                "env": {
                  "$ref": "#/$defs/__schema7"
                }
              },
              "required": [
                "runtime",
                "workdir",
                "install",
                "build",
                "start",
                "port",
                "health",
                "env"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "runtime": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "node",
                    "shell"
                  ]
                },
                "version": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "kind",
                "version"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "entrypoint": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "command": {
                  "type": "string"
                },
                "args": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "command",
                "args"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "ports": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "port": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "protocol": {
                "type": "string",
                "const": "http"
              }
            },
            "required": [
              "port",
              "protocol"
            ]
          }
        },
        "field_sources": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string",
            "enum": [
              "detected",
              "developer"
            ]
          }
        }
      },
      "required": [
        "runtime",
        "entrypoint",
        "ports",
        "field_sources"
      ]
    },
    "confidence": {
      "type": "object",
      "properties": {
        "runtime": {
          "$ref": "#/$defs/__schema8"
        },
        "entrypoint": {
          "$ref": "#/$defs/__schema8"
        },
        "ports": {
          "$ref": "#/$defs/__schema8"
        }
      },
      "required": [
        "runtime",
        "entrypoint",
        "ports"
      ]
    },
    "material_fields_complete": {
      "type": "boolean"
    },
    "diagnostics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "field": {
            "type": "string",
            "enum": [
              "runtime",
              "entrypoint",
              "ports"
            ]
          },
          "confidence": {
            "$ref": "#/$defs/__schema8"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "field",
          "confidence",
          "message"
        ]
      }
    }
  },
  "required": [
    "workspace_id",
    "product_id",
    "input_revision_id",
    "status",
    "revision_id",
    "descriptor_hash",
    "descriptor",
    "confidence",
    "material_fields_complete",
    "diagnostics"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "node",
            "shell"
          ]
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "kind",
        "version"
      ]
    },
    "__schema1": {
      "type": "string",
      "pattern": "^\\/.*"
    },
    "__schema2": {
      "type": "object",
      "properties": {
        "package_manager": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "pnpm",
                "npm",
                "yarn"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "command": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "package_manager",
        "command"
      ]
    },
    "__schema3": {
      "type": "object",
      "properties": {
        "command": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "command"
      ]
    },
    "__schema4": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string"
        }
      },
      "required": [
        "command"
      ]
    },
    "__schema5": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65535
    },
    "__schema6": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "pattern": "^\\/.*"
        },
        "timeout_ms": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "path",
        "timeout_ms"
      ]
    },
    "__schema7": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "PORT",
          "NODE_ENV"
        ]
      }
    },
    "__schema8": {
      "type": "string",
      "enum": [
        "high",
        "low"
      ]
    }
  }
}

Domain

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^dom_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_type": {
      "type": "string",
      "enum": [
        "staging",
        "production"
      ]
    },
    "hostname": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending_verification",
        "verified",
        "issuing",
        "active",
        "verification_failed",
        "certificate_failed",
        "removed"
      ]
    },
    "reason_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "verification": {
      "type": "object",
      "properties": {
        "txt_name": {
          "type": "string"
        },
        "txt_value": {
          "type": "string"
        },
        "cname_target": {
          "type": "string"
        },
        "address_targets": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "txt_name",
        "txt_value",
        "cname_target",
        "address_targets"
      ]
    },
    "last_check": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "checked_at": {
              "$ref": "#/$defs/__schema0"
            },
            "outcome": {
              "type": "string"
            }
          },
          "required": [
            "checked_at",
            "outcome"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "certificate": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "not_before": {
              "$ref": "#/$defs/__schema0"
            },
            "not_after": {
              "$ref": "#/$defs/__schema0"
            },
            "issuer": {
              "type": "string"
            },
            "fingerprint_sha256": {
              "type": "string"
            }
          },
          "required": [
            "not_before",
            "not_after",
            "issuer",
            "fingerprint_sha256"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "surface_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "$ref": "#/$defs/__schema0"
    },
    "updated_at": {
      "$ref": "#/$defs/__schema0"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "product_id",
    "environment_type",
    "hostname",
    "status",
    "reason_code",
    "verification",
    "last_check",
    "certificate",
    "surface_id",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Domains

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^dom_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "environment_type": {
            "type": "string",
            "enum": [
              "staging",
              "production"
            ]
          },
          "hostname": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending_verification",
              "verified",
              "issuing",
              "active",
              "verification_failed",
              "certificate_failed",
              "removed"
            ]
          },
          "reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "verification": {
            "type": "object",
            "properties": {
              "txt_name": {
                "type": "string"
              },
              "txt_value": {
                "type": "string"
              },
              "cname_target": {
                "type": "string"
              },
              "address_targets": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "txt_name",
              "txt_value",
              "cname_target",
              "address_targets"
            ]
          },
          "last_check": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "checked_at": {
                    "$ref": "#/$defs/__schema0"
                  },
                  "outcome": {
                    "type": "string"
                  }
                },
                "required": [
                  "checked_at",
                  "outcome"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "certificate": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "not_before": {
                    "$ref": "#/$defs/__schema0"
                  },
                  "not_after": {
                    "$ref": "#/$defs/__schema0"
                  },
                  "issuer": {
                    "type": "string"
                  },
                  "fingerprint_sha256": {
                    "type": "string"
                  }
                },
                "required": [
                  "not_before",
                  "not_after",
                  "issuer",
                  "fingerprint_sha256"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "surface_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/$defs/__schema0"
          },
          "updated_at": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "product_id",
          "environment_type",
          "hostname",
          "status",
          "reason_code",
          "verification",
          "last_check",
          "certificate",
          "surface_id",
          "created_at",
          "updated_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

FixRequest

{
  "type": "object",
  "properties": {
    "pipeline_run_id": {
      "type": "string",
      "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "finding_ids": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema0"
      }
    }
  },
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^fnd_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  }
}

FixRun

{
  "type": "object",
  "properties": {
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "fix_run_id": {
      "type": "string",
      "pattern": "^fix_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "attempt": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "status": {
      "type": "string",
      "enum": [
        "requested",
        "context",
        "generating",
        "patch_apply",
        "reverify",
        "candidate",
        "failed",
        "approved",
        "rejected",
        "expired"
      ]
    },
    "pipeline_run_id": {
      "type": "string",
      "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "patch_evidence": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string"
        },
        "sha256": {
          "type": "string"
        },
        "size_bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "uri",
        "sha256",
        "size_bytes"
      ]
    },
    "touched_paths": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "reverify": {
      "$ref": "#/$defs/__schema0"
    },
    "relock": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "applied",
            "skipped",
            "failed"
          ]
        }
      },
      "required": [
        "status"
      ]
    },
    "lockfile_integrity": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "verified",
            "mismatch",
            "unchecked"
          ]
        }
      },
      "required": [
        "status"
      ]
    },
    "model": {
      "type": "object",
      "properties": {
        "binding_id": {
          "type": "string",
          "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "provider": {
          "type": "string"
        }
      },
      "required": [
        "binding_id",
        "provider"
      ]
    },
    "units_used": {
      "type": "number",
      "minimum": 0
    },
    "failure": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ]
    },
    "new_revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "requested_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "decided_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "issue_class": {
      "type": "string"
    },
    "deterministic_path": {
      "type": "boolean"
    },
    "human_decision": {
      "type": "string",
      "enum": [
        "approved",
        "rejected",
        "expired"
      ]
    },
    "dependencies_removed": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "auto_apply": {
      "type": "object",
      "properties": {
        "eligible": {
          "type": "boolean"
        },
        "reason": {
          "type": "string",
          "enum": [
            "class_not_open",
            "mixed_classes",
            "unknown_class",
            "not_deterministic",
            "dependencies_removed",
            "eligible"
          ]
        }
      },
      "required": [
        "eligible",
        "reason"
      ]
    },
    "attempts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "attempt": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "pipeline_run_id": {
            "type": "string",
            "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "reverify": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "required": [
          "attempt"
        ]
      }
    }
  },
  "required": [
    "fix_run_id",
    "workspace_id",
    "product_id",
    "revision_id",
    "attempt",
    "status",
    "units_used",
    "requested_at",
    "deterministic_path",
    "attempts"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "pipeline_run_id": {
          "type": "string",
          "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "status": {
          "type": "string",
          "enum": [
            "passed",
            "failed"
          ]
        },
        "residual_advisory_candidate": {
          "type": "boolean"
        },
        "residual_advisory_candidates": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "pipeline_run_id",
        "status"
      ]
    }
  }
}

FixRuns

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "fix_run_id": {
            "type": "string",
            "pattern": "^fix_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "revision_id": {
            "type": "string",
            "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "attempt": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "context",
              "generating",
              "patch_apply",
              "reverify",
              "candidate",
              "failed",
              "approved",
              "rejected",
              "expired"
            ]
          },
          "pipeline_run_id": {
            "type": "string",
            "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "patch_evidence": {
            "type": "object",
            "properties": {
              "uri": {
                "type": "string"
              },
              "sha256": {
                "type": "string"
              },
              "size_bytes": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "uri",
              "sha256",
              "size_bytes"
            ]
          },
          "touched_paths": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reverify": {
            "$ref": "#/$defs/__schema0"
          },
          "relock": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "applied",
                  "skipped",
                  "failed"
                ]
              }
            },
            "required": [
              "status"
            ]
          },
          "lockfile_integrity": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "verified",
                  "mismatch",
                  "unchecked"
                ]
              }
            },
            "required": [
              "status"
            ]
          },
          "model": {
            "type": "object",
            "properties": {
              "binding_id": {
                "type": "string",
                "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              "provider": {
                "type": "string"
              }
            },
            "required": [
              "binding_id",
              "provider"
            ]
          },
          "units_used": {
            "type": "number",
            "minimum": 0
          },
          "failure": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              }
            },
            "required": [
              "code"
            ]
          },
          "new_revision_id": {
            "type": "string",
            "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "requested_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "decided_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "issue_class": {
            "type": "string"
          },
          "deterministic_path": {
            "type": "boolean"
          },
          "human_decision": {
            "type": "string",
            "enum": [
              "approved",
              "rejected",
              "expired"
            ]
          },
          "dependencies_removed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "auto_apply": {
            "type": "object",
            "properties": {
              "eligible": {
                "type": "boolean"
              },
              "reason": {
                "type": "string",
                "enum": [
                  "class_not_open",
                  "mixed_classes",
                  "unknown_class",
                  "not_deterministic",
                  "dependencies_removed",
                  "eligible"
                ]
              }
            },
            "required": [
              "eligible",
              "reason"
            ]
          },
          "attempts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "attempt": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "pipeline_run_id": {
                  "type": "string",
                  "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                },
                "reverify": {
                  "$ref": "#/$defs/__schema0"
                }
              },
              "required": [
                "attempt"
              ]
            }
          }
        },
        "required": [
          "fix_run_id",
          "workspace_id",
          "product_id",
          "revision_id",
          "attempt",
          "status",
          "units_used",
          "requested_at",
          "deterministic_path",
          "attempts"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "pipeline_run_id": {
          "type": "string",
          "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "status": {
          "type": "string",
          "enum": [
            "passed",
            "failed"
          ]
        },
        "residual_advisory_candidate": {
          "type": "boolean"
        },
        "residual_advisory_candidates": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "pipeline_run_id",
        "status"
      ]
    }
  }
}

Readiness

{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ready",
        "degraded",
        "not_ready"
      ]
    },
    "checked_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "checks": {
      "type": "object",
      "properties": {
        "db": {
          "$ref": "#/$defs/__schema0"
        },
        "storage": {
          "$ref": "#/$defs/__schema0"
        },
        "runner": {
          "$ref": "#/$defs/__schema0"
        },
        "oidc": {
          "$ref": "#/$defs/__schema0"
        },
        "intake": {
          "$ref": "#/$defs/__schema0"
        },
        "persistence": {
          "$ref": "#/$defs/__schema0"
        }
      },
      "required": [
        "db",
        "storage",
        "runner",
        "oidc",
        "intake",
        "persistence"
      ]
    }
  },
  "required": [
    "status",
    "checked_at",
    "checks"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "ok",
            "fail",
            "skipped"
          ]
        },
        "latency_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "detail": {
          "type": "string",
          "enum": [
            "available",
            "unavailable",
            "timeout",
            "not configured",
            "bridge_ledger_and_replays_injected"
          ]
        }
      },
      "required": [
        "status"
      ]
    }
  }
}

BackgroundJobs

{
  "type": "object",
  "properties": {
    "jobs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "last_started_at": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_succeeded_at": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_failed_at": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "running_since": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "running_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name",
          "last_started_at",
          "last_succeeded_at",
          "last_failed_at",
          "running_since",
          "running_ms"
        ]
      }
    },
    "outbox": {
      "type": "object",
      "properties": {
        "unconfirmed": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        },
        "dead_letters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        }
      },
      "required": [
        "unconfirmed",
        "dead_letters"
      ]
    }
  },
  "required": [
    "jobs",
    "outbox"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema1": {
      "type": "object",
      "properties": {
        "consumer": {
          "type": "string"
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "consumer",
        "count"
      ]
    }
  }
}

Notifications

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "notification_id": {
            "type": "string",
            "pattern": "^ntf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "category": {
            "type": "string"
          },
          "template_key": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "requested",
              "delivered",
              "failed"
            ],
            "description": "Delivered means Resend accepted the email; it does not mean the email reached the recipient inbox."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "delivered_at": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ],
            "description": "Delivered means Resend accepted the email; it does not mean the email reached the recipient inbox."
          },
          "recipients": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "delivered": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991,
                "description": "Delivered means Resend accepted the email; it does not mean the email reached the recipient inbox."
              },
              "failed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "total",
              "delivered",
              "failed"
            ]
          }
        },
        "required": [
          "notification_id",
          "category",
          "template_key",
          "status",
          "created_at",
          "delivered_at",
          "recipients"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

DeadLetters

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "consumer": {
            "type": "string",
            "minLength": 1
          },
          "attempts": {
            "type": "number",
            "const": 5
          },
          "last_error": {
            "type": "string",
            "maxLength": 64,
            "pattern": "^(handler_failed|contract_violation|persistence_error|handler_error:[A-Za-z0-9_]+)$"
          },
          "failed_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "event_id",
          "consumer",
          "attempts",
          "last_error",
          "failed_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

PlatformDeadLetter

{
  "type": "object",
  "properties": {
    "event_id": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "consumer": {
      "type": "string",
      "minLength": 1
    },
    "attempts": {
      "type": "number",
      "const": 5
    },
    "last_error": {
      "type": "string",
      "maxLength": 64,
      "pattern": "^(handler_failed|contract_violation|persistence_error|handler_error:[A-Za-z0-9_]+)$"
    },
    "failed_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    }
  },
  "required": [
    "event_id",
    "consumer",
    "attempts",
    "last_error",
    "failed_at",
    "workspace_id"
  ]
}

PlatformDeadLetters

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "consumer": {
            "type": "string",
            "minLength": 1
          },
          "attempts": {
            "type": "number",
            "const": 5
          },
          "last_error": {
            "type": "string",
            "maxLength": 64,
            "pattern": "^(handler_failed|contract_violation|persistence_error|handler_error:[A-Za-z0-9_]+)$"
          },
          "failed_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "string",
                "const": "ws_platform"
              }
            ]
          }
        },
        "required": [
          "event_id",
          "consumer",
          "attempts",
          "last_error",
          "failed_at",
          "workspace_id"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

StuckDelivery

{
  "type": "object",
  "properties": {
    "event_id": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "event_type": {
      "type": "string"
    },
    "workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    },
    "consumer": {
      "type": "string",
      "minLength": 1
    },
    "attempts": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "claimed_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "redeliverable": {
      "type": "boolean"
    }
  },
  "required": [
    "event_id",
    "event_type",
    "workspace_id",
    "consumer",
    "attempts",
    "claimed_at",
    "redeliverable"
  ]
}

StuckDeliveries

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "event_type": {
            "type": "string"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "string",
                "const": "ws_platform"
              }
            ]
          },
          "consumer": {
            "type": "string",
            "minLength": 1
          },
          "attempts": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "claimed_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "redeliverable": {
            "type": "boolean"
          }
        },
        "required": [
          "event_id",
          "event_type",
          "workspace_id",
          "consumer",
          "attempts",
          "claimed_at",
          "redeliverable"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

WorkspaceServiceIdentityRequest

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "kind": {
          "default": "bridge",
          "type": "string",
          "const": "bridge"
        },
        "product_id": {
          "type": "string",
          "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "scope": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "ai.generate"
                },
                "actions": {
                  "minItems": 1,
                  "maxItems": 16,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema0"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "models": {
                      "minItems": 1,
                      "maxItems": 16,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema1"
                      }
                    },
                    "max_tokens_per_call": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "models",
                    "max_tokens_per_call"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "storage.object"
                },
                "actions": {
                  "minItems": 1,
                  "maxItems": 16,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema2"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "prefix": {
                      "type": "string",
                      "pattern": "^\\/(?!.*\\.\\.).*$"
                    },
                    "max_object_bytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "prefix",
                    "max_object_bytes"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "data.kv"
                },
                "actions": {
                  "minItems": 1,
                  "maxItems": 16,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema3"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "prefix": {
                      "type": "string",
                      "pattern": "^\\/(?!.*\\.\\.).*$"
                    },
                    "max_value_bytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 65536
                    },
                    "max_keys": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 100000
                    }
                  },
                  "required": [
                    "prefix",
                    "max_value_bytes",
                    "max_keys"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "email.send"
                },
                "actions": {
                  "minItems": 1,
                  "maxItems": 16,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema4"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "from_addresses": {
                      "minItems": 1,
                      "maxItems": 32,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema5"
                      }
                    },
                    "recipient_domains": {
                      "minItems": 1,
                      "maxItems": 32,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema6"
                      }
                    },
                    "max_recipients": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 50
                    },
                    "max_message_bytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 1048576
                    }
                  },
                  "required": [
                    "from_addresses",
                    "recipient_domains",
                    "max_recipients",
                    "max_message_bytes"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            }
          ]
        },
        "budget": {
          "type": "object",
          "properties": {
            "units": {
              "type": "number",
              "minimum": 0
            },
            "unit": {
              "type": "string",
              "enum": [
                "tokens",
                "bytes",
                "calls"
              ]
            }
          },
          "required": [
            "units",
            "unit"
          ]
        }
      },
      "required": [
        "product_id",
        "scope",
        "budget"
      ]
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "automation"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "product_id": {
          "type": "null"
        },
        "scope": {
          "type": "null"
        },
        "budget": {
          "type": "null"
        }
      },
      "required": [
        "kind",
        "name",
        "product_id",
        "scope",
        "budget"
      ],
      "additionalProperties": false
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "enum": [
        "generate"
      ]
    },
    "__schema1": {
      "type": "string",
      "enum": [
        "text",
        "embedding"
      ]
    },
    "__schema2": {
      "type": "string",
      "enum": [
        "read",
        "write",
        "delete",
        "list"
      ]
    },
    "__schema3": {
      "type": "string",
      "enum": [
        "get",
        "set",
        "delete",
        "list",
        "increment"
      ]
    },
    "__schema4": {
      "type": "string",
      "enum": [
        "send"
      ]
    },
    "__schema5": {
      "type": "string",
      "maxLength": 254,
      "pattern": "^(?!.*[A-Z])(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[ !#-[\\]-~]|\\\\[ -~])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
    },
    "__schema6": {
      "type": "string",
      "maxLength": 253,
      "pattern": "^(?:\\*|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$"
    }
  }
}

PlatformServiceIdentityRequest

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "runner"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "product_id": {
          "type": "null"
        },
        "scope": {
          "type": "null"
        },
        "budget": {
          "type": "null"
        }
      },
      "required": [
        "kind",
        "name",
        "product_id",
        "scope",
        "budget"
      ]
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "control-plane"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "product_id": {
          "type": "null"
        },
        "scope": {
          "type": "null"
        },
        "budget": {
          "type": "null"
        }
      },
      "required": [
        "kind",
        "name",
        "product_id",
        "scope",
        "budget"
      ]
    }
  ]
}

NorthStar

{
  "type": "object",
  "properties": {
    "computed_day": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "production": {
      "type": "object",
      "properties": {
        "north_star": {
          "$ref": "#/$defs/__schema0"
        },
        "launched_apps": {
          "$ref": "#/$defs/__schema0"
        }
      },
      "required": [
        "north_star",
        "launched_apps"
      ]
    },
    "staging_trial": {
      "type": "object",
      "properties": {
        "north_star": {
          "$ref": "#/$defs/__schema0"
        },
        "launched_apps": {
          "$ref": "#/$defs/__schema0"
        }
      },
      "required": [
        "north_star",
        "launched_apps"
      ]
    },
    "definitions": {
      "type": "object",
      "properties": {
        "minimum_age_days": {
          "$ref": "#/$defs/__schema0"
        },
        "usage_window_days": {
          "$ref": "#/$defs/__schema0"
        },
        "minimum_daily_samples": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "healthy_ratio": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      },
      "required": [
        "minimum_age_days",
        "usage_window_days",
        "minimum_daily_samples",
        "healthy_ratio"
      ]
    }
  },
  "required": [
    "computed_day",
    "production",
    "staging_trial",
    "definitions"
  ],
  "$defs": {
    "__schema0": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

NorthStarApps

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "workspace_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "string",
                "const": "ws_platform"
              }
            ]
          },
          "app_id": {
            "type": "string",
            "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "launched_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "days_since_launch": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "service_count": {
            "$ref": "#/$defs/__schema0"
          },
          "used_days_last_7": {
            "maximum": 7,
            "$ref": "#/$defs/__schema0"
          },
          "healthy": {
            "type": "boolean"
          },
          "qualifies": {
            "type": "boolean"
          },
          "request_days": {
            "$ref": "#/$defs/__schema0"
          },
          "healthy_days": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "required": [
          "workspace_id",
          "app_id",
          "launched_on",
          "days_since_launch",
          "service_count",
          "used_days_last_7",
          "healthy",
          "qualifies",
          "request_days",
          "healthy_days"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  }
}

AppVersion

{
  "type": "object",
  "properties": {
    "source": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "commit"
            },
            "commit_sha": {
              "type": "string",
              "pattern": "^[0-9a-f]{40}$"
            },
            "repository_url": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "commit_sha",
            "repository_url"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "archive"
            },
            "revision_id": {
              "type": "string",
              "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            }
          },
          "required": [
            "kind",
            "revision_id"
          ]
        }
      ]
    },
    "latest_created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "services": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "revisions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "revision_id": {
                  "type": "string",
                  "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                "fix_run_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^fix_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "revision_id",
                "created_at",
                "fix_run_id"
              ]
            }
          }
        },
        "required": [
          "product_id",
          "revisions"
        ]
      }
    }
  },
  "required": [
    "source",
    "latest_created_at",
    "services"
  ]
}

AppVersions

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "commit"
                  },
                  "commit_sha": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{40}$"
                  },
                  "repository_url": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "commit_sha",
                  "repository_url"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "archive"
                  },
                  "revision_id": {
                    "type": "string",
                    "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  }
                },
                "required": [
                  "kind",
                  "revision_id"
                ]
              }
            ]
          },
          "latest_created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "product_id": {
                  "type": "string",
                  "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                },
                "revisions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "revision_id": {
                        "type": "string",
                        "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                      },
                      "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      "fix_run_id": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^fix_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "revision_id",
                      "created_at",
                      "fix_run_id"
                    ]
                  }
                }
              },
              "required": [
                "product_id",
                "revisions"
              ]
            }
          }
        },
        "required": [
          "source",
          "latest_created_at",
          "services"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

Apps

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "retiring",
              "retired"
            ]
          },
          "source_repository_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "service_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "created_at": {
            "$ref": "#/$defs/__schema0"
          },
          "updated_at": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "name",
          "state",
          "source_repository_url",
          "service_count",
          "created_at",
          "updated_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Workspace

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_role": {
      "type": "string",
      "enum": [
        "owner",
        "admin",
        "developer"
      ]
    }
  },
  "required": [
    "id",
    "workspace_role"
  ]
}

Workspaces

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "developer"
            ]
          }
        },
        "required": [
          "id",
          "workspace_role"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

Products

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "app_budget": {
            "type": "object",
            "properties": {
              "app_id": {
                "type": "string",
                "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              "monthly_cap_credits": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "settled_credits": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "reserved_credits": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "app_id",
              "monthly_cap_credits",
              "settled_credits",
              "reserved_credits"
            ]
          },
          "app_id": {
            "type": "string",
            "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "root_path": {
            "default": null,
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "type": {
            "type": "string",
            "const": "hosted-app"
          },
          "input_revision_id": {
            "type": "string",
            "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "created_at": {
            "$ref": "#/$defs/__schema0"
          },
          "updated_at": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "required": [
          "app_id",
          "id",
          "workspace_id",
          "type",
          "input_revision_id",
          "created_at",
          "updated_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Revisions

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "capability_contract": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "const": "rejected"
              },
              "reason": {
                "type": "string",
                "enum": [
                  "unknown_capability",
                  "unknown_action",
                  "scope_invalid",
                  "scope_widened",
                  "owner_not_supported",
                  "contract_too_large"
                ]
              }
            },
            "required": [
              "status",
              "reason"
            ]
          },
          "id": {
            "type": "string",
            "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "input_revision_id": {
            "type": "string",
            "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "product_type": {
            "type": "string",
            "const": "hosted-app"
          },
          "descriptor": {
            "type": "object",
            "properties": {
              "build_plan": {
                "type": "object",
                "properties": {
                  "runtime": {
                    "$ref": "#/$defs/__schema0"
                  },
                  "workdir": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "install": {
                    "$ref": "#/$defs/__schema2"
                  },
                  "build": {
                    "$ref": "#/$defs/__schema3"
                  },
                  "start": {
                    "$ref": "#/$defs/__schema4"
                  },
                  "port": {
                    "$ref": "#/$defs/__schema5"
                  },
                  "health": {
                    "$ref": "#/$defs/__schema6"
                  },
                  "env": {
                    "$ref": "#/$defs/__schema7"
                  }
                },
                "required": [
                  "runtime",
                  "workdir",
                  "install",
                  "build",
                  "start",
                  "port",
                  "health",
                  "env"
                ]
              },
              "runtime": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "node",
                      "shell"
                    ]
                  },
                  "version": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "kind",
                  "version"
                ]
              },
              "entrypoint": {
                "type": "object",
                "properties": {
                  "command": {
                    "type": "string"
                  },
                  "args": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "command",
                  "args"
                ]
              },
              "ports": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "port": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "protocol": {
                      "type": "string",
                      "const": "http"
                    }
                  },
                  "required": [
                    "port",
                    "protocol"
                  ]
                }
              },
              "field_sources": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string",
                  "enum": [
                    "detected",
                    "developer"
                  ]
                }
              }
            },
            "required": [
              "runtime",
              "entrypoint",
              "ports",
              "field_sources"
            ]
          },
          "descriptor_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "build_variables_hash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "confirmed_by": {
            "type": "string",
            "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "created_at": {
            "$ref": "#/$defs/__schema8"
          },
          "updated_at": {
            "$ref": "#/$defs/__schema8"
          },
          "source": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "repository_url": {
                    "type": "string"
                  },
                  "repository_ref": {
                    "type": "string"
                  },
                  "commit_sha": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{40}$"
                  }
                },
                "required": [
                  "repository_url",
                  "repository_ref",
                  "commit_sha"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "contract_status": {
            "type": "string",
            "enum": [
              "ready",
              "rejected",
              "pending"
            ]
          },
          "current_verification": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "verified",
                      "degraded",
                      "blocked",
                      "revoked"
                    ]
                  },
                  "computed_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  }
                },
                "required": [
                  "status",
                  "computed_at"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "dependency_recheck": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "clean",
                      "findings",
                      "unavailable",
                      "not_covered"
                    ]
                  },
                  "checked_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "snapshot_date": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "findings": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema9"
                    }
                  },
                  "findings_total": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "status",
                  "checked_at",
                  "snapshot_date",
                  "findings",
                  "findings_total"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "pipeline_runs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                },
                "product_id": {
                  "type": "string",
                  "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                },
                "revision_id": {
                  "type": "string",
                  "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                },
                "intent": {
                  "type": "string",
                  "enum": [
                    "preview",
                    "qualification",
                    "reassessment",
                    "fix_reverify"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending_snapshot",
                    "authorization_requested",
                    "blocked",
                    "admitted",
                    "requested",
                    "reported",
                    "completed",
                    "failed",
                    "passed",
                    "warning",
                    "unsafe"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "evidence": {
                  "default": [],
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "stage": {
                        "type": "string",
                        "enum": [
                          "build",
                          "scan",
                          "startup_check"
                        ]
                      },
                      "log_evidence": {
                        "type": "object",
                        "properties": {
                          "uri": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sha256": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$"
                          },
                          "size_bytes": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "uri",
                          "sha256",
                          "size_bytes"
                        ]
                      }
                    },
                    "required": [
                      "stage",
                      "log_evidence"
                    ]
                  }
                },
                "qualification": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "qualified",
                        "stopped",
                        "pending"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "missing_evidence",
                        "blocking_findings",
                        "verification_blocked"
                      ]
                    },
                    "version_id": {
                      "type": "string",
                      "pattern": "^ver_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                    }
                  },
                  "required": [
                    "status"
                  ]
                },
                "findings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string"
                      },
                      "severity": {
                        "type": "string"
                      },
                      "code": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      },
                      "location": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string"
                              },
                              "line": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "path",
                              "line"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "rule_id": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "dependency": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "package": {
                                "type": "string"
                              },
                              "version": {
                                "type": "string"
                              },
                              "advisory_id": {
                                "type": "string"
                              },
                              "cvss": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "fixed_in": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "package",
                              "version",
                              "advisory_id",
                              "cvss",
                              "fixed_in"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "severity",
                      "code",
                      "message"
                    ]
                  }
                },
                "created_at": {
                  "$ref": "#/$defs/__schema8"
                },
                "updated_at": {
                  "$ref": "#/$defs/__schema8"
                }
              },
              "required": [
                "id",
                "workspace_id",
                "revision_id",
                "intent",
                "status",
                "findings",
                "created_at",
                "updated_at"
              ]
            }
          }
        },
        "required": [
          "id",
          "workspace_id",
          "product_id",
          "input_revision_id",
          "product_type",
          "descriptor",
          "descriptor_hash",
          "confirmed_by",
          "created_at",
          "updated_at",
          "contract_status",
          "current_verification",
          "dependency_recheck",
          "pipeline_runs"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "node",
            "shell"
          ]
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "kind",
        "version"
      ]
    },
    "__schema1": {
      "type": "string",
      "pattern": "^\\/.*"
    },
    "__schema2": {
      "type": "object",
      "properties": {
        "package_manager": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "pnpm",
                "npm",
                "yarn"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "command": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "package_manager",
        "command"
      ]
    },
    "__schema3": {
      "type": "object",
      "properties": {
        "command": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "command"
      ]
    },
    "__schema4": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string"
        }
      },
      "required": [
        "command"
      ]
    },
    "__schema5": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65535
    },
    "__schema6": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "pattern": "^\\/.*"
        },
        "timeout_ms": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "path",
        "timeout_ms"
      ]
    },
    "__schema7": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "PORT",
          "NODE_ENV"
        ]
      }
    },
    "__schema8": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema9": {
      "type": "object",
      "properties": {
        "package": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "advisory_id": {
          "type": "string"
        },
        "severity": {
          "type": "string",
          "enum": [
            "info",
            "warning",
            "error"
          ]
        },
        "cvss": {
          "type": [
            "string",
            "null"
          ]
        },
        "fixed_in": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "package",
        "version",
        "advisory_id",
        "severity",
        "cvss",
        "fixed_in"
      ]
    }
  }
}

Releases

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "version_id": {
            "type": "string",
            "pattern": "^ver_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "channel": {
            "type": "string",
            "enum": [
              "preview_internal",
              "staged",
              "production"
            ]
          },
          "audience": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "internal",
                  "workspace",
                  "custom"
                ]
              }
            },
            "required": [
              "kind"
            ]
          },
          "window": {
            "type": "object",
            "properties": {
              "starts_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "ends_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "starts_at",
              "ends_at"
            ]
          },
          "id": {
            "type": "string",
            "pattern": "^rel_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "ready",
              "live",
              "retired",
              "blocked",
              "pending_approval"
            ]
          },
          "frozen_at": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "$ref": "#/$defs/__schema0"
          },
          "updated_at": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "required": [
          "product_id",
          "version_id",
          "channel",
          "audience",
          "window",
          "id",
          "workspace_id",
          "status",
          "frozen_at",
          "reason_code",
          "created_at",
          "updated_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Deployments

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "revision_id": {
            "type": "string",
            "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "pipeline_run_id": {
            "type": "string",
            "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "environment_id": {
            "type": "string",
            "pattern": "^env_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "environment_type": {
            "type": "string",
            "enum": [
              "preview",
              "staging",
              "production"
            ]
          },
          "slot": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "planned",
              "applying",
              "active",
              "superseded",
              "stopped",
              "blocked",
              "failed"
            ]
          },
          "reason_code": {
            "type": "string"
          },
          "required_isolation_profile": {
            "type": "string",
            "const": "isolated-vm"
          },
          "egress": {
            "anyOf": [
              {
                "type": "string",
                "const": "deny"
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "allowlist"
                  },
                  "tier": {
                    "type": "string",
                    "enum": [
                      "free",
                      "paid"
                    ]
                  },
                  "entries": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema0"
                    }
                  }
                },
                "required": [
                  "mode",
                  "entries"
                ],
                "additionalProperties": false
              }
            ]
          },
          "isolation": {
            "type": "object",
            "properties": {
              "profile": {
                "type": "string",
                "const": "isolated-vm"
              },
              "enforced": {
                "type": "boolean"
              }
            },
            "required": [
              "profile",
              "enforced"
            ]
          },
          "health": {
            "type": "object",
            "properties": {
              "checked_at": {
                "$ref": "#/$defs/__schema1"
              },
              "attempts": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "latency_ms": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "observed": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "healthy",
                          "unhealthy",
                          "not_running",
                          "missing",
                          "asleep",
                          "unknown"
                        ]
                      },
                      "sampled_at": {
                        "anyOf": [
                          {
                            "$ref": "#/$defs/__schema1"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "last_healthy_at": {
                        "anyOf": [
                          {
                            "$ref": "#/$defs/__schema1"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "consecutive_failures": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "last_status_code": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "latency_ms": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "exit_code": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "reason_code": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "http_status",
                              "timeout",
                              "connection_failed",
                              "process_exited",
                              "not_registered",
                              "workload_absent"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "state",
                      "sampled_at",
                      "last_healthy_at",
                      "consecutive_failures",
                      "last_status_code",
                      "latency_ms",
                      "exit_code",
                      "reason_code"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "checked_at",
              "attempts",
              "latency_ms",
              "observed"
            ]
          },
          "endpoint": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "address"
            ]
          },
          "superseded_deployment_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "surface_id": {
            "type": "string",
            "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "severity": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "location": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string"
                        },
                        "line": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "path",
                        "line"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rule_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dependency": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "package": {
                          "type": "string"
                        },
                        "version": {
                          "type": "string"
                        },
                        "advisory_id": {
                          "type": "string"
                        },
                        "cvss": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "fixed_in": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "package",
                        "version",
                        "advisory_id",
                        "cvss",
                        "fixed_in"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "severity",
                "code",
                "message"
              ]
            }
          },
          "created_at": {
            "$ref": "#/$defs/__schema1"
          },
          "updated_at": {
            "$ref": "#/$defs/__schema1"
          },
          "source": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "revision"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "release"
                  },
                  "release_id": {
                    "type": "string",
                    "pattern": "^rel_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  "version_id": {
                    "type": "string",
                    "pattern": "^ver_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  }
                },
                "required": [
                  "kind",
                  "release_id",
                  "version_id"
                ]
              }
            ]
          }
        },
        "required": [
          "id",
          "workspace_id",
          "product_id",
          "revision_id",
          "environment_type",
          "slot",
          "status",
          "required_isolation_profile",
          "egress",
          "findings",
          "created_at",
          "updated_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string",
          "maxLength": 253,
          "pattern": "^(\\*\\.)?([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]([a-z0-9-]{0,61}[a-z0-9])?$"
        },
        "port": {
          "type": "integer",
          "minimum": 1,
          "maximum": 65535
        }
      },
      "required": [
        "host",
        "port"
      ],
      "additionalProperties": false
    },
    "__schema1": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Surfaces

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "deployment_id": {
            "type": "string",
            "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "environment_id": {
            "type": "string",
            "pattern": "^env_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "environment_type": {
            "type": "string",
            "enum": [
              "preview",
              "staging",
              "production"
            ]
          },
          "surface_type": {
            "type": "string",
            "const": "web"
          },
          "status": {
            "type": "string",
            "enum": [
              "awaiting_expiration_registration",
              "validating",
              "active",
              "expiration_registration_failed",
              "configuration_failed",
              "expired"
            ]
          },
          "reason_code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "route": {
            "type": "object",
            "properties": {
              "host": {
                "type": "string"
              },
              "path": {
                "type": "string"
              }
            },
            "required": [
              "host",
              "path"
            ]
          },
          "identity_requirement": {
            "type": "string",
            "enum": [
              "none",
              "workspace_member"
            ]
          },
          "access_policy": {
            "type": "string",
            "enum": [
              "preview_direct",
              "workspace_private"
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "deadline_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^ddl_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "reachability": {
            "type": "object",
            "properties": {
              "checked_at": {
                "$ref": "#/$defs/__schema0"
              },
              "status_code": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "latency_ms": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "checked_at",
              "status_code",
              "latency_ms"
            ]
          },
          "activated_at": {
            "$ref": "#/$defs/__schema0"
          },
          "created_at": {
            "$ref": "#/$defs/__schema0"
          },
          "updated_at": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "product_id",
          "deployment_id",
          "environment_id",
          "environment_type",
          "surface_type",
          "status",
          "identity_requirement",
          "access_policy",
          "expires_at",
          "deadline_id",
          "created_at",
          "updated_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

Breakage

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "episode_id": {
          "$ref": "#/$defs/__schema0"
        },
        "workspace_id": {
          "$ref": "#/$defs/__schema1"
        },
        "product_id": {
          "$ref": "#/$defs/__schema2"
        },
        "environment_id": {
          "$ref": "#/$defs/__schema3"
        },
        "environment_type": {
          "$ref": "#/$defs/__schema4"
        },
        "state": {
          "$ref": "#/$defs/__schema5"
        },
        "opened_at": {
          "$ref": "#/$defs/__schema6"
        },
        "closed_at": {
          "$ref": "#/$defs/__schema7"
        },
        "close_reason": {
          "$ref": "#/$defs/__schema8"
        },
        "occurrences": {
          "$ref": "#/$defs/__schema9"
        },
        "deployment_id": {
          "$ref": "#/$defs/__schema10"
        },
        "revision_id": {
          "$ref": "#/$defs/__schema11"
        },
        "kind": {
          "type": "string",
          "const": "deployment_failed"
        },
        "detail": {
          "type": "object",
          "properties": {
            "phase": {
              "type": "string",
              "enum": [
                "apply",
                "startup",
                "health_check"
              ]
            },
            "finding_codes": {
              "maxItems": 10,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema12"
              }
            }
          },
          "required": [
            "phase",
            "finding_codes"
          ],
          "additionalProperties": false
        },
        "last_seen_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "episode_id",
        "workspace_id",
        "product_id",
        "environment_id",
        "environment_type",
        "state",
        "opened_at",
        "closed_at",
        "close_reason",
        "occurrences",
        "deployment_id",
        "revision_id",
        "kind",
        "detail",
        "last_seen_at"
      ]
    },
    {
      "type": "object",
      "properties": {
        "episode_id": {
          "$ref": "#/$defs/__schema0"
        },
        "workspace_id": {
          "$ref": "#/$defs/__schema1"
        },
        "product_id": {
          "$ref": "#/$defs/__schema2"
        },
        "environment_id": {
          "$ref": "#/$defs/__schema3"
        },
        "environment_type": {
          "$ref": "#/$defs/__schema4"
        },
        "state": {
          "$ref": "#/$defs/__schema5"
        },
        "opened_at": {
          "$ref": "#/$defs/__schema6"
        },
        "closed_at": {
          "$ref": "#/$defs/__schema7"
        },
        "close_reason": {
          "$ref": "#/$defs/__schema8"
        },
        "occurrences": {
          "$ref": "#/$defs/__schema9"
        },
        "deployment_id": {
          "$ref": "#/$defs/__schema10"
        },
        "revision_id": {
          "$ref": "#/$defs/__schema11"
        },
        "kind": {
          "type": "string",
          "const": "workload_lost"
        },
        "detail": {
          "type": "object",
          "properties": {
            "detected_by": {
              "type": "string",
              "enum": [
                "visitor",
                "probe"
              ]
            }
          },
          "required": [
            "detected_by"
          ],
          "additionalProperties": false
        },
        "last_seen_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "episode_id",
        "workspace_id",
        "product_id",
        "environment_id",
        "environment_type",
        "state",
        "opened_at",
        "closed_at",
        "close_reason",
        "occurrences",
        "deployment_id",
        "revision_id",
        "kind",
        "detail",
        "last_seen_at"
      ]
    },
    {
      "type": "object",
      "properties": {
        "episode_id": {
          "$ref": "#/$defs/__schema0"
        },
        "workspace_id": {
          "$ref": "#/$defs/__schema1"
        },
        "product_id": {
          "$ref": "#/$defs/__schema2"
        },
        "environment_id": {
          "$ref": "#/$defs/__schema3"
        },
        "environment_type": {
          "$ref": "#/$defs/__schema4"
        },
        "state": {
          "$ref": "#/$defs/__schema5"
        },
        "opened_at": {
          "$ref": "#/$defs/__schema6"
        },
        "closed_at": {
          "$ref": "#/$defs/__schema7"
        },
        "close_reason": {
          "$ref": "#/$defs/__schema8"
        },
        "occurrences": {
          "$ref": "#/$defs/__schema9"
        },
        "deployment_id": {
          "$ref": "#/$defs/__schema10"
        },
        "revision_id": {
          "$ref": "#/$defs/__schema11"
        },
        "kind": {
          "type": "string",
          "const": "health_check_failed"
        },
        "detail": {
          "type": "object",
          "properties": {
            "health_state": {
              "type": "string",
              "enum": [
                "unhealthy",
                "not_running"
              ]
            },
            "reason_code": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "http_status",
                    "timeout",
                    "connection_failed",
                    "process_exited",
                    "not_registered",
                    "workload_absent"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "health_state",
            "reason_code"
          ],
          "additionalProperties": false
        },
        "last_seen_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "episode_id",
        "workspace_id",
        "product_id",
        "environment_id",
        "environment_type",
        "state",
        "opened_at",
        "closed_at",
        "close_reason",
        "occurrences",
        "deployment_id",
        "revision_id",
        "kind",
        "detail",
        "last_seen_at"
      ]
    },
    {
      "type": "object",
      "properties": {
        "episode_id": {
          "$ref": "#/$defs/__schema0"
        },
        "workspace_id": {
          "$ref": "#/$defs/__schema1"
        },
        "product_id": {
          "$ref": "#/$defs/__schema2"
        },
        "environment_id": {
          "$ref": "#/$defs/__schema3"
        },
        "environment_type": {
          "$ref": "#/$defs/__schema4"
        },
        "state": {
          "$ref": "#/$defs/__schema5"
        },
        "opened_at": {
          "$ref": "#/$defs/__schema6"
        },
        "closed_at": {
          "$ref": "#/$defs/__schema7"
        },
        "close_reason": {
          "$ref": "#/$defs/__schema8"
        },
        "occurrences": {
          "$ref": "#/$defs/__schema9"
        },
        "deployment_id": {
          "$ref": "#/$defs/__schema10"
        },
        "revision_id": {
          "$ref": "#/$defs/__schema11"
        },
        "kind": {
          "type": "string",
          "const": "vulnerability_found"
        },
        "detail": {
          "type": "object",
          "properties": {
            "finding_count": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "highest_severity": {
              "type": "string",
              "enum": [
                "info",
                "warning",
                "error",
                "critical"
              ]
            }
          },
          "required": [
            "finding_count",
            "highest_severity"
          ],
          "additionalProperties": false
        },
        "last_seen_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "episode_id",
        "workspace_id",
        "product_id",
        "environment_id",
        "environment_type",
        "state",
        "opened_at",
        "closed_at",
        "close_reason",
        "occurrences",
        "deployment_id",
        "revision_id",
        "kind",
        "detail",
        "last_seen_at"
      ]
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^brk_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema1": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema2": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema3": {
      "type": "string",
      "pattern": "^env_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema4": {
      "type": "string",
      "enum": [
        "staging",
        "production"
      ]
    },
    "__schema5": {
      "type": "string",
      "enum": [
        "open",
        "closed"
      ]
    },
    "__schema6": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema7": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema8": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "redeployed",
            "recovered",
            "deployment_stopped",
            "product_closed"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema9": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "__schema10": {
      "type": "string",
      "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema11": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema12": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    }
  }
}

Breakages

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "episode_id": {
                "$ref": "#/$defs/__schema0"
              },
              "workspace_id": {
                "$ref": "#/$defs/__schema1"
              },
              "product_id": {
                "$ref": "#/$defs/__schema2"
              },
              "environment_id": {
                "$ref": "#/$defs/__schema3"
              },
              "environment_type": {
                "$ref": "#/$defs/__schema4"
              },
              "state": {
                "$ref": "#/$defs/__schema5"
              },
              "opened_at": {
                "$ref": "#/$defs/__schema6"
              },
              "closed_at": {
                "$ref": "#/$defs/__schema7"
              },
              "close_reason": {
                "$ref": "#/$defs/__schema8"
              },
              "occurrences": {
                "$ref": "#/$defs/__schema9"
              },
              "deployment_id": {
                "$ref": "#/$defs/__schema10"
              },
              "revision_id": {
                "$ref": "#/$defs/__schema11"
              },
              "kind": {
                "type": "string",
                "const": "deployment_failed"
              },
              "detail": {
                "type": "object",
                "properties": {
                  "phase": {
                    "type": "string",
                    "enum": [
                      "apply",
                      "startup",
                      "health_check"
                    ]
                  },
                  "finding_codes": {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema12"
                    }
                  }
                },
                "required": [
                  "phase",
                  "finding_codes"
                ],
                "additionalProperties": false
              },
              "last_seen_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": [
              "episode_id",
              "workspace_id",
              "product_id",
              "environment_id",
              "environment_type",
              "state",
              "opened_at",
              "closed_at",
              "close_reason",
              "occurrences",
              "deployment_id",
              "revision_id",
              "kind",
              "detail",
              "last_seen_at"
            ]
          },
          {
            "type": "object",
            "properties": {
              "episode_id": {
                "$ref": "#/$defs/__schema0"
              },
              "workspace_id": {
                "$ref": "#/$defs/__schema1"
              },
              "product_id": {
                "$ref": "#/$defs/__schema2"
              },
              "environment_id": {
                "$ref": "#/$defs/__schema3"
              },
              "environment_type": {
                "$ref": "#/$defs/__schema4"
              },
              "state": {
                "$ref": "#/$defs/__schema5"
              },
              "opened_at": {
                "$ref": "#/$defs/__schema6"
              },
              "closed_at": {
                "$ref": "#/$defs/__schema7"
              },
              "close_reason": {
                "$ref": "#/$defs/__schema8"
              },
              "occurrences": {
                "$ref": "#/$defs/__schema9"
              },
              "deployment_id": {
                "$ref": "#/$defs/__schema10"
              },
              "revision_id": {
                "$ref": "#/$defs/__schema11"
              },
              "kind": {
                "type": "string",
                "const": "workload_lost"
              },
              "detail": {
                "type": "object",
                "properties": {
                  "detected_by": {
                    "type": "string",
                    "enum": [
                      "visitor",
                      "probe"
                    ]
                  }
                },
                "required": [
                  "detected_by"
                ],
                "additionalProperties": false
              },
              "last_seen_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": [
              "episode_id",
              "workspace_id",
              "product_id",
              "environment_id",
              "environment_type",
              "state",
              "opened_at",
              "closed_at",
              "close_reason",
              "occurrences",
              "deployment_id",
              "revision_id",
              "kind",
              "detail",
              "last_seen_at"
            ]
          },
          {
            "type": "object",
            "properties": {
              "episode_id": {
                "$ref": "#/$defs/__schema0"
              },
              "workspace_id": {
                "$ref": "#/$defs/__schema1"
              },
              "product_id": {
                "$ref": "#/$defs/__schema2"
              },
              "environment_id": {
                "$ref": "#/$defs/__schema3"
              },
              "environment_type": {
                "$ref": "#/$defs/__schema4"
              },
              "state": {
                "$ref": "#/$defs/__schema5"
              },
              "opened_at": {
                "$ref": "#/$defs/__schema6"
              },
              "closed_at": {
                "$ref": "#/$defs/__schema7"
              },
              "close_reason": {
                "$ref": "#/$defs/__schema8"
              },
              "occurrences": {
                "$ref": "#/$defs/__schema9"
              },
              "deployment_id": {
                "$ref": "#/$defs/__schema10"
              },
              "revision_id": {
                "$ref": "#/$defs/__schema11"
              },
              "kind": {
                "type": "string",
                "const": "health_check_failed"
              },
              "detail": {
                "type": "object",
                "properties": {
                  "health_state": {
                    "type": "string",
                    "enum": [
                      "unhealthy",
                      "not_running"
                    ]
                  },
                  "reason_code": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "http_status",
                          "timeout",
                          "connection_failed",
                          "process_exited",
                          "not_registered",
                          "workload_absent"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "health_state",
                  "reason_code"
                ],
                "additionalProperties": false
              },
              "last_seen_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": [
              "episode_id",
              "workspace_id",
              "product_id",
              "environment_id",
              "environment_type",
              "state",
              "opened_at",
              "closed_at",
              "close_reason",
              "occurrences",
              "deployment_id",
              "revision_id",
              "kind",
              "detail",
              "last_seen_at"
            ]
          },
          {
            "type": "object",
            "properties": {
              "episode_id": {
                "$ref": "#/$defs/__schema0"
              },
              "workspace_id": {
                "$ref": "#/$defs/__schema1"
              },
              "product_id": {
                "$ref": "#/$defs/__schema2"
              },
              "environment_id": {
                "$ref": "#/$defs/__schema3"
              },
              "environment_type": {
                "$ref": "#/$defs/__schema4"
              },
              "state": {
                "$ref": "#/$defs/__schema5"
              },
              "opened_at": {
                "$ref": "#/$defs/__schema6"
              },
              "closed_at": {
                "$ref": "#/$defs/__schema7"
              },
              "close_reason": {
                "$ref": "#/$defs/__schema8"
              },
              "occurrences": {
                "$ref": "#/$defs/__schema9"
              },
              "deployment_id": {
                "$ref": "#/$defs/__schema10"
              },
              "revision_id": {
                "$ref": "#/$defs/__schema11"
              },
              "kind": {
                "type": "string",
                "const": "vulnerability_found"
              },
              "detail": {
                "type": "object",
                "properties": {
                  "finding_count": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "highest_severity": {
                    "type": "string",
                    "enum": [
                      "info",
                      "warning",
                      "error",
                      "critical"
                    ]
                  }
                },
                "required": [
                  "finding_count",
                  "highest_severity"
                ],
                "additionalProperties": false
              },
              "last_seen_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              }
            },
            "required": [
              "episode_id",
              "workspace_id",
              "product_id",
              "environment_id",
              "environment_type",
              "state",
              "opened_at",
              "closed_at",
              "close_reason",
              "occurrences",
              "deployment_id",
              "revision_id",
              "kind",
              "detail",
              "last_seen_at"
            ]
          }
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^brk_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema1": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema2": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema3": {
      "type": "string",
      "pattern": "^env_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema4": {
      "type": "string",
      "enum": [
        "staging",
        "production"
      ]
    },
    "__schema5": {
      "type": "string",
      "enum": [
        "open",
        "closed"
      ]
    },
    "__schema6": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema7": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema8": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "redeployed",
            "recovered",
            "deployment_stopped",
            "product_closed"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema9": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "__schema10": {
      "type": "string",
      "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema11": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema12": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    }
  }
}

CapabilityInvocations

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^cap_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "revision_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "execution_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^exe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "bridge_invocation_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^inv_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "capability": {
            "type": [
              "string",
              "null"
            ]
          },
          "action": {
            "type": [
              "string",
              "null"
            ]
          },
          "environment_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "preview",
                  "staging",
                  "production"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "binding_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "requested",
              "completed",
              "denied",
              "failed"
            ]
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "outside_contract",
                  "permission_denied",
                  "policy_blocked",
                  "binding_missing",
                  "binding_revoked",
                  "usage_denied",
                  "provider_unavailable",
                  "provider_rejected",
                  "output_blocked",
                  "platform_unavailable"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_fallback_used": {
            "type": "boolean"
          },
          "usage_units": {
            "type": "number",
            "minimum": 0
          },
          "usage_unit": {
            "type": "string",
            "enum": [
              "tokens",
              "ms",
              "calls",
              "bytes"
            ]
          },
          "requested_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "product_id",
          "revision_id",
          "execution_id",
          "bridge_invocation_id",
          "capability",
          "action",
          "environment_type",
          "outcome",
          "reason",
          "provider",
          "is_fallback_used",
          "usage_units",
          "usage_unit",
          "requested_at",
          "finished_at",
          "created_at",
          "updated_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

Credentials

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "active",
              "revoked"
            ]
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "string",
                "const": "ws_platform"
              }
            ]
          },
          "owner_kind": {
            "type": "string",
            "enum": [
              "workspace",
              "platform"
            ]
          },
          "provider": {
            "type": "string"
          },
          "capability": {
            "type": "string"
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scope": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "created_by": {
            "type": "string",
            "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "state",
          "revoked_at",
          "id",
          "workspace_id",
          "owner_kind",
          "provider",
          "capability",
          "actions",
          "scope",
          "expires_at",
          "created_by",
          "created_at",
          "updated_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

ServiceIdentities

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/__schema0"
              },
              "service_identity_id": {
                "$ref": "#/$defs/__schema1"
              },
              "oidc_client_id": {
                "$ref": "#/$defs/__schema2"
              },
              "status": {
                "$ref": "#/$defs/__schema3"
              },
              "created_at": {
                "$ref": "#/$defs/__schema4"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema5"
              },
              "kind": {
                "default": "bridge",
                "type": "string",
                "const": "bridge"
              },
              "product_id": {
                "type": "string",
                "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              "scope": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "const": "ai.generate"
                      },
                      "actions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema6"
                        }
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "models": {
                            "minItems": 1,
                            "type": "array",
                            "items": {
                              "$ref": "#/$defs/__schema7"
                            }
                          },
                          "max_tokens_per_call": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "models",
                          "max_tokens_per_call"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "actions",
                      "scope"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "const": "storage.object"
                      },
                      "actions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema8"
                        }
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "prefix": {
                            "type": "string",
                            "pattern": "^\\/(?!.*\\.\\.).*$"
                          },
                          "max_object_bytes": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "prefix",
                          "max_object_bytes"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "actions",
                      "scope"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "const": "data.kv"
                      },
                      "actions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema9"
                        }
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "prefix": {
                            "type": "string",
                            "pattern": "^\\/(?!.*\\.\\.).*$"
                          },
                          "max_value_bytes": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 65536
                          },
                          "max_keys": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 100000
                          }
                        },
                        "required": [
                          "prefix",
                          "max_value_bytes",
                          "max_keys"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "actions",
                      "scope"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "const": "email.send"
                      },
                      "actions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema10"
                        }
                      },
                      "scope": {
                        "type": "object",
                        "properties": {
                          "from_addresses": {
                            "minItems": 1,
                            "maxItems": 32,
                            "type": "array",
                            "items": {
                              "$ref": "#/$defs/__schema11"
                            }
                          },
                          "recipient_domains": {
                            "minItems": 1,
                            "maxItems": 32,
                            "type": "array",
                            "items": {
                              "$ref": "#/$defs/__schema12"
                            }
                          },
                          "max_recipients": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 50
                          },
                          "max_message_bytes": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 1048576
                          }
                        },
                        "required": [
                          "from_addresses",
                          "recipient_domains",
                          "max_recipients",
                          "max_message_bytes"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "actions",
                      "scope"
                    ]
                  }
                ]
              },
              "budget": {
                "type": "object",
                "properties": {
                  "units": {
                    "type": "number",
                    "minimum": 0
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "tokens",
                      "bytes",
                      "calls"
                    ]
                  }
                },
                "required": [
                  "units",
                  "unit"
                ]
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              }
            },
            "required": [
              "id",
              "service_identity_id",
              "oidc_client_id",
              "status",
              "created_at",
              "updated_at",
              "product_id",
              "scope",
              "budget",
              "workspace_id"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/__schema0"
              },
              "service_identity_id": {
                "$ref": "#/$defs/__schema1"
              },
              "oidc_client_id": {
                "$ref": "#/$defs/__schema2"
              },
              "status": {
                "$ref": "#/$defs/__schema3"
              },
              "created_at": {
                "$ref": "#/$defs/__schema4"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema5"
              },
              "kind": {
                "type": "string",
                "const": "runner"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "product_id": {
                "type": "null"
              },
              "scope": {
                "type": "null"
              },
              "budget": {
                "type": "null"
              },
              "workspace_id": {
                "type": "string",
                "const": "ws_platform"
              }
            },
            "required": [
              "id",
              "service_identity_id",
              "oidc_client_id",
              "status",
              "created_at",
              "updated_at",
              "kind",
              "name",
              "product_id",
              "scope",
              "budget",
              "workspace_id"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/__schema0"
              },
              "service_identity_id": {
                "$ref": "#/$defs/__schema1"
              },
              "oidc_client_id": {
                "$ref": "#/$defs/__schema2"
              },
              "status": {
                "$ref": "#/$defs/__schema3"
              },
              "created_at": {
                "$ref": "#/$defs/__schema4"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema5"
              },
              "kind": {
                "type": "string",
                "const": "control-plane"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "product_id": {
                "type": "null"
              },
              "scope": {
                "type": "null"
              },
              "budget": {
                "type": "null"
              },
              "workspace_id": {
                "type": "string",
                "const": "ws_platform"
              }
            },
            "required": [
              "id",
              "service_identity_id",
              "oidc_client_id",
              "status",
              "created_at",
              "updated_at",
              "kind",
              "name",
              "product_id",
              "scope",
              "budget",
              "workspace_id"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "$ref": "#/$defs/__schema0"
              },
              "service_identity_id": {
                "$ref": "#/$defs/__schema1"
              },
              "oidc_client_id": {
                "$ref": "#/$defs/__schema2"
              },
              "status": {
                "$ref": "#/$defs/__schema3"
              },
              "created_at": {
                "$ref": "#/$defs/__schema4"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema5"
              },
              "kind": {
                "type": "string",
                "const": "automation"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "product_id": {
                "type": "null"
              },
              "scope": {
                "type": "null"
              },
              "budget": {
                "type": "null"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              }
            },
            "required": [
              "id",
              "service_identity_id",
              "oidc_client_id",
              "status",
              "created_at",
              "updated_at",
              "kind",
              "name",
              "product_id",
              "scope",
              "budget",
              "workspace_id"
            ]
          }
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^svc_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema1": {
      "type": "string",
      "pattern": "^svc_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema2": {
      "type": "string",
      "minLength": 1
    },
    "__schema3": {
      "type": "string",
      "enum": [
        "active",
        "revoked"
      ]
    },
    "__schema4": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema5": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema6": {
      "type": "string",
      "enum": [
        "generate"
      ]
    },
    "__schema7": {
      "type": "string",
      "enum": [
        "text",
        "embedding"
      ]
    },
    "__schema8": {
      "type": "string",
      "enum": [
        "read",
        "write",
        "delete",
        "list"
      ]
    },
    "__schema9": {
      "type": "string",
      "enum": [
        "get",
        "set",
        "delete",
        "list",
        "increment"
      ]
    },
    "__schema10": {
      "type": "string",
      "enum": [
        "send"
      ]
    },
    "__schema11": {
      "type": "string",
      "maxLength": 254,
      "pattern": "^(?!.*[A-Z])(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[ !#-[\\]-~]|\\\\[ -~])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
    },
    "__schema12": {
      "type": "string",
      "maxLength": 253,
      "pattern": "^(?:\\*|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$"
    }
  }
}

CredentialRequest

{
  "type": "object",
  "properties": {
    "secret": {
      "type": "string",
      "minLength": 1,
      "maxLength": 16384
    },
    "provider": {
      "$ref": "#/$defs/__schema0"
    },
    "capability": {
      "$ref": "#/$defs/__schema0"
    },
    "actions": {
      "minItems": 1,
      "maxItems": 64,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema0"
      }
    },
    "scope": {
      "maxItems": 200,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema0"
      }
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "secret",
    "provider",
    "capability",
    "actions",
    "scope",
    "expires_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    }
  }
}

CredentialRotateRequest

{
  "type": "object",
  "properties": {
    "secret": {
      "type": "string",
      "minLength": 1,
      "maxLength": 16384
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "secret"
  ]
}

Credential

{
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "enum": [
        "active",
        "revoked"
      ]
    },
    "revoked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "type": "string",
      "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    },
    "owner_kind": {
      "type": "string",
      "enum": [
        "workspace",
        "platform"
      ]
    },
    "provider": {
      "type": "string"
    },
    "capability": {
      "type": "string"
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "scope": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "created_by": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "state",
    "revoked_at",
    "id",
    "workspace_id",
    "owner_kind",
    "provider",
    "capability",
    "actions",
    "scope",
    "expires_at",
    "created_by",
    "created_at",
    "updated_at"
  ]
}

CredentialRevoked

{
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "enum": [
        "active",
        "revoked"
      ]
    },
    "revoked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "type": "string",
      "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    },
    "owner_kind": {
      "type": "string",
      "enum": [
        "workspace",
        "platform"
      ]
    },
    "provider": {
      "type": "string"
    },
    "capability": {
      "type": "string"
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "scope": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "created_by": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "revoked_binding_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
      }
    }
  },
  "required": [
    "state",
    "revoked_at",
    "id",
    "workspace_id",
    "owner_kind",
    "provider",
    "capability",
    "actions",
    "scope",
    "expires_at",
    "created_by",
    "created_at",
    "updated_at",
    "revoked_binding_ids"
  ]
}

ProviderBindingRequest

{
  "type": "object",
  "properties": {
    "credential_id": {
      "type": "string",
      "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "capability": {
      "$ref": "#/$defs/__schema0"
    },
    "actions": {
      "minItems": 1,
      "maxItems": 64,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema0"
      }
    },
    "scope": {
      "maxItems": 200,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema0"
      }
    },
    "app_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "environment_type": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    },
    "purpose": {
      "default": "fix",
      "type": "string",
      "enum": [
        "fix",
        "adjudication",
        "product"
      ]
    },
    "budget": {
      "type": "object",
      "properties": {
        "units": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "unit": {
          "type": "string",
          "const": "tokens"
        }
      },
      "required": [
        "units",
        "unit"
      ]
    },
    "capability_scope": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "const": "ai.generate"
            },
            "scope": {
              "type": "object",
              "properties": {
                "models": {
                  "minItems": 1,
                  "maxItems": 16,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema1"
                  }
                },
                "max_tokens_per_call": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "models",
                "max_tokens_per_call"
              ]
            },
            "provider_models": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "minLength": 1
                },
                "embedding": {
                  "type": "string",
                  "minLength": 1
                }
              }
            }
          },
          "required": [
            "id",
            "scope",
            "provider_models"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "const": "storage.object"
            },
            "scope": {
              "type": "object",
              "properties": {
                "prefix": {
                  "type": "string",
                  "pattern": "^\\/(?!.*\\.\\.).*$"
                },
                "max_object_bytes": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "prefix",
                "max_object_bytes"
              ]
            }
          },
          "required": [
            "id",
            "scope"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "const": "data.kv"
            },
            "scope": {
              "type": "object",
              "properties": {
                "prefix": {
                  "type": "string",
                  "pattern": "^\\/(?!.*\\.\\.).*$"
                },
                "max_value_bytes": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 65536
                },
                "max_keys": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 100000
                }
              },
              "required": [
                "prefix",
                "max_value_bytes",
                "max_keys"
              ]
            }
          },
          "required": [
            "id",
            "scope"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "const": "email.send"
            },
            "scope": {
              "type": "object",
              "properties": {
                "from_addresses": {
                  "minItems": 1,
                  "maxItems": 32,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema2"
                  }
                },
                "recipient_domains": {
                  "minItems": 1,
                  "maxItems": 32,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema3"
                  }
                },
                "max_recipients": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 50
                },
                "max_message_bytes": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 1048576
                }
              },
              "required": [
                "from_addresses",
                "recipient_domains",
                "max_recipients",
                "max_message_bytes"
              ]
            }
          },
          "required": [
            "id",
            "scope"
          ]
        }
      ]
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "credential_id",
    "capability",
    "actions",
    "scope",
    "environment_type",
    "expires_at"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "__schema1": {
      "type": "string",
      "enum": [
        "text",
        "embedding"
      ]
    },
    "__schema2": {
      "type": "string",
      "maxLength": 254,
      "pattern": "^(?!.*[A-Z])(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[ !#-[\\]-~]|\\\\[ -~])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
    },
    "__schema3": {
      "type": "string",
      "maxLength": 253,
      "pattern": "^(?:\\*|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$"
    }
  }
}

ProviderBinding

{
  "type": "object",
  "properties": {
    "workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    },
    "owner_kind": {
      "type": "string",
      "enum": [
        "workspace",
        "platform"
      ]
    },
    "provider": {
      "type": "string"
    },
    "capability": {
      "type": "string"
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "scope": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "app_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "environment_type": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    },
    "suspected_invalid": {
      "type": "boolean"
    },
    "suspected_invalid_since": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "consecutive_auth_failures": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "purpose": {
      "default": "fix",
      "type": "string",
      "enum": [
        "fix",
        "adjudication",
        "product"
      ]
    },
    "budget": {
      "type": "object",
      "properties": {
        "units": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "unit": {
          "type": "string",
          "const": "tokens"
        }
      },
      "required": [
        "units",
        "unit"
      ]
    },
    "id": {
      "type": "string",
      "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "credential_id": {
      "type": "string",
      "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "requested_by": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "state": {
      "type": "string",
      "enum": [
        "requested",
        "active",
        "blocked",
        "revoked"
      ]
    },
    "reason": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "workspace_id",
    "owner_kind",
    "provider",
    "capability",
    "actions",
    "scope",
    "expires_at",
    "created_at",
    "updated_at",
    "app_id",
    "environment_type",
    "suspected_invalid",
    "suspected_invalid_since",
    "consecutive_auth_failures",
    "id",
    "credential_id",
    "requested_by",
    "state",
    "reason"
  ]
}

ProviderBindings

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "workspace_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "string",
                "const": "ws_platform"
              }
            ]
          },
          "owner_kind": {
            "type": "string",
            "enum": [
              "workspace",
              "platform"
            ]
          },
          "provider": {
            "type": "string"
          },
          "capability": {
            "type": "string"
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scope": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "environment_type": {
            "type": "string",
            "enum": [
              "preview",
              "staging",
              "production"
            ]
          },
          "suspected_invalid": {
            "type": "boolean"
          },
          "suspected_invalid_since": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "consecutive_auth_failures": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "purpose": {
            "default": "fix",
            "type": "string",
            "enum": [
              "fix",
              "adjudication",
              "product"
            ]
          },
          "budget": {
            "type": "object",
            "properties": {
              "units": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "unit": {
                "type": "string",
                "const": "tokens"
              }
            },
            "required": [
              "units",
              "unit"
            ]
          },
          "id": {
            "type": "string",
            "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "credential_id": {
            "type": "string",
            "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "requested_by": {
            "type": "string",
            "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "state": {
            "type": "string",
            "enum": [
              "requested",
              "active",
              "blocked",
              "revoked"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "workspace_id",
          "owner_kind",
          "provider",
          "capability",
          "actions",
          "scope",
          "expires_at",
          "created_at",
          "updated_at",
          "app_id",
          "environment_type",
          "suspected_invalid",
          "suspected_invalid_since",
          "consecutive_auth_failures",
          "id",
          "credential_id",
          "requested_by",
          "state",
          "reason"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

BridgeRequest

{
  "type": "object",
  "properties": {
    "request": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "const": "ai.generate"
            },
            "action": {
              "type": "string",
              "const": "generate"
            },
            "model_kind": {
              "type": "string",
              "enum": [
                "text",
                "embedding"
              ]
            },
            "max_tokens": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "action",
            "model_kind",
            "max_tokens"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "const": "storage.object"
            },
            "action": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "delete",
                "list"
              ]
            },
            "key": {
              "type": "string",
              "pattern": "^\\/(?!.*\\.\\.).*$"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "action",
            "key"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "const": "data.kv"
            },
            "action": {
              "type": "string",
              "enum": [
                "get",
                "set",
                "delete",
                "list",
                "increment"
              ]
            },
            "key": {
              "type": "string",
              "pattern": "^\\/(?!.*\\.\\.).*$"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "action",
            "key"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "const": "email.send"
            },
            "action": {
              "type": "string",
              "const": "send"
            },
            "from": {
              "$ref": "#/$defs/__schema0"
            },
            "recipients": {
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "action",
            "from",
            "recipients",
            "bytes"
          ]
        }
      ]
    },
    "input": {
      "oneOf": [
        {
          "$ref": "#/$defs/__schema1"
        },
        {
          "$ref": "#/$defs/__schema2"
        }
      ]
    }
  },
  "required": [
    "request",
    "input"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "maxLength": 254,
      "pattern": "^(?!.*[A-Z])(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[ !#-[\\]-~]|\\\\[ -~])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
    },
    "__schema1": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "inline"
        },
        "json": {}
      },
      "required": [
        "kind",
        "json"
      ]
    },
    "__schema2": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string"
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "size_bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "kind": {
          "type": "string",
          "const": "evidence"
        }
      },
      "required": [
        "uri",
        "sha256",
        "size_bytes",
        "kind"
      ]
    }
  }
}

BridgeOutput

{
  "oneOf": [
    {
      "$ref": "#/$defs/__schema0"
    },
    {
      "$ref": "#/$defs/__schema1"
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "inline"
        },
        "json": {}
      },
      "required": [
        "kind",
        "json"
      ]
    },
    "__schema1": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string"
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "size_bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "kind": {
          "type": "string",
          "const": "evidence"
        }
      },
      "required": [
        "uri",
        "sha256",
        "size_bytes",
        "kind"
      ]
    }
  }
}

ServiceIdentityRequest

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "kind": {
          "default": "bridge",
          "type": "string",
          "const": "bridge"
        },
        "product_id": {
          "type": "string",
          "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "scope": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "ai.generate"
                },
                "actions": {
                  "minItems": 1,
                  "maxItems": 16,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema0"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "models": {
                      "minItems": 1,
                      "maxItems": 16,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema1"
                      }
                    },
                    "max_tokens_per_call": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "models",
                    "max_tokens_per_call"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "storage.object"
                },
                "actions": {
                  "minItems": 1,
                  "maxItems": 16,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema2"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "prefix": {
                      "type": "string",
                      "pattern": "^\\/(?!.*\\.\\.).*$"
                    },
                    "max_object_bytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "prefix",
                    "max_object_bytes"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "data.kv"
                },
                "actions": {
                  "minItems": 1,
                  "maxItems": 16,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema3"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "prefix": {
                      "type": "string",
                      "pattern": "^\\/(?!.*\\.\\.).*$"
                    },
                    "max_value_bytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 65536
                    },
                    "max_keys": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 100000
                    }
                  },
                  "required": [
                    "prefix",
                    "max_value_bytes",
                    "max_keys"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "email.send"
                },
                "actions": {
                  "minItems": 1,
                  "maxItems": 16,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema4"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "from_addresses": {
                      "minItems": 1,
                      "maxItems": 32,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema5"
                      }
                    },
                    "recipient_domains": {
                      "minItems": 1,
                      "maxItems": 32,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema6"
                      }
                    },
                    "max_recipients": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 50
                    },
                    "max_message_bytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 1048576
                    }
                  },
                  "required": [
                    "from_addresses",
                    "recipient_domains",
                    "max_recipients",
                    "max_message_bytes"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            }
          ]
        },
        "budget": {
          "type": "object",
          "properties": {
            "units": {
              "type": "number",
              "minimum": 0
            },
            "unit": {
              "type": "string",
              "enum": [
                "tokens",
                "bytes",
                "calls"
              ]
            }
          },
          "required": [
            "units",
            "unit"
          ]
        }
      },
      "required": [
        "product_id",
        "scope",
        "budget"
      ]
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "runner"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "product_id": {
          "type": "null"
        },
        "scope": {
          "type": "null"
        },
        "budget": {
          "type": "null"
        }
      },
      "required": [
        "kind",
        "name",
        "product_id",
        "scope",
        "budget"
      ]
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "control-plane"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "product_id": {
          "type": "null"
        },
        "scope": {
          "type": "null"
        },
        "budget": {
          "type": "null"
        }
      },
      "required": [
        "kind",
        "name",
        "product_id",
        "scope",
        "budget"
      ]
    },
    {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "automation"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "product_id": {
          "type": "null"
        },
        "scope": {
          "type": "null"
        },
        "budget": {
          "type": "null"
        }
      },
      "required": [
        "kind",
        "name",
        "product_id",
        "scope",
        "budget"
      ],
      "additionalProperties": false
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "enum": [
        "generate"
      ]
    },
    "__schema1": {
      "type": "string",
      "enum": [
        "text",
        "embedding"
      ]
    },
    "__schema2": {
      "type": "string",
      "enum": [
        "read",
        "write",
        "delete",
        "list"
      ]
    },
    "__schema3": {
      "type": "string",
      "enum": [
        "get",
        "set",
        "delete",
        "list",
        "increment"
      ]
    },
    "__schema4": {
      "type": "string",
      "enum": [
        "send"
      ]
    },
    "__schema5": {
      "type": "string",
      "maxLength": 254,
      "pattern": "^(?!.*[A-Z])(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[ !#-[\\]-~]|\\\\[ -~])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
    },
    "__schema6": {
      "type": "string",
      "maxLength": 253,
      "pattern": "^(?:\\*|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$"
    }
  }
}

ServiceIdentity

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "service_identity_id": {
          "$ref": "#/$defs/__schema1"
        },
        "oidc_client_id": {
          "$ref": "#/$defs/__schema2"
        },
        "status": {
          "$ref": "#/$defs/__schema3"
        },
        "created_at": {
          "$ref": "#/$defs/__schema4"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema5"
        },
        "kind": {
          "default": "bridge",
          "type": "string",
          "const": "bridge"
        },
        "product_id": {
          "type": "string",
          "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "scope": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "ai.generate"
                },
                "actions": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema6"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "models": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema7"
                      }
                    },
                    "max_tokens_per_call": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "models",
                    "max_tokens_per_call"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "storage.object"
                },
                "actions": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema8"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "prefix": {
                      "type": "string",
                      "pattern": "^\\/(?!.*\\.\\.).*$"
                    },
                    "max_object_bytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "prefix",
                    "max_object_bytes"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "data.kv"
                },
                "actions": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema9"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "prefix": {
                      "type": "string",
                      "pattern": "^\\/(?!.*\\.\\.).*$"
                    },
                    "max_value_bytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 65536
                    },
                    "max_keys": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 100000
                    }
                  },
                  "required": [
                    "prefix",
                    "max_value_bytes",
                    "max_keys"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "email.send"
                },
                "actions": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema10"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "from_addresses": {
                      "minItems": 1,
                      "maxItems": 32,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema11"
                      }
                    },
                    "recipient_domains": {
                      "minItems": 1,
                      "maxItems": 32,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema12"
                      }
                    },
                    "max_recipients": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 50
                    },
                    "max_message_bytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 1048576
                    }
                  },
                  "required": [
                    "from_addresses",
                    "recipient_domains",
                    "max_recipients",
                    "max_message_bytes"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            }
          ]
        },
        "budget": {
          "type": "object",
          "properties": {
            "units": {
              "type": "number",
              "minimum": 0
            },
            "unit": {
              "type": "string",
              "enum": [
                "tokens",
                "bytes",
                "calls"
              ]
            }
          },
          "required": [
            "units",
            "unit"
          ]
        },
        "workspace_id": {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        }
      },
      "required": [
        "id",
        "service_identity_id",
        "oidc_client_id",
        "status",
        "created_at",
        "updated_at",
        "product_id",
        "scope",
        "budget",
        "workspace_id"
      ]
    },
    {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "service_identity_id": {
          "$ref": "#/$defs/__schema1"
        },
        "oidc_client_id": {
          "$ref": "#/$defs/__schema2"
        },
        "status": {
          "$ref": "#/$defs/__schema3"
        },
        "created_at": {
          "$ref": "#/$defs/__schema4"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema5"
        },
        "kind": {
          "type": "string",
          "const": "runner"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "product_id": {
          "type": "null"
        },
        "scope": {
          "type": "null"
        },
        "budget": {
          "type": "null"
        },
        "workspace_id": {
          "type": "string",
          "const": "ws_platform"
        }
      },
      "required": [
        "id",
        "service_identity_id",
        "oidc_client_id",
        "status",
        "created_at",
        "updated_at",
        "kind",
        "name",
        "product_id",
        "scope",
        "budget",
        "workspace_id"
      ]
    },
    {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "service_identity_id": {
          "$ref": "#/$defs/__schema1"
        },
        "oidc_client_id": {
          "$ref": "#/$defs/__schema2"
        },
        "status": {
          "$ref": "#/$defs/__schema3"
        },
        "created_at": {
          "$ref": "#/$defs/__schema4"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema5"
        },
        "kind": {
          "type": "string",
          "const": "control-plane"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "product_id": {
          "type": "null"
        },
        "scope": {
          "type": "null"
        },
        "budget": {
          "type": "null"
        },
        "workspace_id": {
          "type": "string",
          "const": "ws_platform"
        }
      },
      "required": [
        "id",
        "service_identity_id",
        "oidc_client_id",
        "status",
        "created_at",
        "updated_at",
        "kind",
        "name",
        "product_id",
        "scope",
        "budget",
        "workspace_id"
      ]
    },
    {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "service_identity_id": {
          "$ref": "#/$defs/__schema1"
        },
        "oidc_client_id": {
          "$ref": "#/$defs/__schema2"
        },
        "status": {
          "$ref": "#/$defs/__schema3"
        },
        "created_at": {
          "$ref": "#/$defs/__schema4"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema5"
        },
        "kind": {
          "type": "string",
          "const": "automation"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "product_id": {
          "type": "null"
        },
        "scope": {
          "type": "null"
        },
        "budget": {
          "type": "null"
        },
        "workspace_id": {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        }
      },
      "required": [
        "id",
        "service_identity_id",
        "oidc_client_id",
        "status",
        "created_at",
        "updated_at",
        "kind",
        "name",
        "product_id",
        "scope",
        "budget",
        "workspace_id"
      ]
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^svc_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema1": {
      "type": "string",
      "pattern": "^svc_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema2": {
      "type": "string",
      "minLength": 1
    },
    "__schema3": {
      "type": "string",
      "enum": [
        "active",
        "revoked"
      ]
    },
    "__schema4": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema5": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema6": {
      "type": "string",
      "enum": [
        "generate"
      ]
    },
    "__schema7": {
      "type": "string",
      "enum": [
        "text",
        "embedding"
      ]
    },
    "__schema8": {
      "type": "string",
      "enum": [
        "read",
        "write",
        "delete",
        "list"
      ]
    },
    "__schema9": {
      "type": "string",
      "enum": [
        "get",
        "set",
        "delete",
        "list",
        "increment"
      ]
    },
    "__schema10": {
      "type": "string",
      "enum": [
        "send"
      ]
    },
    "__schema11": {
      "type": "string",
      "maxLength": 254,
      "pattern": "^(?!.*[A-Z])(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[ !#-[\\]-~]|\\\\[ -~])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
    },
    "__schema12": {
      "type": "string",
      "maxLength": 253,
      "pattern": "^(?:\\*|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$"
    }
  }
}

ServiceIdentityCreated

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "service_identity_id": {
          "$ref": "#/$defs/__schema1"
        },
        "oidc_client_id": {
          "$ref": "#/$defs/__schema2"
        },
        "status": {
          "$ref": "#/$defs/__schema3"
        },
        "created_at": {
          "$ref": "#/$defs/__schema4"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema5"
        },
        "kind": {
          "default": "bridge",
          "type": "string",
          "const": "bridge"
        },
        "product_id": {
          "type": "string",
          "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "scope": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "ai.generate"
                },
                "actions": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema6"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "models": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema7"
                      }
                    },
                    "max_tokens_per_call": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "models",
                    "max_tokens_per_call"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "storage.object"
                },
                "actions": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema8"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "prefix": {
                      "type": "string",
                      "pattern": "^\\/(?!.*\\.\\.).*$"
                    },
                    "max_object_bytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "prefix",
                    "max_object_bytes"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "data.kv"
                },
                "actions": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema9"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "prefix": {
                      "type": "string",
                      "pattern": "^\\/(?!.*\\.\\.).*$"
                    },
                    "max_value_bytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 65536
                    },
                    "max_keys": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 100000
                    }
                  },
                  "required": [
                    "prefix",
                    "max_value_bytes",
                    "max_keys"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            },
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "const": "email.send"
                },
                "actions": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema10"
                  }
                },
                "scope": {
                  "type": "object",
                  "properties": {
                    "from_addresses": {
                      "minItems": 1,
                      "maxItems": 32,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema11"
                      }
                    },
                    "recipient_domains": {
                      "minItems": 1,
                      "maxItems": 32,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema12"
                      }
                    },
                    "max_recipients": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 50
                    },
                    "max_message_bytes": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 1048576
                    }
                  },
                  "required": [
                    "from_addresses",
                    "recipient_domains",
                    "max_recipients",
                    "max_message_bytes"
                  ]
                }
              },
              "required": [
                "id",
                "actions",
                "scope"
              ]
            }
          ]
        },
        "budget": {
          "type": "object",
          "properties": {
            "units": {
              "type": "number",
              "minimum": 0
            },
            "unit": {
              "type": "string",
              "enum": [
                "tokens",
                "bytes",
                "calls"
              ]
            }
          },
          "required": [
            "units",
            "unit"
          ]
        },
        "workspace_id": {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "client_secret": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "service_identity_id",
        "oidc_client_id",
        "status",
        "created_at",
        "updated_at",
        "product_id",
        "scope",
        "budget",
        "workspace_id"
      ]
    },
    {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "service_identity_id": {
          "$ref": "#/$defs/__schema1"
        },
        "oidc_client_id": {
          "$ref": "#/$defs/__schema2"
        },
        "status": {
          "$ref": "#/$defs/__schema3"
        },
        "created_at": {
          "$ref": "#/$defs/__schema4"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema5"
        },
        "kind": {
          "type": "string",
          "const": "runner"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "product_id": {
          "type": "null"
        },
        "scope": {
          "type": "null"
        },
        "budget": {
          "type": "null"
        },
        "workspace_id": {
          "type": "string",
          "const": "ws_platform"
        },
        "client_secret": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "service_identity_id",
        "oidc_client_id",
        "status",
        "created_at",
        "updated_at",
        "kind",
        "name",
        "product_id",
        "scope",
        "budget",
        "workspace_id"
      ]
    },
    {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "service_identity_id": {
          "$ref": "#/$defs/__schema1"
        },
        "oidc_client_id": {
          "$ref": "#/$defs/__schema2"
        },
        "status": {
          "$ref": "#/$defs/__schema3"
        },
        "created_at": {
          "$ref": "#/$defs/__schema4"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema5"
        },
        "kind": {
          "type": "string",
          "const": "control-plane"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "product_id": {
          "type": "null"
        },
        "scope": {
          "type": "null"
        },
        "budget": {
          "type": "null"
        },
        "workspace_id": {
          "type": "string",
          "const": "ws_platform"
        },
        "client_secret": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "service_identity_id",
        "oidc_client_id",
        "status",
        "created_at",
        "updated_at",
        "kind",
        "name",
        "product_id",
        "scope",
        "budget",
        "workspace_id"
      ]
    },
    {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema0"
        },
        "service_identity_id": {
          "$ref": "#/$defs/__schema1"
        },
        "oidc_client_id": {
          "$ref": "#/$defs/__schema2"
        },
        "status": {
          "$ref": "#/$defs/__schema3"
        },
        "created_at": {
          "$ref": "#/$defs/__schema4"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema5"
        },
        "kind": {
          "type": "string",
          "const": "automation"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "product_id": {
          "type": "null"
        },
        "scope": {
          "type": "null"
        },
        "budget": {
          "type": "null"
        },
        "workspace_id": {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "client_secret": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "service_identity_id",
        "oidc_client_id",
        "status",
        "created_at",
        "updated_at",
        "kind",
        "name",
        "product_id",
        "scope",
        "budget",
        "workspace_id"
      ]
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^svc_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema1": {
      "type": "string",
      "pattern": "^svc_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema2": {
      "type": "string",
      "minLength": 1
    },
    "__schema3": {
      "type": "string",
      "enum": [
        "active",
        "revoked"
      ]
    },
    "__schema4": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema5": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema6": {
      "type": "string",
      "enum": [
        "generate"
      ]
    },
    "__schema7": {
      "type": "string",
      "enum": [
        "text",
        "embedding"
      ]
    },
    "__schema8": {
      "type": "string",
      "enum": [
        "read",
        "write",
        "delete",
        "list"
      ]
    },
    "__schema9": {
      "type": "string",
      "enum": [
        "get",
        "set",
        "delete",
        "list",
        "increment"
      ]
    },
    "__schema10": {
      "type": "string",
      "enum": [
        "send"
      ]
    },
    "__schema11": {
      "type": "string",
      "maxLength": 254,
      "pattern": "^(?!.*[A-Z])(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[ !#-[\\]-~]|\\\\[ -~])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
    },
    "__schema12": {
      "type": "string",
      "maxLength": 253,
      "pattern": "^(?:\\*|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$"
    }
  }
}

CapabilityInvocation

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^cap_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "revision_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "execution_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^exe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "bridge_invocation_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^inv_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "capability": {
      "type": [
        "string",
        "null"
      ]
    },
    "action": {
      "type": [
        "string",
        "null"
      ]
    },
    "environment_type": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "preview",
            "staging",
            "production"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "binding_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "outcome": {
      "type": "string",
      "enum": [
        "requested",
        "completed",
        "denied",
        "failed"
      ]
    },
    "reason": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "outside_contract",
            "permission_denied",
            "policy_blocked",
            "binding_missing",
            "binding_revoked",
            "usage_denied",
            "provider_unavailable",
            "provider_rejected",
            "output_blocked",
            "platform_unavailable"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "provider": {
      "type": [
        "string",
        "null"
      ]
    },
    "is_fallback_used": {
      "type": "boolean"
    },
    "usage_units": {
      "type": "number",
      "minimum": 0
    },
    "usage_unit": {
      "type": "string",
      "enum": [
        "tokens",
        "ms",
        "calls",
        "bytes"
      ]
    },
    "requested_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "finished_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "product_id",
    "revision_id",
    "execution_id",
    "bridge_invocation_id",
    "capability",
    "action",
    "environment_type",
    "outcome",
    "reason",
    "provider",
    "is_fallback_used",
    "usage_units",
    "usage_unit",
    "requested_at",
    "finished_at",
    "created_at",
    "updated_at"
  ]
}

RunnerCapabilityRequest

{
  "type": "object",
  "properties": {
    "execution_id": {
      "type": "string",
      "pattern": "^exe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "request_event_id": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "correlation_id": {
      "type": "string",
      "pattern": "^(brk|rsm|pvar|minv|trg|hook|mrun|mres|ws|app|usr|prod|rev|ver|rel|env|dep|srf|acc|ses|inv|exe|evt|pend|ddl|ntf|pipe|fnd|qual|cred|bind|hdl|cap|svc|frz|adj|fix|upl|dom|wb|ctx|aud|pay|ivc|rfd)_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "request": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "const": "ai.generate"
            },
            "action": {
              "type": "string",
              "const": "generate"
            },
            "model_kind": {
              "type": "string",
              "enum": [
                "text",
                "embedding"
              ]
            },
            "max_tokens": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "action",
            "model_kind",
            "max_tokens"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "const": "storage.object"
            },
            "action": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "delete",
                "list"
              ]
            },
            "key": {
              "type": "string",
              "pattern": "^\\/(?!.*\\.\\.).*$"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "action",
            "key"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "const": "data.kv"
            },
            "action": {
              "type": "string",
              "enum": [
                "get",
                "set",
                "delete",
                "list",
                "increment"
              ]
            },
            "key": {
              "type": "string",
              "pattern": "^\\/(?!.*\\.\\.).*$"
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "action",
            "key"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "const": "email.send"
            },
            "action": {
              "type": "string",
              "const": "send"
            },
            "from": {
              "$ref": "#/$defs/__schema0"
            },
            "recipients": {
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "action",
            "from",
            "recipients",
            "bytes"
          ]
        }
      ]
    },
    "input": {
      "oneOf": [
        {
          "$ref": "#/$defs/__schema1"
        },
        {
          "$ref": "#/$defs/__schema2"
        }
      ]
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    }
  },
  "required": [
    "execution_id",
    "request_event_id",
    "correlation_id",
    "request",
    "input"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "maxLength": 254,
      "pattern": "^(?!.*[A-Z])(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[ !#-[\\]-~]|\\\\[ -~])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
    },
    "__schema1": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "inline"
        },
        "json": {}
      },
      "required": [
        "kind",
        "json"
      ]
    },
    "__schema2": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string"
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "size_bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "kind": {
          "type": "string",
          "const": "evidence"
        }
      },
      "required": [
        "uri",
        "sha256",
        "size_bytes",
        "kind"
      ]
    }
  }
}

RunnerCapabilityResult

{
  "type": "object",
  "properties": {
    "event_id": {
      "$ref": "#/$defs/__schema0"
    },
    "event_type": {
      "type": "string",
      "const": "H-361.capability.invocation_resulted"
    },
    "schema_version": {
      "type": "string",
      "const": "1.0.0"
    },
    "occurred_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "producer": {
      "type": "string",
      "const": "use"
    },
    "workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    },
    "correlation_id": {
      "type": "string",
      "pattern": "^(brk|rsm|pvar|minv|trg|hook|mrun|mres|ws|app|usr|prod|rev|ver|rel|env|dep|srf|acc|ses|inv|exe|evt|pend|ddl|ntf|pipe|fnd|qual|cred|bind|hdl|cap|svc|frz|adj|fix|upl|dom|wb|ctx|aud|pay|ivc|rfd)_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "causation_id": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema0"
        },
        {
          "type": "null"
        }
      ]
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "payload": {
      "type": "object",
      "properties": {
        "binding_id": {
          "$ref": "#/$defs/__schema1"
        },
        "capability_invocation_id": {
          "$ref": "#/$defs/__schema2"
        },
        "workspace_id": {
          "$ref": "#/$defs/__schema3"
        },
        "product_id": {
          "$ref": "#/$defs/__schema4"
        },
        "outcome": {
          "$ref": "#/$defs/__schema5"
        },
        "reason": {
          "$ref": "#/$defs/__schema6"
        },
        "output": {
          "$ref": "#/$defs/__schema7"
        },
        "provider": {
          "$ref": "#/$defs/__schema10"
        },
        "fallback_used": {
          "$ref": "#/$defs/__schema11"
        },
        "usage": {
          "$ref": "#/$defs/__schema12"
        },
        "finished_at": {
          "$ref": "#/$defs/__schema13"
        }
      },
      "required": [
        "capability_invocation_id",
        "workspace_id",
        "product_id",
        "outcome",
        "reason",
        "output",
        "provider",
        "fallback_used",
        "usage",
        "finished_at"
      ]
    }
  },
  "required": [
    "event_id",
    "event_type",
    "schema_version",
    "occurred_at",
    "producer",
    "workspace_id",
    "correlation_id",
    "causation_id",
    "idempotency_key",
    "payload"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema1": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema2": {
      "type": "string",
      "pattern": "^cap_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema3": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema4": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema5": {
      "type": "string",
      "enum": [
        "completed",
        "denied",
        "failed"
      ]
    },
    "__schema6": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "outside_contract",
            "permission_denied",
            "policy_blocked",
            "binding_missing",
            "binding_revoked",
            "usage_denied",
            "provider_unavailable",
            "provider_rejected",
            "output_blocked",
            "platform_unavailable"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema7": {
      "anyOf": [
        {
          "oneOf": [
            {
              "$ref": "#/$defs/__schema8"
            },
            {
              "$ref": "#/$defs/__schema9"
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema8": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "inline"
        },
        "json": {}
      },
      "required": [
        "kind",
        "json"
      ]
    },
    "__schema9": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string"
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "size_bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "kind": {
          "type": "string",
          "const": "evidence"
        }
      },
      "required": [
        "uri",
        "sha256",
        "size_bytes",
        "kind"
      ]
    },
    "__schema10": {
      "type": [
        "string",
        "null"
      ]
    },
    "__schema11": {
      "type": "boolean"
    },
    "__schema12": {
      "type": "object",
      "properties": {
        "units": {
          "type": "number",
          "minimum": 0
        },
        "unit": {
          "type": "string",
          "enum": [
            "tokens",
            "ms",
            "calls",
            "bytes"
          ]
        }
      },
      "required": [
        "units",
        "unit"
      ]
    },
    "__schema13": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

AppForwardingRequest

{
  "type": "object",
  "properties": {
    "from_product_id": {
      "$ref": "#/$defs/__schema0"
    },
    "to_product_id": {
      "$ref": "#/$defs/__schema1"
    }
  },
  "required": [
    "from_product_id",
    "to_product_id"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema1": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  }
}

AppForwarding

{
  "type": "object",
  "properties": {
    "app_id": {
      "type": "string",
      "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "forwarding": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "from_product_id": {
              "type": "string",
              "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "to_product_id": {
              "type": "string",
              "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "path_prefix": {
              "type": "string",
              "const": "/api/"
            },
            "updated_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            }
          },
          "required": [
            "from_product_id",
            "to_product_id",
            "path_prefix",
            "updated_at"
          ]
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "app_id",
    "forwarding"
  ]
}

GitHubConnectionProblem

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "bad_request",
        "unauthenticated",
        "forbidden",
        "not_found",
        "conflict",
        "validation_failed",
        "rate_limited",
        "internal",
        "unavailable"
      ]
    },
    "correlation_id": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "reason": {
      "type": "string"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "path"
        ]
      }
    },
    "errors_total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "type",
    "title",
    "status",
    "detail",
    "instance",
    "code",
    "correlation_id"
  ]
}

GitHubConnectionStartRequest

{
  "type": "object",
  "properties": {
    "installation_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "redirect_uri": {
      "type": "string",
      "format": "uri"
    }
  },
  "required": [
    "installation_id",
    "redirect_uri"
  ]
}

GitHubConnectionStarted

{
  "type": "object",
  "properties": {
    "authorize_url": {
      "type": "string",
      "format": "uri"
    }
  },
  "required": [
    "authorize_url"
  ]
}

GitHubConnectionRequest

{
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "code": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    }
  },
  "required": [
    "state",
    "code"
  ]
}

GitHubConnection

{
  "type": "object",
  "properties": {
    "credential_id": {
      "type": "string",
      "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "account_login": {
      "type": "string"
    },
    "account_type": {
      "type": "string",
      "enum": [
        "User",
        "Organization"
      ]
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "renewed": {
      "type": "boolean"
    }
  },
  "required": [
    "credential_id",
    "account_login",
    "account_type",
    "expires_at",
    "renewed"
  ]
}

GitHubConnections

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "credential_id": {
            "type": "string",
            "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "account_login": {
            "type": "string"
          },
          "account_type": {
            "type": "string",
            "enum": [
              "User",
              "Organization"
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "credential_id",
          "account_login",
          "account_type",
          "expires_at"
        ]
      }
    },
    "install_url": {
      "type": "string",
      "format": "uri"
    }
  },
  "required": [
    "items",
    "install_url"
  ]
}

GitHubRepositories

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "full_name": {
            "type": "string"
          },
          "private": {
            "type": "boolean"
          },
          "default_branch": {
            "type": "string"
          }
        },
        "required": [
          "full_name",
          "private",
          "default_branch"
        ]
      }
    },
    "next_page": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "items",
    "next_page"
  ]
}

GitHubBranches

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      }
    },
    "next_page": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "items",
    "next_page"
  ]
}

RevisionGraph

{
  "type": "object",
  "properties": {
    "schema": {
      "type": "string",
      "const": "belld.graph"
    },
    "version": {
      "type": "string",
      "const": "1.0.0"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "descriptor": {
      "type": "object",
      "properties": {
        "product_type": {
          "type": "string",
          "enum": [
            "hosted-app",
            "hosted-api",
            "agent",
            "remote",
            "bridge"
          ]
        },
        "descriptor_hash": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "descriptor": {
          "type": "object",
          "properties": {
            "runtime": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "node",
                    "shell"
                  ]
                },
                "version": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "kind",
                "version"
              ]
            },
            "entrypoint": {
              "type": "object",
              "properties": {
                "command": {
                  "type": "string",
                  "minLength": 1
                },
                "args": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "command",
                "args"
              ]
            },
            "ports": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "port": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535
                  },
                  "protocol": {
                    "type": "string",
                    "const": "http"
                  }
                },
                "required": [
                  "port",
                  "protocol"
                ]
              }
            },
            "field_sources": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string",
                "enum": [
                  "detected",
                  "developer"
                ]
              }
            },
            "build_plan": {
              "type": "object",
              "properties": {
                "runtime": {
                  "$ref": "#/$defs/__schema0"
                },
                "workdir": {
                  "$ref": "#/$defs/__schema1"
                },
                "install": {
                  "$ref": "#/$defs/__schema2"
                },
                "build": {
                  "$ref": "#/$defs/__schema3"
                },
                "start": {
                  "$ref": "#/$defs/__schema4"
                },
                "port": {
                  "$ref": "#/$defs/__schema5"
                },
                "health": {
                  "$ref": "#/$defs/__schema6"
                },
                "env": {
                  "$ref": "#/$defs/__schema7"
                }
              },
              "required": [
                "runtime",
                "workdir",
                "install",
                "build",
                "start",
                "port",
                "health",
                "env"
              ]
            }
          },
          "required": [
            "runtime",
            "entrypoint",
            "ports",
            "field_sources"
          ]
        }
      },
      "required": [
        "product_type",
        "descriptor_hash",
        "descriptor"
      ]
    },
    "capabilities": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "capability": {
                    "type": "string"
                  },
                  "layer": {
                    "type": "string",
                    "enum": [
                      "connected",
                      "managed"
                    ]
                  },
                  "declared": {
                    "type": "boolean",
                    "const": true
                  },
                  "observed": {
                    "type": "object",
                    "properties": {
                      "scan": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "const": "known"
                              },
                              "actions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "action": {
                                      "type": "string"
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "used",
                                        "unused"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "action",
                                    "state"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "status",
                              "actions"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "const": "unknown"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "scan_unavailable",
                                  "not_qualified",
                                  "unavailable"
                                ]
                              }
                            },
                            "required": [
                              "status",
                              "reason"
                            ]
                          }
                        ]
                      },
                      "requirement": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "enum": [
                                  "known",
                                  "partial"
                                ]
                              },
                              "confidence": {
                                "anyOf": [
                                  {
                                    "$ref": "#/$defs/__schema19"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "status",
                              "confidence"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "$ref": "#/$defs/__schema20"
                              },
                              "reason": {
                                "$ref": "#/$defs/__schema21"
                              },
                              "confidence": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "status",
                              "reason",
                              "confidence"
                            ]
                          }
                        ]
                      },
                      "invoked": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "scan",
                      "requirement",
                      "invoked"
                    ]
                  },
                  "executed": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "known"
                          },
                          "scope": {
                            "type": "string",
                            "const": "product"
                          },
                          "since": {
                            "$ref": "#/$defs/__schema22"
                          },
                          "completed": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "denied": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "failed": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "requested": {
                            "$ref": "#/$defs/__schema23"
                          }
                        },
                        "required": [
                          "status",
                          "scope",
                          "since",
                          "completed",
                          "denied",
                          "failed",
                          "requested"
                        ]
                      },
                      {
                        "$ref": "#/$defs/__schema24"
                      }
                    ]
                  },
                  "selected": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "known"
                          },
                          "scope": {
                            "type": "string",
                            "const": "product"
                          },
                          "since": {
                            "$ref": "#/$defs/__schema22"
                          },
                          "binding_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                            }
                          }
                        },
                        "required": [
                          "status",
                          "scope",
                          "since",
                          "binding_ids"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "unknown"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "unavailable",
                              "binding_not_recorded"
                            ]
                          }
                        },
                        "required": [
                          "status",
                          "reason"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "not_applicable"
                          }
                        },
                        "required": [
                          "status"
                        ]
                      }
                    ]
                  },
                  "id": {
                    "type": "string",
                    "const": "ai.generate"
                  },
                  "required": {
                    "$ref": "#/$defs/__schema8"
                  },
                  "actions": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema9"
                    }
                  },
                  "scope": {
                    "type": "object",
                    "properties": {
                      "models": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema10"
                        }
                      },
                      "max_tokens_per_call": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "models",
                      "max_tokens_per_call"
                    ]
                  },
                  "credential_owner": {
                    "$ref": "#/$defs/__schema11"
                  },
                  "provider": {
                    "$ref": "#/$defs/__schema12"
                  }
                },
                "required": [
                  "capability",
                  "layer",
                  "declared",
                  "observed",
                  "executed",
                  "id",
                  "required",
                  "actions",
                  "scope",
                  "credential_owner",
                  "provider"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "capability": {
                    "type": "string"
                  },
                  "layer": {
                    "type": "string",
                    "enum": [
                      "connected",
                      "managed"
                    ]
                  },
                  "declared": {
                    "type": "boolean",
                    "const": true
                  },
                  "observed": {
                    "type": "object",
                    "properties": {
                      "scan": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "const": "known"
                              },
                              "actions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "action": {
                                      "type": "string"
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "used",
                                        "unused"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "action",
                                    "state"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "status",
                              "actions"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "const": "unknown"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "scan_unavailable",
                                  "not_qualified",
                                  "unavailable"
                                ]
                              }
                            },
                            "required": [
                              "status",
                              "reason"
                            ]
                          }
                        ]
                      },
                      "requirement": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "enum": [
                                  "known",
                                  "partial"
                                ]
                              },
                              "confidence": {
                                "anyOf": [
                                  {
                                    "$ref": "#/$defs/__schema19"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "status",
                              "confidence"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "$ref": "#/$defs/__schema20"
                              },
                              "reason": {
                                "$ref": "#/$defs/__schema21"
                              },
                              "confidence": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "status",
                              "reason",
                              "confidence"
                            ]
                          }
                        ]
                      },
                      "invoked": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "scan",
                      "requirement",
                      "invoked"
                    ]
                  },
                  "executed": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "known"
                          },
                          "scope": {
                            "type": "string",
                            "const": "product"
                          },
                          "since": {
                            "$ref": "#/$defs/__schema22"
                          },
                          "completed": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "denied": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "failed": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "requested": {
                            "$ref": "#/$defs/__schema23"
                          }
                        },
                        "required": [
                          "status",
                          "scope",
                          "since",
                          "completed",
                          "denied",
                          "failed",
                          "requested"
                        ]
                      },
                      {
                        "$ref": "#/$defs/__schema24"
                      }
                    ]
                  },
                  "selected": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "known"
                          },
                          "scope": {
                            "type": "string",
                            "const": "product"
                          },
                          "since": {
                            "$ref": "#/$defs/__schema22"
                          },
                          "binding_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                            }
                          }
                        },
                        "required": [
                          "status",
                          "scope",
                          "since",
                          "binding_ids"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "unknown"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "unavailable",
                              "binding_not_recorded"
                            ]
                          }
                        },
                        "required": [
                          "status",
                          "reason"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "not_applicable"
                          }
                        },
                        "required": [
                          "status"
                        ]
                      }
                    ]
                  },
                  "id": {
                    "type": "string",
                    "const": "storage.object"
                  },
                  "required": {
                    "$ref": "#/$defs/__schema8"
                  },
                  "actions": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema13"
                    }
                  },
                  "scope": {
                    "type": "object",
                    "properties": {
                      "prefix": {
                        "type": "string",
                        "pattern": "^\\/(?!.*\\.\\.).*$"
                      },
                      "max_object_bytes": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "prefix",
                      "max_object_bytes"
                    ]
                  },
                  "credential_owner": {
                    "$ref": "#/$defs/__schema11"
                  },
                  "provider": {
                    "$ref": "#/$defs/__schema12"
                  }
                },
                "required": [
                  "capability",
                  "layer",
                  "declared",
                  "observed",
                  "executed",
                  "id",
                  "required",
                  "actions",
                  "scope",
                  "credential_owner",
                  "provider"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "capability": {
                    "type": "string"
                  },
                  "layer": {
                    "type": "string",
                    "enum": [
                      "connected",
                      "managed"
                    ]
                  },
                  "declared": {
                    "type": "boolean",
                    "const": true
                  },
                  "observed": {
                    "type": "object",
                    "properties": {
                      "scan": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "const": "known"
                              },
                              "actions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "action": {
                                      "type": "string"
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "used",
                                        "unused"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "action",
                                    "state"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "status",
                              "actions"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "const": "unknown"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "scan_unavailable",
                                  "not_qualified",
                                  "unavailable"
                                ]
                              }
                            },
                            "required": [
                              "status",
                              "reason"
                            ]
                          }
                        ]
                      },
                      "requirement": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "enum": [
                                  "known",
                                  "partial"
                                ]
                              },
                              "confidence": {
                                "anyOf": [
                                  {
                                    "$ref": "#/$defs/__schema19"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "status",
                              "confidence"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "$ref": "#/$defs/__schema20"
                              },
                              "reason": {
                                "$ref": "#/$defs/__schema21"
                              },
                              "confidence": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "status",
                              "reason",
                              "confidence"
                            ]
                          }
                        ]
                      },
                      "invoked": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "scan",
                      "requirement",
                      "invoked"
                    ]
                  },
                  "executed": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "known"
                          },
                          "scope": {
                            "type": "string",
                            "const": "product"
                          },
                          "since": {
                            "$ref": "#/$defs/__schema22"
                          },
                          "completed": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "denied": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "failed": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "requested": {
                            "$ref": "#/$defs/__schema23"
                          }
                        },
                        "required": [
                          "status",
                          "scope",
                          "since",
                          "completed",
                          "denied",
                          "failed",
                          "requested"
                        ]
                      },
                      {
                        "$ref": "#/$defs/__schema24"
                      }
                    ]
                  },
                  "selected": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "known"
                          },
                          "scope": {
                            "type": "string",
                            "const": "product"
                          },
                          "since": {
                            "$ref": "#/$defs/__schema22"
                          },
                          "binding_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                            }
                          }
                        },
                        "required": [
                          "status",
                          "scope",
                          "since",
                          "binding_ids"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "unknown"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "unavailable",
                              "binding_not_recorded"
                            ]
                          }
                        },
                        "required": [
                          "status",
                          "reason"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "not_applicable"
                          }
                        },
                        "required": [
                          "status"
                        ]
                      }
                    ]
                  },
                  "id": {
                    "type": "string",
                    "const": "data.kv"
                  },
                  "required": {
                    "$ref": "#/$defs/__schema8"
                  },
                  "actions": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema14"
                    }
                  },
                  "scope": {
                    "type": "object",
                    "properties": {
                      "prefix": {
                        "type": "string",
                        "pattern": "^\\/(?!.*\\.\\.).*$"
                      },
                      "max_value_bytes": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 65536
                      },
                      "max_keys": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 100000
                      }
                    },
                    "required": [
                      "prefix",
                      "max_value_bytes",
                      "max_keys"
                    ]
                  },
                  "credential_owner": {
                    "type": "string",
                    "const": "platform"
                  },
                  "provider": {
                    "type": "object",
                    "properties": {
                      "allow": {
                        "minItems": 1,
                        "maxItems": 1,
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema15"
                        }
                      },
                      "prefer": {
                        "type": "string",
                        "const": "platform"
                      },
                      "fallback": {
                        "type": "string",
                        "const": "none"
                      }
                    },
                    "required": [
                      "allow",
                      "fallback"
                    ]
                  }
                },
                "required": [
                  "capability",
                  "layer",
                  "declared",
                  "observed",
                  "executed",
                  "id",
                  "required",
                  "actions",
                  "scope",
                  "credential_owner",
                  "provider"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "capability": {
                    "type": "string"
                  },
                  "layer": {
                    "type": "string",
                    "enum": [
                      "connected",
                      "managed"
                    ]
                  },
                  "declared": {
                    "type": "boolean",
                    "const": true
                  },
                  "observed": {
                    "type": "object",
                    "properties": {
                      "scan": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "const": "known"
                              },
                              "actions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "action": {
                                      "type": "string"
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "used",
                                        "unused"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "action",
                                    "state"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "status",
                              "actions"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "const": "unknown"
                              },
                              "reason": {
                                "type": "string",
                                "enum": [
                                  "scan_unavailable",
                                  "not_qualified",
                                  "unavailable"
                                ]
                              }
                            },
                            "required": [
                              "status",
                              "reason"
                            ]
                          }
                        ]
                      },
                      "requirement": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "enum": [
                                  "known",
                                  "partial"
                                ]
                              },
                              "confidence": {
                                "anyOf": [
                                  {
                                    "$ref": "#/$defs/__schema19"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "status",
                              "confidence"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "$ref": "#/$defs/__schema20"
                              },
                              "reason": {
                                "$ref": "#/$defs/__schema21"
                              },
                              "confidence": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "status",
                              "reason",
                              "confidence"
                            ]
                          }
                        ]
                      },
                      "invoked": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "scan",
                      "requirement",
                      "invoked"
                    ]
                  },
                  "executed": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "known"
                          },
                          "scope": {
                            "type": "string",
                            "const": "product"
                          },
                          "since": {
                            "$ref": "#/$defs/__schema22"
                          },
                          "completed": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "denied": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "failed": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "requested": {
                            "$ref": "#/$defs/__schema23"
                          }
                        },
                        "required": [
                          "status",
                          "scope",
                          "since",
                          "completed",
                          "denied",
                          "failed",
                          "requested"
                        ]
                      },
                      {
                        "$ref": "#/$defs/__schema24"
                      }
                    ]
                  },
                  "selected": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "known"
                          },
                          "scope": {
                            "type": "string",
                            "const": "product"
                          },
                          "since": {
                            "$ref": "#/$defs/__schema22"
                          },
                          "binding_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                            }
                          }
                        },
                        "required": [
                          "status",
                          "scope",
                          "since",
                          "binding_ids"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "unknown"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "unavailable",
                              "binding_not_recorded"
                            ]
                          }
                        },
                        "required": [
                          "status",
                          "reason"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "not_applicable"
                          }
                        },
                        "required": [
                          "status"
                        ]
                      }
                    ]
                  },
                  "id": {
                    "type": "string",
                    "const": "email.send"
                  },
                  "required": {
                    "$ref": "#/$defs/__schema8"
                  },
                  "actions": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/__schema16"
                    }
                  },
                  "scope": {
                    "type": "object",
                    "properties": {
                      "from_addresses": {
                        "minItems": 1,
                        "maxItems": 32,
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema17"
                        }
                      },
                      "recipient_domains": {
                        "minItems": 1,
                        "maxItems": 32,
                        "type": "array",
                        "items": {
                          "$ref": "#/$defs/__schema18"
                        }
                      },
                      "max_recipients": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 50
                      },
                      "max_message_bytes": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 1048576
                      }
                    },
                    "required": [
                      "from_addresses",
                      "recipient_domains",
                      "max_recipients",
                      "max_message_bytes"
                    ]
                  },
                  "credential_owner": {
                    "$ref": "#/$defs/__schema11"
                  },
                  "provider": {
                    "$ref": "#/$defs/__schema12"
                  }
                },
                "required": [
                  "capability",
                  "layer",
                  "declared",
                  "observed",
                  "executed",
                  "id",
                  "required",
                  "actions",
                  "scope",
                  "credential_owner",
                  "provider"
                ]
              }
            ]
          }
        },
        {
          "$ref": "#/$defs/__schema24"
        }
      ]
    },
    "observed_undeclared": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "capability": {
                "type": "string"
              },
              "action": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sources": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema25"
                }
              },
              "confidence": {
                "$ref": "#/$defs/__schema19"
              }
            },
            "required": [
              "capability",
              "action",
              "sources",
              "confidence"
            ]
          }
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unknown"
            },
            "reason": {
              "type": "string",
              "enum": [
                "scan_unavailable",
                "not_qualified",
                "unavailable",
                "no_source_facts",
                "invalid_source_facts"
              ]
            }
          },
          "required": [
            "status",
            "reason"
          ]
        }
      ]
    },
    "packages": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "layer": {
              "type": "string",
              "const": "native"
            },
            "status": {
              "type": "string",
              "const": "known"
            },
            "total": {
              "$ref": "#/$defs/__schema23"
            },
            "ecosystems": {
              "type": "array",
              "items": {
                "type": "string",
                "const": "npm"
              }
            },
            "list_version": {
              "type": "string",
              "const": "1.0.0"
            },
            "snapshot_date": {
              "anyOf": [
                {
                  "$ref": "#/$defs/__schema22"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "layer",
            "status",
            "total",
            "ecosystems",
            "list_version",
            "snapshot_date"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unknown"
            },
            "reason": {
              "type": "string",
              "enum": [
                "no_package_list",
                "invalid_package_list",
                "not_qualified",
                "unavailable"
              ]
            }
          },
          "required": [
            "status",
            "reason"
          ]
        }
      ]
    },
    "egress": {
      "type": "object",
      "properties": {
        "layer": {
          "type": "string",
          "const": "native"
        },
        "declared": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "host": {
                "type": "string"
              },
              "port": {
                "type": "integer",
                "minimum": 1,
                "maximum": 65535
              }
            },
            "required": [
              "host",
              "port"
            ]
          }
        }
      },
      "required": [
        "layer",
        "declared"
      ]
    },
    "schedules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "cron": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "cron"
        ]
      }
    },
    "requirements": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "known",
                "partial"
              ]
            },
            "truncated": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "dependencies",
                  "scripts",
                  "imports",
                  "env",
                  "routes"
                ]
              }
            },
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "class": {
                    "type": "string",
                    "enum": [
                      "capability",
                      "managed_resource",
                      "platform_service",
                      "lifecycle_trigger",
                      "secret_migration",
                      "unknown"
                    ]
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "capability",
                          "managed_resource",
                          "trigger",
                          "platform_service",
                          "none"
                        ]
                      },
                      "id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind"
                    ]
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "declare_capability",
                      "request_resource",
                      "declare_trigger",
                      "migrate_secret",
                      "no_official_capability",
                      "inform"
                    ]
                  },
                  "confidence": {
                    "$ref": "#/$defs/__schema19"
                  },
                  "evidence": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "dependency",
                            "import",
                            "env",
                            "route",
                            "script",
                            "env_committed"
                          ]
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "value"
                      ]
                    }
                  }
                },
                "required": [
                  "id",
                  "class",
                  "target",
                  "action",
                  "confidence",
                  "evidence"
                ]
              }
            }
          },
          "required": [
            "status",
            "truncated",
            "items"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "$ref": "#/$defs/__schema20"
            },
            "reason": {
              "$ref": "#/$defs/__schema21"
            }
          },
          "required": [
            "status",
            "reason"
          ]
        }
      ]
    },
    "forwarding": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unknown"
            },
            "reason": {
              "type": "string",
              "const": "not_available"
            }
          },
          "required": [
            "status",
            "reason"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "none"
            }
          },
          "required": [
            "status"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "configured"
            },
            "from_product_id": {
              "type": "string",
              "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "to_product_id": {
              "type": "string",
              "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "path_prefix": {
              "type": "string",
              "const": "/api/"
            }
          },
          "required": [
            "status",
            "from_product_id",
            "to_product_id",
            "path_prefix"
          ]
        }
      ]
    },
    "app_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "built": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "enum": [
            "stored",
            "computed"
          ]
        },
        "built_at": {
          "$ref": "#/$defs/__schema22"
        },
        "pipeline_run_id": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "source",
        "built_at",
        "pipeline_run_id"
      ]
    },
    "environments": {
      "type": "object",
      "properties": {
        "staging": {
          "$ref": "#/$defs/__schema26"
        },
        "production": {
          "$ref": "#/$defs/__schema26"
        }
      },
      "required": [
        "staging",
        "production"
      ]
    },
    "managed_resources": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "resource_id": {
                "type": "string",
                "pattern": "^mres_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              "workspace_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  {
                    "type": "string",
                    "const": "ws_platform"
                  }
                ]
              },
              "product_id": {
                "type": "string",
                "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              "environment_type": {
                "type": "string",
                "enum": [
                  "preview",
                  "staging",
                  "production"
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "kv"
                ]
              },
              "provision_model": {
                "type": "string",
                "enum": [
                  "platform_pool",
                  "provider_backed"
                ]
              },
              "handle_mode": {
                "type": "string",
                "enum": [
                  "capability",
                  "injected"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "requested",
                  "provisioning",
                  "ready",
                  "failed",
                  "detached",
                  "deleted"
                ]
              },
              "layer": {
                "type": "string",
                "const": "managed"
              },
              "detached_at": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema22"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "retention_due_at": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/__schema22"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "$ref": "#/$defs/__schema22"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema22"
              }
            },
            "required": [
              "resource_id",
              "workspace_id",
              "product_id",
              "environment_type",
              "kind",
              "provision_model",
              "handle_mode",
              "state",
              "layer",
              "detached_at",
              "retention_due_at",
              "created_at",
              "updated_at"
            ]
          }
        },
        {
          "$ref": "#/$defs/__schema24"
        }
      ]
    },
    "current_verification": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": [
                    "verified",
                    "degraded",
                    "blocked",
                    "revoked"
                  ]
                },
                "computed_at": {
                  "$ref": "#/$defs/__schema22"
                }
              },
              "required": [
                "status",
                "computed_at"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        {
          "$ref": "#/$defs/__schema24"
        }
      ]
    },
    "dependency_recheck": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": [
                    "clean",
                    "findings",
                    "unavailable",
                    "not_covered"
                  ]
                },
                "checked_at": {
                  "$ref": "#/$defs/__schema22"
                },
                "snapshot_date": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/__schema22"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "findings": {
                  "maxItems": 50,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema27"
                  }
                },
                "findings_total": {
                  "$ref": "#/$defs/__schema23"
                }
              },
              "required": [
                "status",
                "checked_at",
                "snapshot_date",
                "findings",
                "findings_total"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        {
          "$ref": "#/$defs/__schema24"
        }
      ]
    }
  },
  "required": [
    "schema",
    "version",
    "workspace_id",
    "product_id",
    "revision_id",
    "descriptor",
    "capabilities",
    "observed_undeclared",
    "packages",
    "egress",
    "schedules",
    "requirements",
    "forwarding",
    "app_id",
    "built",
    "environments",
    "managed_resources",
    "current_verification",
    "dependency_recheck"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "node",
            "shell"
          ]
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "kind",
        "version"
      ]
    },
    "__schema1": {
      "type": "string",
      "pattern": "^\\/.*"
    },
    "__schema2": {
      "type": "object",
      "properties": {
        "package_manager": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "pnpm",
                "npm",
                "yarn"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "command": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "package_manager",
        "command"
      ]
    },
    "__schema3": {
      "type": "object",
      "properties": {
        "command": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "command"
      ]
    },
    "__schema4": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string"
        }
      },
      "required": [
        "command"
      ]
    },
    "__schema5": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65535
    },
    "__schema6": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "pattern": "^\\/.*"
        },
        "timeout_ms": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "path",
        "timeout_ms"
      ]
    },
    "__schema7": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "PORT",
          "NODE_ENV"
        ]
      }
    },
    "__schema8": {
      "type": "boolean"
    },
    "__schema9": {
      "type": "string",
      "enum": [
        "generate"
      ]
    },
    "__schema10": {
      "type": "string",
      "enum": [
        "text",
        "embedding"
      ]
    },
    "__schema11": {
      "type": "string",
      "const": "workspace"
    },
    "__schema12": {
      "type": "object",
      "properties": {
        "allow": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "prefer": {
          "type": "string"
        },
        "fallback": {
          "type": "string",
          "enum": [
            "none",
            "listed"
          ]
        }
      },
      "required": [
        "allow",
        "fallback"
      ]
    },
    "__schema13": {
      "type": "string",
      "enum": [
        "read",
        "write",
        "delete",
        "list"
      ]
    },
    "__schema14": {
      "type": "string",
      "enum": [
        "get",
        "set",
        "delete",
        "list",
        "increment"
      ]
    },
    "__schema15": {
      "type": "string",
      "const": "platform"
    },
    "__schema16": {
      "type": "string",
      "enum": [
        "send"
      ]
    },
    "__schema17": {
      "type": "string",
      "maxLength": 254,
      "pattern": "^(?!.*[A-Z])(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[ !#-[\\]-~]|\\\\[ -~])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
    },
    "__schema18": {
      "type": "string",
      "maxLength": 253,
      "pattern": "^(?:\\*|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$"
    },
    "__schema19": {
      "type": "string",
      "enum": [
        "high",
        "medium",
        "low"
      ]
    },
    "__schema20": {
      "type": "string",
      "const": "unknown"
    },
    "__schema21": {
      "type": "string",
      "enum": [
        "no_source_facts",
        "invalid_source_facts",
        "not_qualified",
        "unavailable"
      ]
    },
    "__schema22": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema23": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "__schema24": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "unknown"
        },
        "reason": {
          "type": "string",
          "const": "unavailable"
        }
      },
      "required": [
        "status",
        "reason"
      ]
    },
    "__schema25": {
      "type": "string",
      "enum": [
        "scan",
        "requirement"
      ]
    },
    "__schema26": {
      "type": "object",
      "properties": {
        "deployment": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "deployment_id": {
                      "type": "string",
                      "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                    },
                    "revision_id": {
                      "type": "string",
                      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                    },
                    "health": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "checked_at": {
                              "$ref": "#/$defs/__schema22"
                            },
                            "attempts": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "latency_ms": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "observed": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "healthy",
                                        "unhealthy",
                                        "not_running",
                                        "missing",
                                        "asleep",
                                        "unknown"
                                      ]
                                    },
                                    "sampled_at": {
                                      "anyOf": [
                                        {
                                          "$ref": "#/$defs/__schema22"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "last_healthy_at": {
                                      "anyOf": [
                                        {
                                          "$ref": "#/$defs/__schema22"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "consecutive_failures": {
                                      "$ref": "#/$defs/__schema23"
                                    },
                                    "last_status_code": {
                                      "anyOf": [
                                        {
                                          "type": "integer",
                                          "minimum": -9007199254740991,
                                          "maximum": 9007199254740991
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "latency_ms": {
                                      "anyOf": [
                                        {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "exit_code": {
                                      "anyOf": [
                                        {
                                          "type": "integer",
                                          "minimum": -9007199254740991,
                                          "maximum": 9007199254740991
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "reason_code": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "http_status",
                                            "timeout",
                                            "connection_failed",
                                            "process_exited",
                                            "not_registered",
                                            "workload_absent"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "state",
                                    "sampled_at",
                                    "last_healthy_at",
                                    "consecutive_failures",
                                    "last_status_code",
                                    "latency_ms",
                                    "exit_code",
                                    "reason_code"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "checked_at",
                            "attempts",
                            "latency_ms",
                            "observed"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "deployment_id",
                    "revision_id",
                    "health"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            {
              "$ref": "#/$defs/__schema24"
            }
          ]
        },
        "bindings": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "capability": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "present",
                      "missing",
                      "unknown"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "const": "unavailable"
                  },
                  "bindings": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "binding_id": {
                              "type": "string",
                              "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                            },
                            "provider": {
                              "type": "string"
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "requested",
                                "active",
                                "blocked",
                                "revoked"
                              ]
                            },
                            "expires_at": {
                              "$ref": "#/$defs/__schema22"
                            },
                            "suspected_invalid": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            },
                            "suspected_invalid_since": {
                              "anyOf": [
                                {
                                  "$ref": "#/$defs/__schema22"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "consecutive_auth_failures": {
                              "anyOf": [
                                {
                                  "$ref": "#/$defs/__schema23"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "credential": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                                    },
                                    "provider": {
                                      "type": "string"
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "active",
                                        "revoked"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "provider",
                                    "state"
                                  ]
                                },
                                {
                                  "$ref": "#/$defs/__schema24"
                                }
                              ]
                            }
                          },
                          "required": [
                            "binding_id",
                            "provider",
                            "state",
                            "expires_at",
                            "suspected_invalid",
                            "suspected_invalid_since",
                            "consecutive_auth_failures",
                            "credential"
                          ]
                        }
                      },
                      {
                        "$ref": "#/$defs/__schema24"
                      }
                    ]
                  }
                },
                "required": [
                  "capability",
                  "status"
                ]
              }
            },
            {
              "$ref": "#/$defs/__schema24"
            }
          ]
        }
      },
      "required": [
        "deployment",
        "bindings"
      ]
    },
    "__schema27": {
      "type": "object",
      "properties": {
        "package": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "advisory_id": {
          "type": "string"
        },
        "severity": {
          "type": "string",
          "enum": [
            "info",
            "warning",
            "error"
          ]
        },
        "cvss": {
          "type": [
            "string",
            "null"
          ]
        },
        "fixed_in": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "package",
        "version",
        "advisory_id",
        "severity",
        "cvss",
        "fixed_in"
      ]
    }
  }
}

RevisionGraphPackages

{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "known"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "next_cursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "total": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "status",
        "items",
        "next_cursor",
        "total"
      ]
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "unknown"
        },
        "reason": {
          "type": "string",
          "enum": [
            "no_package_list",
            "invalid_package_list",
            "not_qualified",
            "unavailable"
          ]
        },
        "items": {
          "minItems": 0,
          "maxItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        "next_cursor": {
          "type": "null"
        },
        "total": {
          "type": "number",
          "const": 0
        }
      },
      "required": [
        "status",
        "reason",
        "items",
        "next_cursor",
        "total"
      ]
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "ecosystem": {
          "type": "string",
          "enum": [
            "npm"
          ]
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "version": {
          "type": "string",
          "minLength": 1
        },
        "lockfile": {
          "type": "string",
          "minLength": 1,
          "pattern": "^(?!\\/)(?![A-Za-z]:)(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.(?:\\/|$)).+$"
        }
      },
      "required": [
        "ecosystem",
        "name",
        "version",
        "lockfile"
      ],
      "additionalProperties": false
    }
  }
}

AppGraph

{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "app_id": {
      "type": "string",
      "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment": {
      "type": "string",
      "enum": [
        "staging",
        "production"
      ]
    },
    "services": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "closure_state": {
            "type": "string",
            "enum": [
              "active",
              "closure_pending",
              "retired"
            ]
          },
          "deployment": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "deployment_id": {
                    "type": "string",
                    "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  "revision_id": {
                    "type": "string",
                    "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  }
                },
                "required": [
                  "deployment_id",
                  "revision_id"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "graph": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "schema": {
                    "type": "string",
                    "const": "belld.graph"
                  },
                  "version": {
                    "type": "string",
                    "const": "1.0.0"
                  },
                  "workspace_id": {
                    "type": "string",
                    "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  "product_id": {
                    "type": "string",
                    "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  "revision_id": {
                    "type": "string",
                    "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  "descriptor": {
                    "type": "object",
                    "properties": {
                      "product_type": {
                        "type": "string",
                        "enum": [
                          "hosted-app",
                          "hosted-api",
                          "agent",
                          "remote",
                          "bridge"
                        ]
                      },
                      "descriptor_hash": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      },
                      "descriptor": {
                        "type": "object",
                        "properties": {
                          "runtime": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "node",
                                  "shell"
                                ]
                              },
                              "version": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "kind",
                              "version"
                            ]
                          },
                          "entrypoint": {
                            "type": "object",
                            "properties": {
                              "command": {
                                "type": "string",
                                "minLength": 1
                              },
                              "args": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "command",
                              "args"
                            ]
                          },
                          "ports": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "port": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 65535
                                },
                                "protocol": {
                                  "type": "string",
                                  "const": "http"
                                }
                              },
                              "required": [
                                "port",
                                "protocol"
                              ]
                            }
                          },
                          "field_sources": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "string",
                              "enum": [
                                "detected",
                                "developer"
                              ]
                            }
                          },
                          "build_plan": {
                            "type": "object",
                            "properties": {
                              "runtime": {
                                "$ref": "#/$defs/__schema0"
                              },
                              "workdir": {
                                "$ref": "#/$defs/__schema1"
                              },
                              "install": {
                                "$ref": "#/$defs/__schema2"
                              },
                              "build": {
                                "$ref": "#/$defs/__schema3"
                              },
                              "start": {
                                "$ref": "#/$defs/__schema4"
                              },
                              "port": {
                                "$ref": "#/$defs/__schema5"
                              },
                              "health": {
                                "$ref": "#/$defs/__schema6"
                              },
                              "env": {
                                "$ref": "#/$defs/__schema7"
                              }
                            },
                            "required": [
                              "runtime",
                              "workdir",
                              "install",
                              "build",
                              "start",
                              "port",
                              "health",
                              "env"
                            ]
                          }
                        },
                        "required": [
                          "runtime",
                          "entrypoint",
                          "ports",
                          "field_sources"
                        ]
                      }
                    },
                    "required": [
                      "product_type",
                      "descriptor_hash",
                      "descriptor"
                    ]
                  },
                  "capabilities": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "capability": {
                                  "type": "string"
                                },
                                "layer": {
                                  "type": "string",
                                  "enum": [
                                    "connected",
                                    "managed"
                                  ]
                                },
                                "declared": {
                                  "type": "boolean",
                                  "const": true
                                },
                                "observed": {
                                  "type": "object",
                                  "properties": {
                                    "scan": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "type": "string",
                                              "const": "known"
                                            },
                                            "actions": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "action": {
                                                    "type": "string"
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "used",
                                                      "unused"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "action",
                                                  "state"
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "actions"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "type": "string",
                                              "const": "unknown"
                                            },
                                            "reason": {
                                              "type": "string",
                                              "enum": [
                                                "scan_unavailable",
                                                "not_qualified",
                                                "unavailable"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "reason"
                                          ]
                                        }
                                      ]
                                    },
                                    "requirement": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "known",
                                                "partial"
                                              ]
                                            },
                                            "confidence": {
                                              "anyOf": [
                                                {
                                                  "$ref": "#/$defs/__schema19"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "confidence"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "$ref": "#/$defs/__schema20"
                                            },
                                            "reason": {
                                              "$ref": "#/$defs/__schema21"
                                            },
                                            "confidence": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "reason",
                                            "confidence"
                                          ]
                                        }
                                      ]
                                    },
                                    "invoked": {
                                      "type": [
                                        "boolean",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "scan",
                                    "requirement",
                                    "invoked"
                                  ]
                                },
                                "executed": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "known"
                                        },
                                        "scope": {
                                          "type": "string",
                                          "const": "product"
                                        },
                                        "since": {
                                          "$ref": "#/$defs/__schema22"
                                        },
                                        "completed": {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        "denied": {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        "failed": {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        "requested": {
                                          "$ref": "#/$defs/__schema23"
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "scope",
                                        "since",
                                        "completed",
                                        "denied",
                                        "failed",
                                        "requested"
                                      ]
                                    },
                                    {
                                      "$ref": "#/$defs/__schema24"
                                    }
                                  ]
                                },
                                "selected": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "known"
                                        },
                                        "scope": {
                                          "type": "string",
                                          "const": "product"
                                        },
                                        "since": {
                                          "$ref": "#/$defs/__schema22"
                                        },
                                        "binding_ids": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                                          }
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "scope",
                                        "since",
                                        "binding_ids"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "unknown"
                                        },
                                        "reason": {
                                          "type": "string",
                                          "enum": [
                                            "unavailable",
                                            "binding_not_recorded"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "not_applicable"
                                        }
                                      },
                                      "required": [
                                        "status"
                                      ]
                                    }
                                  ]
                                },
                                "id": {
                                  "type": "string",
                                  "const": "ai.generate"
                                },
                                "required": {
                                  "$ref": "#/$defs/__schema8"
                                },
                                "actions": {
                                  "minItems": 1,
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/$defs/__schema9"
                                  }
                                },
                                "scope": {
                                  "type": "object",
                                  "properties": {
                                    "models": {
                                      "minItems": 1,
                                      "type": "array",
                                      "items": {
                                        "$ref": "#/$defs/__schema10"
                                      }
                                    },
                                    "max_tokens_per_call": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "required": [
                                    "models",
                                    "max_tokens_per_call"
                                  ]
                                },
                                "credential_owner": {
                                  "$ref": "#/$defs/__schema11"
                                },
                                "provider": {
                                  "$ref": "#/$defs/__schema12"
                                }
                              },
                              "required": [
                                "capability",
                                "layer",
                                "declared",
                                "observed",
                                "executed",
                                "id",
                                "required",
                                "actions",
                                "scope",
                                "credential_owner",
                                "provider"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "capability": {
                                  "type": "string"
                                },
                                "layer": {
                                  "type": "string",
                                  "enum": [
                                    "connected",
                                    "managed"
                                  ]
                                },
                                "declared": {
                                  "type": "boolean",
                                  "const": true
                                },
                                "observed": {
                                  "type": "object",
                                  "properties": {
                                    "scan": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "type": "string",
                                              "const": "known"
                                            },
                                            "actions": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "action": {
                                                    "type": "string"
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "used",
                                                      "unused"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "action",
                                                  "state"
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "actions"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "type": "string",
                                              "const": "unknown"
                                            },
                                            "reason": {
                                              "type": "string",
                                              "enum": [
                                                "scan_unavailable",
                                                "not_qualified",
                                                "unavailable"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "reason"
                                          ]
                                        }
                                      ]
                                    },
                                    "requirement": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "known",
                                                "partial"
                                              ]
                                            },
                                            "confidence": {
                                              "anyOf": [
                                                {
                                                  "$ref": "#/$defs/__schema19"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "confidence"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "$ref": "#/$defs/__schema20"
                                            },
                                            "reason": {
                                              "$ref": "#/$defs/__schema21"
                                            },
                                            "confidence": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "reason",
                                            "confidence"
                                          ]
                                        }
                                      ]
                                    },
                                    "invoked": {
                                      "type": [
                                        "boolean",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "scan",
                                    "requirement",
                                    "invoked"
                                  ]
                                },
                                "executed": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "known"
                                        },
                                        "scope": {
                                          "type": "string",
                                          "const": "product"
                                        },
                                        "since": {
                                          "$ref": "#/$defs/__schema22"
                                        },
                                        "completed": {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        "denied": {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        "failed": {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        "requested": {
                                          "$ref": "#/$defs/__schema23"
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "scope",
                                        "since",
                                        "completed",
                                        "denied",
                                        "failed",
                                        "requested"
                                      ]
                                    },
                                    {
                                      "$ref": "#/$defs/__schema24"
                                    }
                                  ]
                                },
                                "selected": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "known"
                                        },
                                        "scope": {
                                          "type": "string",
                                          "const": "product"
                                        },
                                        "since": {
                                          "$ref": "#/$defs/__schema22"
                                        },
                                        "binding_ids": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                                          }
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "scope",
                                        "since",
                                        "binding_ids"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "unknown"
                                        },
                                        "reason": {
                                          "type": "string",
                                          "enum": [
                                            "unavailable",
                                            "binding_not_recorded"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "not_applicable"
                                        }
                                      },
                                      "required": [
                                        "status"
                                      ]
                                    }
                                  ]
                                },
                                "id": {
                                  "type": "string",
                                  "const": "storage.object"
                                },
                                "required": {
                                  "$ref": "#/$defs/__schema8"
                                },
                                "actions": {
                                  "minItems": 1,
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/$defs/__schema13"
                                  }
                                },
                                "scope": {
                                  "type": "object",
                                  "properties": {
                                    "prefix": {
                                      "type": "string",
                                      "pattern": "^\\/(?!.*\\.\\.).*$"
                                    },
                                    "max_object_bytes": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "required": [
                                    "prefix",
                                    "max_object_bytes"
                                  ]
                                },
                                "credential_owner": {
                                  "$ref": "#/$defs/__schema11"
                                },
                                "provider": {
                                  "$ref": "#/$defs/__schema12"
                                }
                              },
                              "required": [
                                "capability",
                                "layer",
                                "declared",
                                "observed",
                                "executed",
                                "id",
                                "required",
                                "actions",
                                "scope",
                                "credential_owner",
                                "provider"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "capability": {
                                  "type": "string"
                                },
                                "layer": {
                                  "type": "string",
                                  "enum": [
                                    "connected",
                                    "managed"
                                  ]
                                },
                                "declared": {
                                  "type": "boolean",
                                  "const": true
                                },
                                "observed": {
                                  "type": "object",
                                  "properties": {
                                    "scan": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "type": "string",
                                              "const": "known"
                                            },
                                            "actions": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "action": {
                                                    "type": "string"
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "used",
                                                      "unused"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "action",
                                                  "state"
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "actions"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "type": "string",
                                              "const": "unknown"
                                            },
                                            "reason": {
                                              "type": "string",
                                              "enum": [
                                                "scan_unavailable",
                                                "not_qualified",
                                                "unavailable"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "reason"
                                          ]
                                        }
                                      ]
                                    },
                                    "requirement": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "known",
                                                "partial"
                                              ]
                                            },
                                            "confidence": {
                                              "anyOf": [
                                                {
                                                  "$ref": "#/$defs/__schema19"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "confidence"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "$ref": "#/$defs/__schema20"
                                            },
                                            "reason": {
                                              "$ref": "#/$defs/__schema21"
                                            },
                                            "confidence": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "reason",
                                            "confidence"
                                          ]
                                        }
                                      ]
                                    },
                                    "invoked": {
                                      "type": [
                                        "boolean",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "scan",
                                    "requirement",
                                    "invoked"
                                  ]
                                },
                                "executed": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "known"
                                        },
                                        "scope": {
                                          "type": "string",
                                          "const": "product"
                                        },
                                        "since": {
                                          "$ref": "#/$defs/__schema22"
                                        },
                                        "completed": {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        "denied": {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        "failed": {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        "requested": {
                                          "$ref": "#/$defs/__schema23"
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "scope",
                                        "since",
                                        "completed",
                                        "denied",
                                        "failed",
                                        "requested"
                                      ]
                                    },
                                    {
                                      "$ref": "#/$defs/__schema24"
                                    }
                                  ]
                                },
                                "selected": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "known"
                                        },
                                        "scope": {
                                          "type": "string",
                                          "const": "product"
                                        },
                                        "since": {
                                          "$ref": "#/$defs/__schema22"
                                        },
                                        "binding_ids": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                                          }
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "scope",
                                        "since",
                                        "binding_ids"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "unknown"
                                        },
                                        "reason": {
                                          "type": "string",
                                          "enum": [
                                            "unavailable",
                                            "binding_not_recorded"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "not_applicable"
                                        }
                                      },
                                      "required": [
                                        "status"
                                      ]
                                    }
                                  ]
                                },
                                "id": {
                                  "type": "string",
                                  "const": "data.kv"
                                },
                                "required": {
                                  "$ref": "#/$defs/__schema8"
                                },
                                "actions": {
                                  "minItems": 1,
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/$defs/__schema14"
                                  }
                                },
                                "scope": {
                                  "type": "object",
                                  "properties": {
                                    "prefix": {
                                      "type": "string",
                                      "pattern": "^\\/(?!.*\\.\\.).*$"
                                    },
                                    "max_value_bytes": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 65536
                                    },
                                    "max_keys": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 100000
                                    }
                                  },
                                  "required": [
                                    "prefix",
                                    "max_value_bytes",
                                    "max_keys"
                                  ]
                                },
                                "credential_owner": {
                                  "type": "string",
                                  "const": "platform"
                                },
                                "provider": {
                                  "type": "object",
                                  "properties": {
                                    "allow": {
                                      "minItems": 1,
                                      "maxItems": 1,
                                      "type": "array",
                                      "items": {
                                        "$ref": "#/$defs/__schema15"
                                      }
                                    },
                                    "prefer": {
                                      "type": "string",
                                      "const": "platform"
                                    },
                                    "fallback": {
                                      "type": "string",
                                      "const": "none"
                                    }
                                  },
                                  "required": [
                                    "allow",
                                    "fallback"
                                  ]
                                }
                              },
                              "required": [
                                "capability",
                                "layer",
                                "declared",
                                "observed",
                                "executed",
                                "id",
                                "required",
                                "actions",
                                "scope",
                                "credential_owner",
                                "provider"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "capability": {
                                  "type": "string"
                                },
                                "layer": {
                                  "type": "string",
                                  "enum": [
                                    "connected",
                                    "managed"
                                  ]
                                },
                                "declared": {
                                  "type": "boolean",
                                  "const": true
                                },
                                "observed": {
                                  "type": "object",
                                  "properties": {
                                    "scan": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "type": "string",
                                              "const": "known"
                                            },
                                            "actions": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "action": {
                                                    "type": "string"
                                                  },
                                                  "state": {
                                                    "type": "string",
                                                    "enum": [
                                                      "used",
                                                      "unused"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "action",
                                                  "state"
                                                ]
                                              }
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "actions"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "type": "string",
                                              "const": "unknown"
                                            },
                                            "reason": {
                                              "type": "string",
                                              "enum": [
                                                "scan_unavailable",
                                                "not_qualified",
                                                "unavailable"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "reason"
                                          ]
                                        }
                                      ]
                                    },
                                    "requirement": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "type": "string",
                                              "enum": [
                                                "known",
                                                "partial"
                                              ]
                                            },
                                            "confidence": {
                                              "anyOf": [
                                                {
                                                  "$ref": "#/$defs/__schema19"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "confidence"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "status": {
                                              "$ref": "#/$defs/__schema20"
                                            },
                                            "reason": {
                                              "$ref": "#/$defs/__schema21"
                                            },
                                            "confidence": {
                                              "type": "null"
                                            }
                                          },
                                          "required": [
                                            "status",
                                            "reason",
                                            "confidence"
                                          ]
                                        }
                                      ]
                                    },
                                    "invoked": {
                                      "type": [
                                        "boolean",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "scan",
                                    "requirement",
                                    "invoked"
                                  ]
                                },
                                "executed": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "known"
                                        },
                                        "scope": {
                                          "type": "string",
                                          "const": "product"
                                        },
                                        "since": {
                                          "$ref": "#/$defs/__schema22"
                                        },
                                        "completed": {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        "denied": {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        "failed": {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        "requested": {
                                          "$ref": "#/$defs/__schema23"
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "scope",
                                        "since",
                                        "completed",
                                        "denied",
                                        "failed",
                                        "requested"
                                      ]
                                    },
                                    {
                                      "$ref": "#/$defs/__schema24"
                                    }
                                  ]
                                },
                                "selected": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "known"
                                        },
                                        "scope": {
                                          "type": "string",
                                          "const": "product"
                                        },
                                        "since": {
                                          "$ref": "#/$defs/__schema22"
                                        },
                                        "binding_ids": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                                          }
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "scope",
                                        "since",
                                        "binding_ids"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "unknown"
                                        },
                                        "reason": {
                                          "type": "string",
                                          "enum": [
                                            "unavailable",
                                            "binding_not_recorded"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "status",
                                        "reason"
                                      ]
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "status": {
                                          "type": "string",
                                          "const": "not_applicable"
                                        }
                                      },
                                      "required": [
                                        "status"
                                      ]
                                    }
                                  ]
                                },
                                "id": {
                                  "type": "string",
                                  "const": "email.send"
                                },
                                "required": {
                                  "$ref": "#/$defs/__schema8"
                                },
                                "actions": {
                                  "minItems": 1,
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/$defs/__schema16"
                                  }
                                },
                                "scope": {
                                  "type": "object",
                                  "properties": {
                                    "from_addresses": {
                                      "minItems": 1,
                                      "maxItems": 32,
                                      "type": "array",
                                      "items": {
                                        "$ref": "#/$defs/__schema17"
                                      }
                                    },
                                    "recipient_domains": {
                                      "minItems": 1,
                                      "maxItems": 32,
                                      "type": "array",
                                      "items": {
                                        "$ref": "#/$defs/__schema18"
                                      }
                                    },
                                    "max_recipients": {
                                      "type": "integer",
                                      "minimum": 1,
                                      "maximum": 50
                                    },
                                    "max_message_bytes": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0,
                                      "maximum": 1048576
                                    }
                                  },
                                  "required": [
                                    "from_addresses",
                                    "recipient_domains",
                                    "max_recipients",
                                    "max_message_bytes"
                                  ]
                                },
                                "credential_owner": {
                                  "$ref": "#/$defs/__schema11"
                                },
                                "provider": {
                                  "$ref": "#/$defs/__schema12"
                                }
                              },
                              "required": [
                                "capability",
                                "layer",
                                "declared",
                                "observed",
                                "executed",
                                "id",
                                "required",
                                "actions",
                                "scope",
                                "credential_owner",
                                "provider"
                              ]
                            }
                          ]
                        }
                      },
                      {
                        "$ref": "#/$defs/__schema24"
                      }
                    ]
                  },
                  "observed_undeclared": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "capability": {
                              "type": "string"
                            },
                            "action": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "sources": {
                              "minItems": 1,
                              "type": "array",
                              "items": {
                                "$ref": "#/$defs/__schema25"
                              }
                            },
                            "confidence": {
                              "$ref": "#/$defs/__schema19"
                            }
                          },
                          "required": [
                            "capability",
                            "action",
                            "sources",
                            "confidence"
                          ]
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "unknown"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "scan_unavailable",
                              "not_qualified",
                              "unavailable",
                              "no_source_facts",
                              "invalid_source_facts"
                            ]
                          }
                        },
                        "required": [
                          "status",
                          "reason"
                        ]
                      }
                    ]
                  },
                  "packages": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "layer": {
                            "type": "string",
                            "const": "native"
                          },
                          "status": {
                            "type": "string",
                            "const": "known"
                          },
                          "total": {
                            "$ref": "#/$defs/__schema23"
                          },
                          "ecosystems": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "const": "npm"
                            }
                          },
                          "list_version": {
                            "type": "string",
                            "const": "1.0.0"
                          },
                          "snapshot_date": {
                            "anyOf": [
                              {
                                "$ref": "#/$defs/__schema22"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "layer",
                          "status",
                          "total",
                          "ecosystems",
                          "list_version",
                          "snapshot_date"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "const": "unknown"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "no_package_list",
                              "invalid_package_list",
                              "not_qualified",
                              "unavailable"
                            ]
                          }
                        },
                        "required": [
                          "status",
                          "reason"
                        ]
                      }
                    ]
                  },
                  "egress": {
                    "type": "object",
                    "properties": {
                      "layer": {
                        "type": "string",
                        "const": "native"
                      },
                      "declared": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "host": {
                              "type": "string"
                            },
                            "port": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 65535
                            }
                          },
                          "required": [
                            "host",
                            "port"
                          ]
                        }
                      }
                    },
                    "required": [
                      "layer",
                      "declared"
                    ]
                  },
                  "schedules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string"
                        },
                        "cron": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "path",
                        "cron"
                      ]
                    }
                  },
                  "requirements": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "known",
                              "partial"
                            ]
                          },
                          "truncated": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "dependencies",
                                "scripts",
                                "imports",
                                "env",
                                "routes"
                              ]
                            }
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "class": {
                                  "type": "string",
                                  "enum": [
                                    "capability",
                                    "managed_resource",
                                    "platform_service",
                                    "lifecycle_trigger",
                                    "secret_migration",
                                    "unknown"
                                  ]
                                },
                                "target": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "capability",
                                        "managed_resource",
                                        "trigger",
                                        "platform_service",
                                        "none"
                                      ]
                                    },
                                    "id": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind"
                                  ]
                                },
                                "action": {
                                  "type": "string",
                                  "enum": [
                                    "declare_capability",
                                    "request_resource",
                                    "declare_trigger",
                                    "migrate_secret",
                                    "no_official_capability",
                                    "inform"
                                  ]
                                },
                                "confidence": {
                                  "$ref": "#/$defs/__schema19"
                                },
                                "evidence": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "enum": [
                                          "dependency",
                                          "import",
                                          "env",
                                          "route",
                                          "script",
                                          "env_committed"
                                        ]
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "value"
                                    ]
                                  }
                                }
                              },
                              "required": [
                                "id",
                                "class",
                                "target",
                                "action",
                                "confidence",
                                "evidence"
                              ]
                            }
                          }
                        },
                        "required": [
                          "status",
                          "truncated",
                          "items"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "status": {
                            "$ref": "#/$defs/__schema20"
                          },
                          "reason": {
                            "$ref": "#/$defs/__schema21"
                          }
                        },
                        "required": [
                          "status",
                          "reason"
                        ]
                      }
                    ]
                  },
                  "forwarding": {
                    "$ref": "#/$defs/__schema26"
                  },
                  "app_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "built": {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "enum": [
                          "stored",
                          "computed"
                        ]
                      },
                      "built_at": {
                        "$ref": "#/$defs/__schema22"
                      },
                      "pipeline_run_id": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "source",
                      "built_at",
                      "pipeline_run_id"
                    ]
                  },
                  "environments": {
                    "type": "object",
                    "properties": {
                      "staging": {
                        "$ref": "#/$defs/__schema27"
                      },
                      "production": {
                        "$ref": "#/$defs/__schema27"
                      }
                    },
                    "required": [
                      "staging",
                      "production"
                    ]
                  },
                  "managed_resources": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "resource_id": {
                              "type": "string",
                              "pattern": "^mres_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                            },
                            "workspace_id": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                                },
                                {
                                  "type": "string",
                                  "const": "ws_platform"
                                }
                              ]
                            },
                            "product_id": {
                              "type": "string",
                              "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                            },
                            "environment_type": {
                              "type": "string",
                              "enum": [
                                "preview",
                                "staging",
                                "production"
                              ]
                            },
                            "kind": {
                              "type": "string",
                              "enum": [
                                "kv"
                              ]
                            },
                            "provision_model": {
                              "type": "string",
                              "enum": [
                                "platform_pool",
                                "provider_backed"
                              ]
                            },
                            "handle_mode": {
                              "type": "string",
                              "enum": [
                                "capability",
                                "injected"
                              ]
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "requested",
                                "provisioning",
                                "ready",
                                "failed",
                                "detached",
                                "deleted"
                              ]
                            },
                            "layer": {
                              "type": "string",
                              "const": "managed"
                            },
                            "detached_at": {
                              "anyOf": [
                                {
                                  "$ref": "#/$defs/__schema22"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "retention_due_at": {
                              "anyOf": [
                                {
                                  "$ref": "#/$defs/__schema22"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "created_at": {
                              "$ref": "#/$defs/__schema22"
                            },
                            "updated_at": {
                              "$ref": "#/$defs/__schema22"
                            }
                          },
                          "required": [
                            "resource_id",
                            "workspace_id",
                            "product_id",
                            "environment_type",
                            "kind",
                            "provision_model",
                            "handle_mode",
                            "state",
                            "layer",
                            "detached_at",
                            "retention_due_at",
                            "created_at",
                            "updated_at"
                          ]
                        }
                      },
                      {
                        "$ref": "#/$defs/__schema24"
                      }
                    ]
                  },
                  "current_verification": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "enum": [
                                  "verified",
                                  "degraded",
                                  "blocked",
                                  "revoked"
                                ]
                              },
                              "computed_at": {
                                "$ref": "#/$defs/__schema22"
                              }
                            },
                            "required": [
                              "status",
                              "computed_at"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "$ref": "#/$defs/__schema24"
                      }
                    ]
                  },
                  "dependency_recheck": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "string",
                                "enum": [
                                  "clean",
                                  "findings",
                                  "unavailable",
                                  "not_covered"
                                ]
                              },
                              "checked_at": {
                                "$ref": "#/$defs/__schema22"
                              },
                              "snapshot_date": {
                                "anyOf": [
                                  {
                                    "$ref": "#/$defs/__schema22"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "findings": {
                                "maxItems": 50,
                                "type": "array",
                                "items": {
                                  "$ref": "#/$defs/__schema28"
                                }
                              },
                              "findings_total": {
                                "$ref": "#/$defs/__schema23"
                              }
                            },
                            "required": [
                              "status",
                              "checked_at",
                              "snapshot_date",
                              "findings",
                              "findings_total"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "$ref": "#/$defs/__schema24"
                      }
                    ]
                  }
                },
                "required": [
                  "schema",
                  "version",
                  "workspace_id",
                  "product_id",
                  "revision_id",
                  "descriptor",
                  "capabilities",
                  "observed_undeclared",
                  "packages",
                  "egress",
                  "schedules",
                  "requirements",
                  "forwarding",
                  "app_id",
                  "built",
                  "environments",
                  "managed_resources",
                  "current_verification",
                  "dependency_recheck"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "product_id",
          "closure_state",
          "deployment",
          "graph"
        ]
      }
    },
    "forwarding": {
      "$ref": "#/$defs/__schema26"
    }
  },
  "required": [
    "workspace_id",
    "app_id",
    "environment",
    "services",
    "forwarding"
  ],
  "$defs": {
    "__schema0": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "node",
            "shell"
          ]
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "kind",
        "version"
      ]
    },
    "__schema1": {
      "type": "string",
      "pattern": "^\\/.*"
    },
    "__schema2": {
      "type": "object",
      "properties": {
        "package_manager": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "pnpm",
                "npm",
                "yarn"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "command": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "package_manager",
        "command"
      ]
    },
    "__schema3": {
      "type": "object",
      "properties": {
        "command": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "command"
      ]
    },
    "__schema4": {
      "type": "object",
      "properties": {
        "command": {
          "type": "string"
        }
      },
      "required": [
        "command"
      ]
    },
    "__schema5": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65535
    },
    "__schema6": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "pattern": "^\\/.*"
        },
        "timeout_ms": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "path",
        "timeout_ms"
      ]
    },
    "__schema7": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "PORT",
          "NODE_ENV"
        ]
      }
    },
    "__schema8": {
      "type": "boolean"
    },
    "__schema9": {
      "type": "string",
      "enum": [
        "generate"
      ]
    },
    "__schema10": {
      "type": "string",
      "enum": [
        "text",
        "embedding"
      ]
    },
    "__schema11": {
      "type": "string",
      "const": "workspace"
    },
    "__schema12": {
      "type": "object",
      "properties": {
        "allow": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "prefer": {
          "type": "string"
        },
        "fallback": {
          "type": "string",
          "enum": [
            "none",
            "listed"
          ]
        }
      },
      "required": [
        "allow",
        "fallback"
      ]
    },
    "__schema13": {
      "type": "string",
      "enum": [
        "read",
        "write",
        "delete",
        "list"
      ]
    },
    "__schema14": {
      "type": "string",
      "enum": [
        "get",
        "set",
        "delete",
        "list",
        "increment"
      ]
    },
    "__schema15": {
      "type": "string",
      "const": "platform"
    },
    "__schema16": {
      "type": "string",
      "enum": [
        "send"
      ]
    },
    "__schema17": {
      "type": "string",
      "maxLength": 254,
      "pattern": "^(?!.*[A-Z])(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[ !#-[\\]-~]|\\\\[ -~])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"
    },
    "__schema18": {
      "type": "string",
      "maxLength": 253,
      "pattern": "^(?:\\*|(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$"
    },
    "__schema19": {
      "type": "string",
      "enum": [
        "high",
        "medium",
        "low"
      ]
    },
    "__schema20": {
      "type": "string",
      "const": "unknown"
    },
    "__schema21": {
      "type": "string",
      "enum": [
        "no_source_facts",
        "invalid_source_facts",
        "not_qualified",
        "unavailable"
      ]
    },
    "__schema22": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema23": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "__schema24": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "unknown"
        },
        "reason": {
          "type": "string",
          "const": "unavailable"
        }
      },
      "required": [
        "status",
        "reason"
      ]
    },
    "__schema25": {
      "type": "string",
      "enum": [
        "scan",
        "requirement"
      ]
    },
    "__schema26": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unknown"
            },
            "reason": {
              "type": "string",
              "const": "not_available"
            }
          },
          "required": [
            "status",
            "reason"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "none"
            }
          },
          "required": [
            "status"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "configured"
            },
            "from_product_id": {
              "type": "string",
              "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "to_product_id": {
              "type": "string",
              "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "path_prefix": {
              "type": "string",
              "const": "/api/"
            }
          },
          "required": [
            "status",
            "from_product_id",
            "to_product_id",
            "path_prefix"
          ]
        }
      ]
    },
    "__schema27": {
      "type": "object",
      "properties": {
        "deployment": {
          "anyOf": [
            {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "deployment_id": {
                      "type": "string",
                      "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                    },
                    "revision_id": {
                      "type": "string",
                      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                    },
                    "health": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "checked_at": {
                              "$ref": "#/$defs/__schema22"
                            },
                            "attempts": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "latency_ms": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "observed": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "healthy",
                                        "unhealthy",
                                        "not_running",
                                        "missing",
                                        "asleep",
                                        "unknown"
                                      ]
                                    },
                                    "sampled_at": {
                                      "anyOf": [
                                        {
                                          "$ref": "#/$defs/__schema22"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "last_healthy_at": {
                                      "anyOf": [
                                        {
                                          "$ref": "#/$defs/__schema22"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "consecutive_failures": {
                                      "$ref": "#/$defs/__schema23"
                                    },
                                    "last_status_code": {
                                      "anyOf": [
                                        {
                                          "type": "integer",
                                          "minimum": -9007199254740991,
                                          "maximum": 9007199254740991
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "latency_ms": {
                                      "anyOf": [
                                        {
                                          "$ref": "#/$defs/__schema23"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "exit_code": {
                                      "anyOf": [
                                        {
                                          "type": "integer",
                                          "minimum": -9007199254740991,
                                          "maximum": 9007199254740991
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "reason_code": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "enum": [
                                            "http_status",
                                            "timeout",
                                            "connection_failed",
                                            "process_exited",
                                            "not_registered",
                                            "workload_absent"
                                          ]
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "state",
                                    "sampled_at",
                                    "last_healthy_at",
                                    "consecutive_failures",
                                    "last_status_code",
                                    "latency_ms",
                                    "exit_code",
                                    "reason_code"
                                  ]
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "checked_at",
                            "attempts",
                            "latency_ms",
                            "observed"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "deployment_id",
                    "revision_id",
                    "health"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            {
              "$ref": "#/$defs/__schema24"
            }
          ]
        },
        "bindings": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "capability": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "present",
                      "missing",
                      "unknown"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "const": "unavailable"
                  },
                  "bindings": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "binding_id": {
                              "type": "string",
                              "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                            },
                            "provider": {
                              "type": "string"
                            },
                            "state": {
                              "type": "string",
                              "enum": [
                                "requested",
                                "active",
                                "blocked",
                                "revoked"
                              ]
                            },
                            "expires_at": {
                              "$ref": "#/$defs/__schema22"
                            },
                            "suspected_invalid": {
                              "type": [
                                "boolean",
                                "null"
                              ]
                            },
                            "suspected_invalid_since": {
                              "anyOf": [
                                {
                                  "$ref": "#/$defs/__schema22"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "consecutive_auth_failures": {
                              "anyOf": [
                                {
                                  "$ref": "#/$defs/__schema23"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "credential": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                                    },
                                    "provider": {
                                      "type": "string"
                                    },
                                    "state": {
                                      "type": "string",
                                      "enum": [
                                        "active",
                                        "revoked"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "provider",
                                    "state"
                                  ]
                                },
                                {
                                  "$ref": "#/$defs/__schema24"
                                }
                              ]
                            }
                          },
                          "required": [
                            "binding_id",
                            "provider",
                            "state",
                            "expires_at",
                            "suspected_invalid",
                            "suspected_invalid_since",
                            "consecutive_auth_failures",
                            "credential"
                          ]
                        }
                      },
                      {
                        "$ref": "#/$defs/__schema24"
                      }
                    ]
                  }
                },
                "required": [
                  "capability",
                  "status"
                ]
              }
            },
            {
              "$ref": "#/$defs/__schema24"
            }
          ]
        }
      },
      "required": [
        "deployment",
        "bindings"
      ]
    },
    "__schema28": {
      "type": "object",
      "properties": {
        "package": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "advisory_id": {
          "type": "string"
        },
        "severity": {
          "type": "string",
          "enum": [
            "info",
            "warning",
            "error"
          ]
        },
        "cvss": {
          "type": [
            "string",
            "null"
          ]
        },
        "fixed_in": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "package",
        "version",
        "advisory_id",
        "severity",
        "cvss",
        "fixed_in"
      ]
    }
  }
}

BindingDependents

{
  "type": "object",
  "properties": {
    "binding_id": {
      "type": "string",
      "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "capability": {
      "type": "string"
    },
    "environment": {
      "$ref": "#/$defs/__schema0"
    },
    "state": {
      "type": "string",
      "enum": [
        "requested",
        "active",
        "blocked",
        "revoked"
      ]
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "eligible": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "known"
            },
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "app_id": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "product_id": {
                    "type": "string",
                    "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  "environment": {
                    "$ref": "#/$defs/__schema0"
                  },
                  "revision_id": {
                    "type": "string",
                    "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  }
                },
                "required": [
                  "app_id",
                  "product_id",
                  "environment",
                  "revision_id"
                ]
              }
            }
          },
          "required": [
            "status",
            "items"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unknown"
            },
            "reason": {
              "type": "string",
              "const": "unavailable"
            }
          },
          "required": [
            "status",
            "reason"
          ]
        }
      ]
    },
    "recent": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "known"
            },
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "app_id": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "product_id": {
                    "type": "string",
                    "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  "environment": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/__schema0"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "count": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "last_used_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  }
                },
                "required": [
                  "app_id",
                  "product_id",
                  "environment",
                  "count",
                  "last_used_at"
                ]
              }
            }
          },
          "required": [
            "status",
            "items"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unknown"
            },
            "reason": {
              "type": "string",
              "const": "unavailable"
            }
          },
          "required": [
            "status",
            "reason"
          ]
        }
      ]
    }
  },
  "required": [
    "binding_id",
    "capability",
    "environment",
    "state",
    "expires_at",
    "eligible",
    "recent"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    },
    "__schema1": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema2"
        },
        {
          "type": "null"
        }
      ],
      "description": "The App the service belongs to at read time."
    },
    "__schema2": {
      "type": "string",
      "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  }
}

CredentialDependents

{
  "type": "object",
  "properties": {
    "credential_id": {
      "type": "string",
      "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "bindings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "binding_id": {
            "type": "string",
            "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "capability": {
            "type": "string"
          },
          "environment": {
            "$ref": "#/$defs/__schema0"
          },
          "state": {
            "type": "string",
            "enum": [
              "requested",
              "active",
              "blocked",
              "revoked"
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "binding_id",
          "capability",
          "environment",
          "state",
          "expires_at"
        ]
      }
    },
    "eligible": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "known"
            },
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "app_id": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "product_id": {
                    "type": "string",
                    "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  "environment": {
                    "$ref": "#/$defs/__schema0"
                  },
                  "revision_id": {
                    "type": "string",
                    "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  "binding_id": {
                    "type": "string",
                    "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  }
                },
                "required": [
                  "app_id",
                  "product_id",
                  "environment",
                  "revision_id",
                  "binding_id"
                ]
              }
            }
          },
          "required": [
            "status",
            "items"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unknown"
            },
            "reason": {
              "type": "string",
              "const": "unavailable"
            }
          },
          "required": [
            "status",
            "reason"
          ]
        }
      ]
    },
    "recent": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "known"
            },
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "app_id": {
                    "$ref": "#/$defs/__schema1"
                  },
                  "product_id": {
                    "type": "string",
                    "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  "environment": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/__schema0"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "count": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "last_used_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "binding_id": {
                    "type": "string",
                    "pattern": "^bind_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  }
                },
                "required": [
                  "app_id",
                  "product_id",
                  "environment",
                  "count",
                  "last_used_at",
                  "binding_id"
                ]
              }
            }
          },
          "required": [
            "status",
            "items"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "const": "unknown"
            },
            "reason": {
              "type": "string",
              "const": "unavailable"
            }
          },
          "required": [
            "status",
            "reason"
          ]
        }
      ]
    }
  },
  "required": [
    "credential_id",
    "bindings",
    "eligible",
    "recent"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    },
    "__schema1": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema2"
        },
        {
          "type": "null"
        }
      ],
      "description": "The App the service belongs to at read time."
    },
    "__schema2": {
      "type": "string",
      "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  }
}

BuildVariablesFetchRequest

{
  "type": "object",
  "properties": {
    "request_event_id": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  },
  "required": [
    "request_event_id"
  ],
  "additionalProperties": false
}

BuildVariablesFetchResponse

{
  "type": "object",
  "properties": {
    "build_variables_hash": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "variables": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ]
      }
    }
  },
  "required": [
    "build_variables_hash",
    "variables"
  ]
}

RuntimeSecretsFetchRequest

{
  "type": "object",
  "properties": {
    "start_event_id": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  },
  "required": [
    "start_event_id"
  ],
  "additionalProperties": false
}

RuntimeSecretsFetchResponse

{
  "type": "object",
  "properties": {
    "variables": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ]
      }
    }
  },
  "required": [
    "variables"
  ]
}

EgressReport

{
  "type": "object",
  "properties": {
    "event_id": {
      "$ref": "#/$defs/__schema0"
    },
    "event_type": {
      "type": "string",
      "const": "H-116.egress.usage_reported"
    },
    "schema_version": {
      "type": "string",
      "const": "1.0.0"
    },
    "occurred_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "producer": {
      "type": "string",
      "const": "runner"
    },
    "workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    },
    "correlation_id": {
      "type": "string",
      "pattern": "^(brk|rsm|pvar|minv|trg|hook|mrun|mres|ws|app|usr|prod|rev|ver|rel|env|dep|srf|acc|ses|inv|exe|evt|pend|ddl|ntf|pipe|fnd|qual|cred|bind|hdl|cap|svc|frz|adj|fix|upl|dom|wb|ctx|aud|pay|ivc|rfd)_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "causation_id": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema0"
        },
        {
          "type": "null"
        }
      ]
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "payload": {
      "type": "object",
      "properties": {
        "deployment_id": {
          "type": "string",
          "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "workspace_id": {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "window_start": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "window_end": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "bytes_sent": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "bytes_received": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "deployment_capped": {
          "type": "boolean"
        },
        "denied": {
          "maxItems": 20,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema1"
          }
        }
      },
      "required": [
        "deployment_id",
        "workspace_id",
        "window_start",
        "window_end",
        "bytes_sent",
        "bytes_received",
        "deployment_capped",
        "denied"
      ]
    }
  },
  "required": [
    "event_id",
    "event_type",
    "schema_version",
    "occurred_at",
    "producer",
    "workspace_id",
    "correlation_id",
    "causation_id",
    "idempotency_key",
    "payload"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema1": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string",
          "maxLength": 253,
          "pattern": "^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]([a-z0-9-]{0,61}[a-z0-9])?$"
        },
        "kind": {
          "type": "string",
          "enum": [
            "sni",
            "dns",
            "shared_front"
          ]
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "last_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "domain",
        "kind",
        "count",
        "last_at"
      ],
      "additionalProperties": false
    }
  }
}

EgressPolicy

{
  "type": "object",
  "properties": {
    "free_pool_exhausted": {
      "type": "boolean"
    },
    "capped_workspaces": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
      }
    },
    "as_of": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "free_pool_exhausted",
    "capped_workspaces",
    "as_of"
  ]
}

BuildVariableRequest

{
  "type": "object",
  "properties": {
    "value": {
      "type": "string"
    }
  },
  "required": [
    "value"
  ]
}

EnvironmentVariableRequest

{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "runtime",
        "secret"
      ]
    },
    "value": {
      "type": "string"
    }
  },
  "required": [
    "kind",
    "value"
  ]
}

ProductVariable

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/$defs/__schema0"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema1"
        },
        "updated_by": {
          "$ref": "#/$defs/__schema2"
        },
        "kind": {
          "type": "string",
          "const": "build"
        },
        "environment_type": {
          "type": "null"
        },
        "value": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "updated_at",
        "updated_by",
        "kind",
        "environment_type",
        "value"
      ]
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/$defs/__schema0"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema1"
        },
        "updated_by": {
          "$ref": "#/$defs/__schema2"
        },
        "kind": {
          "type": "string",
          "const": "runtime"
        },
        "environment_type": {
          "$ref": "#/$defs/__schema3"
        },
        "value": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "updated_at",
        "updated_by",
        "kind",
        "environment_type",
        "value"
      ]
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/$defs/__schema0"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema1"
        },
        "updated_by": {
          "$ref": "#/$defs/__schema2"
        },
        "kind": {
          "type": "string",
          "const": "secret"
        },
        "environment_type": {
          "$ref": "#/$defs/__schema3"
        },
        "value": {
          "type": "null"
        },
        "set": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "name",
        "updated_at",
        "updated_by",
        "kind",
        "environment_type",
        "value",
        "set"
      ]
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "string"
    },
    "__schema1": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema2": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema3": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    }
  }
}

ProductVariables

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/$defs/__schema0"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema1"
              },
              "updated_by": {
                "$ref": "#/$defs/__schema2"
              },
              "kind": {
                "type": "string",
                "const": "build"
              },
              "environment_type": {
                "type": "null"
              },
              "value": {
                "type": "string"
              },
              "source": {
                "$ref": "#/$defs/__schema3"
              },
              "overridden": {
                "$ref": "#/$defs/__schema4"
              }
            },
            "required": [
              "name",
              "updated_at",
              "updated_by",
              "kind",
              "environment_type",
              "value",
              "source",
              "overridden"
            ]
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/$defs/__schema0"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema1"
              },
              "updated_by": {
                "$ref": "#/$defs/__schema2"
              },
              "kind": {
                "type": "string",
                "const": "runtime"
              },
              "environment_type": {
                "$ref": "#/$defs/__schema5"
              },
              "value": {
                "type": "string"
              },
              "source": {
                "$ref": "#/$defs/__schema3"
              },
              "overridden": {
                "$ref": "#/$defs/__schema4"
              }
            },
            "required": [
              "name",
              "updated_at",
              "updated_by",
              "kind",
              "environment_type",
              "value",
              "source",
              "overridden"
            ]
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/$defs/__schema0"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema1"
              },
              "updated_by": {
                "$ref": "#/$defs/__schema2"
              },
              "kind": {
                "type": "string",
                "const": "secret"
              },
              "environment_type": {
                "$ref": "#/$defs/__schema5"
              },
              "value": {
                "type": "null"
              },
              "set": {
                "type": "boolean",
                "const": true
              },
              "source": {
                "$ref": "#/$defs/__schema3"
              },
              "overridden": {
                "$ref": "#/$defs/__schema4"
              }
            },
            "required": [
              "name",
              "updated_at",
              "updated_by",
              "kind",
              "environment_type",
              "value",
              "set",
              "source",
              "overridden"
            ]
          }
        ]
      }
    },
    "next_cursor": {
      "type": "null"
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string"
    },
    "__schema1": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema2": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema3": {
      "type": "string",
      "enum": [
        "product",
        "app"
      ]
    },
    "__schema4": {
      "type": "boolean"
    },
    "__schema5": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    }
  }
}

ProductBuildVariables

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/$defs/__schema0"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema1"
              },
              "updated_by": {
                "$ref": "#/$defs/__schema2"
              },
              "kind": {
                "type": "string",
                "const": "build"
              },
              "environment_type": {
                "type": "null"
              },
              "value": {
                "type": "string"
              },
              "source": {
                "$ref": "#/$defs/__schema3"
              },
              "overridden": {
                "$ref": "#/$defs/__schema4"
              }
            },
            "required": [
              "name",
              "updated_at",
              "updated_by",
              "kind",
              "environment_type",
              "value",
              "source",
              "overridden"
            ]
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/$defs/__schema0"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema1"
              },
              "updated_by": {
                "$ref": "#/$defs/__schema2"
              },
              "kind": {
                "type": "string",
                "const": "runtime"
              },
              "environment_type": {
                "$ref": "#/$defs/__schema5"
              },
              "value": {
                "type": "string"
              },
              "source": {
                "$ref": "#/$defs/__schema3"
              },
              "overridden": {
                "$ref": "#/$defs/__schema4"
              }
            },
            "required": [
              "name",
              "updated_at",
              "updated_by",
              "kind",
              "environment_type",
              "value",
              "source",
              "overridden"
            ]
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/$defs/__schema0"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema1"
              },
              "updated_by": {
                "$ref": "#/$defs/__schema2"
              },
              "kind": {
                "type": "string",
                "const": "secret"
              },
              "environment_type": {
                "$ref": "#/$defs/__schema5"
              },
              "value": {
                "type": "null"
              },
              "set": {
                "type": "boolean",
                "const": true
              },
              "source": {
                "$ref": "#/$defs/__schema3"
              },
              "overridden": {
                "$ref": "#/$defs/__schema4"
              }
            },
            "required": [
              "name",
              "updated_at",
              "updated_by",
              "kind",
              "environment_type",
              "value",
              "set",
              "source",
              "overridden"
            ]
          }
        ]
      }
    },
    "next_cursor": {
      "type": "null"
    },
    "build_variables_hash": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "items",
    "next_cursor",
    "build_variables_hash"
  ],
  "$defs": {
    "__schema0": {
      "type": "string"
    },
    "__schema1": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema2": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema3": {
      "type": "string",
      "enum": [
        "product",
        "app"
      ]
    },
    "__schema4": {
      "type": "boolean"
    },
    "__schema5": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    }
  }
}

ProductVariableListItem

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/$defs/__schema0"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema1"
        },
        "updated_by": {
          "$ref": "#/$defs/__schema2"
        },
        "kind": {
          "type": "string",
          "const": "build"
        },
        "environment_type": {
          "type": "null"
        },
        "value": {
          "type": "string"
        },
        "source": {
          "$ref": "#/$defs/__schema3"
        },
        "overridden": {
          "$ref": "#/$defs/__schema4"
        }
      },
      "required": [
        "name",
        "updated_at",
        "updated_by",
        "kind",
        "environment_type",
        "value",
        "source",
        "overridden"
      ]
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/$defs/__schema0"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema1"
        },
        "updated_by": {
          "$ref": "#/$defs/__schema2"
        },
        "kind": {
          "type": "string",
          "const": "runtime"
        },
        "environment_type": {
          "$ref": "#/$defs/__schema5"
        },
        "value": {
          "type": "string"
        },
        "source": {
          "$ref": "#/$defs/__schema3"
        },
        "overridden": {
          "$ref": "#/$defs/__schema4"
        }
      },
      "required": [
        "name",
        "updated_at",
        "updated_by",
        "kind",
        "environment_type",
        "value",
        "source",
        "overridden"
      ]
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/$defs/__schema0"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema1"
        },
        "updated_by": {
          "$ref": "#/$defs/__schema2"
        },
        "kind": {
          "type": "string",
          "const": "secret"
        },
        "environment_type": {
          "$ref": "#/$defs/__schema5"
        },
        "value": {
          "type": "null"
        },
        "set": {
          "type": "boolean",
          "const": true
        },
        "source": {
          "$ref": "#/$defs/__schema3"
        },
        "overridden": {
          "$ref": "#/$defs/__schema4"
        }
      },
      "required": [
        "name",
        "updated_at",
        "updated_by",
        "kind",
        "environment_type",
        "value",
        "set",
        "source",
        "overridden"
      ]
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "string"
    },
    "__schema1": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema2": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema3": {
      "type": "string",
      "enum": [
        "product",
        "app"
      ]
    },
    "__schema4": {
      "type": "boolean"
    },
    "__schema5": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    }
  }
}

AppBuildVariableRequest

{
  "type": "object",
  "properties": {
    "value": {
      "type": "string"
    },
    "applies_to": {
      "anyOf": [
        {
          "type": "string",
          "const": "all"
        },
        {
          "minItems": 1,
          "maxItems": 100,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  },
  "required": [
    "value"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  }
}

AppEnvironmentVariableRequest

{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "runtime",
        "secret"
      ]
    },
    "value": {
      "type": "string"
    },
    "applies_to": {
      "anyOf": [
        {
          "type": "string",
          "const": "all"
        },
        {
          "minItems": 1,
          "maxItems": 100,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  },
  "required": [
    "kind",
    "value"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  }
}

AppVariable

{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/$defs/__schema0"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema1"
        },
        "updated_by": {
          "$ref": "#/$defs/__schema2"
        },
        "kind": {
          "type": "string",
          "const": "build"
        },
        "environment_type": {
          "type": "null"
        },
        "value": {
          "type": "string"
        },
        "applies_to": {
          "$ref": "#/$defs/__schema3"
        }
      },
      "required": [
        "name",
        "updated_at",
        "updated_by",
        "kind",
        "environment_type",
        "value",
        "applies_to"
      ]
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/$defs/__schema0"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema1"
        },
        "updated_by": {
          "$ref": "#/$defs/__schema2"
        },
        "kind": {
          "type": "string",
          "const": "runtime"
        },
        "environment_type": {
          "$ref": "#/$defs/__schema4"
        },
        "value": {
          "type": "string"
        },
        "applies_to": {
          "$ref": "#/$defs/__schema3"
        }
      },
      "required": [
        "name",
        "updated_at",
        "updated_by",
        "kind",
        "environment_type",
        "value",
        "applies_to"
      ]
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "$ref": "#/$defs/__schema0"
        },
        "updated_at": {
          "$ref": "#/$defs/__schema1"
        },
        "updated_by": {
          "$ref": "#/$defs/__schema2"
        },
        "kind": {
          "type": "string",
          "const": "secret"
        },
        "environment_type": {
          "$ref": "#/$defs/__schema4"
        },
        "value": {
          "type": "null"
        },
        "set": {
          "type": "boolean",
          "const": true
        },
        "applies_to": {
          "$ref": "#/$defs/__schema3"
        }
      },
      "required": [
        "name",
        "updated_at",
        "updated_by",
        "kind",
        "environment_type",
        "value",
        "set",
        "applies_to"
      ]
    }
  ],
  "$defs": {
    "__schema0": {
      "type": "string"
    },
    "__schema1": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema2": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema3": {
      "anyOf": [
        {
          "type": "string",
          "const": "all"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          }
        }
      ]
    },
    "__schema4": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    }
  }
}

AppVariables

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/$defs/__schema0"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema1"
              },
              "updated_by": {
                "$ref": "#/$defs/__schema2"
              },
              "kind": {
                "type": "string",
                "const": "build"
              },
              "environment_type": {
                "type": "null"
              },
              "value": {
                "type": "string"
              },
              "applies_to": {
                "$ref": "#/$defs/__schema3"
              }
            },
            "required": [
              "name",
              "updated_at",
              "updated_by",
              "kind",
              "environment_type",
              "value",
              "applies_to"
            ]
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/$defs/__schema0"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema1"
              },
              "updated_by": {
                "$ref": "#/$defs/__schema2"
              },
              "kind": {
                "type": "string",
                "const": "runtime"
              },
              "environment_type": {
                "$ref": "#/$defs/__schema4"
              },
              "value": {
                "type": "string"
              },
              "applies_to": {
                "$ref": "#/$defs/__schema3"
              }
            },
            "required": [
              "name",
              "updated_at",
              "updated_by",
              "kind",
              "environment_type",
              "value",
              "applies_to"
            ]
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "$ref": "#/$defs/__schema0"
              },
              "updated_at": {
                "$ref": "#/$defs/__schema1"
              },
              "updated_by": {
                "$ref": "#/$defs/__schema2"
              },
              "kind": {
                "type": "string",
                "const": "secret"
              },
              "environment_type": {
                "$ref": "#/$defs/__schema4"
              },
              "value": {
                "type": "null"
              },
              "set": {
                "type": "boolean",
                "const": true
              },
              "applies_to": {
                "$ref": "#/$defs/__schema3"
              }
            },
            "required": [
              "name",
              "updated_at",
              "updated_by",
              "kind",
              "environment_type",
              "value",
              "set",
              "applies_to"
            ]
          }
        ]
      }
    },
    "next_cursor": {
      "type": "null"
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string"
    },
    "__schema1": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "__schema2": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema3": {
      "anyOf": [
        {
          "type": "string",
          "const": "all"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          }
        }
      ]
    },
    "__schema4": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    }
  }
}

WorkspaceMember

{
  "type": "object",
  "properties": {
    "account_id": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_role": {
      "type": "string",
      "enum": [
        "owner",
        "admin",
        "developer"
      ]
    },
    "joined_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "email": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "account_id",
    "workspace_role",
    "joined_at",
    "email"
  ]
}

WorkspaceMembers

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "developer"
            ]
          },
          "joined_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "account_id",
          "workspace_role",
          "joined_at",
          "email"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

MemberRoleRequest

{
  "type": "object",
  "properties": {
    "role": {
      "type": "string",
      "enum": [
        "owner",
        "admin",
        "developer"
      ]
    }
  },
  "required": [
    "role"
  ]
}

MemberInvitation

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^minv_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "email": {
      "type": "string"
    },
    "role": {
      "type": "string",
      "enum": [
        "owner",
        "admin",
        "developer"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "id",
    "email",
    "role",
    "created_at",
    "expires_at"
  ]
}

MemberInvitations

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^minv_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "developer"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "email",
          "role",
          "created_at",
          "expires_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

MemberInvitationRequest

{
  "type": "object",
  "properties": {
    "email": {
      "type": "string"
    },
    "role": {
      "type": "string",
      "enum": [
        "owner",
        "admin",
        "developer"
      ]
    }
  },
  "required": [
    "email",
    "role"
  ]
}

AccountInvitations

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^minv_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "developer"
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "role",
          "expires_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

CapabilityCatalog

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "capability": {
            "type": "string",
            "enum": [
              "ai.generate",
              "storage.object",
              "data.kv",
              "email.send"
            ]
          },
          "credential_owner": {
            "type": "string",
            "enum": [
              "workspace",
              "platform"
            ]
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "usage_unit": {
            "type": "string",
            "enum": [
              "tokens",
              "bytes",
              "calls"
            ]
          }
        },
        "required": [
          "capability",
          "credential_owner",
          "actions",
          "usage_unit"
        ]
      }
    }
  },
  "required": [
    "items"
  ]
}

PendingOperation

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^pend_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "purpose": {
      "type": "string",
      "enum": [
        "spending_approval",
        "consent",
        "input_required",
        "admin_decision"
      ]
    },
    "product_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "app_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "approved",
        "rejected",
        "withdrawn",
        "expired",
        "superseded"
      ]
    },
    "usage_category": {
      "type": [
        "string",
        "null"
      ]
    },
    "estimated_units": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "$ref": "#/$defs/__schema0"
    },
    "expires_at": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema0"
        },
        {
          "type": "null"
        }
      ]
    },
    "decided_by": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "decided_at": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema0"
        },
        {
          "type": "null"
        }
      ]
    },
    "reason": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "purpose",
    "status",
    "usage_category",
    "estimated_units",
    "created_at",
    "expires_at",
    "decided_by",
    "decided_at",
    "reason"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

PendingOperations

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^pend_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "purpose": {
            "type": "string",
            "enum": [
              "spending_approval",
              "consent",
              "input_required",
              "admin_decision"
            ]
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "app_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^app_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected",
              "withdrawn",
              "expired",
              "superseded"
            ]
          },
          "usage_category": {
            "type": [
              "string",
              "null"
            ]
          },
          "estimated_units": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/$defs/__schema0"
          },
          "expires_at": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "decided_by": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "decided_at": {
            "anyOf": [
              {
                "$ref": "#/$defs/__schema0"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "purpose",
          "status",
          "usage_category",
          "estimated_units",
          "created_at",
          "expires_at",
          "decided_by",
          "decided_at",
          "reason"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ],
  "$defs": {
    "__schema0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}

PendingDecision

{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    }
  }
}

InboundWebhookCreate

{
  "type": "object",
  "properties": {
    "path": {
      "$ref": "#/$defs/__schema0"
    },
    "format": {
      "$ref": "#/$defs/__schema1"
    },
    "secret": {
      "$ref": "#/$defs/__schema2"
    }
  },
  "required": [
    "path",
    "format"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "string"
    },
    "__schema1": {
      "type": "string",
      "enum": [
        "github",
        "standard_webhooks"
      ]
    },
    "__schema2": {}
  }
}

InboundWebhook

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_type": {
      "type": "string",
      "const": "staging"
    },
    "path": {
      "type": "string"
    },
    "format": {
      "type": "string",
      "enum": [
        "github",
        "standard_webhooks"
      ]
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "state": {
      "type": "string",
      "const": "active"
    },
    "created_by": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "id",
    "product_id",
    "environment_type",
    "path",
    "format",
    "url",
    "state",
    "created_by",
    "created_at"
  ]
}

InboundWebhookCreated

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_type": {
      "type": "string",
      "const": "staging"
    },
    "path": {
      "type": "string"
    },
    "format": {
      "type": "string",
      "enum": [
        "github",
        "standard_webhooks"
      ]
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "state": {
      "type": "string",
      "const": "active"
    },
    "created_by": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "secret": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "product_id",
    "environment_type",
    "path",
    "format",
    "url",
    "state",
    "created_by",
    "created_at"
  ]
}

InboundWebhooks

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "environment_type": {
            "type": "string",
            "const": "staging"
          },
          "path": {
            "type": "string"
          },
          "format": {
            "type": "string",
            "enum": [
              "github",
              "standard_webhooks"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "state": {
            "type": "string",
            "const": "active"
          },
          "created_by": {
            "type": "string",
            "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "product_id",
          "environment_type",
          "path",
          "format",
          "url",
          "state",
          "created_by",
          "created_at"
        ]
      }
    },
    "next_cursor": {
      "type": "null"
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

InboundWebhookDelivery

{
  "type": "object",
  "properties": {
    "webhook_id": {
      "type": "string",
      "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "delivery_key": {
      "type": "string"
    },
    "sender_delivery_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "outcome": {
      "type": "string",
      "enum": [
        "forwarding",
        "succeeded",
        "failed",
        "timed_out",
        "platform_unavailable",
        "app_unavailable",
        "product_closed",
        "no_deployment",
        "interrupted"
      ]
    },
    "http_status": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 100,
          "maximum": 599
        },
        {
          "type": "null"
        }
      ]
    },
    "reason_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "deployment_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "correlation_id": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "attempts": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "received_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "finished_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "duration_ms": {
      "type": [
        "number",
        "null"
      ]
    }
  },
  "required": [
    "webhook_id",
    "delivery_key",
    "sender_delivery_id",
    "outcome",
    "http_status",
    "reason_code",
    "deployment_id",
    "correlation_id",
    "attempts",
    "received_at",
    "updated_at",
    "finished_at",
    "duration_ms"
  ]
}

InboundWebhookDeliveries

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "webhook_id": {
            "type": "string",
            "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "delivery_key": {
            "type": "string"
          },
          "sender_delivery_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "forwarding",
              "succeeded",
              "failed",
              "timed_out",
              "platform_unavailable",
              "app_unavailable",
              "product_closed",
              "no_deployment",
              "interrupted"
            ]
          },
          "http_status": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 100,
                "maximum": 599
              },
              {
                "type": "null"
              }
            ]
          },
          "reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "deployment_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "correlation_id": {
            "type": "string",
            "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "attempts": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "received_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_ms": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "webhook_id",
          "delivery_key",
          "sender_delivery_id",
          "outcome",
          "http_status",
          "reason_code",
          "deployment_id",
          "correlation_id",
          "attempts",
          "received_at",
          "updated_at",
          "finished_at",
          "duration_ms"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

InboundWebhookAcknowledged

{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "const": true
    },
    "duplicate": {
      "type": "boolean",
      "const": true
    }
  },
  "required": [
    "received"
  ]
}

AutoDeployCreate

{
  "type": "object",
  "properties": {
    "ref": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "credential_id": {
      "type": "string",
      "pattern": "^cred_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  }
}

AutoDeployHook

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^hook_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "repo_url": {
      "type": "string"
    },
    "source": {
      "default": "webhook",
      "type": "string",
      "enum": [
        "webhook",
        "github_app"
      ]
    },
    "ref": {
      "type": "string"
    },
    "state": {
      "type": "string",
      "enum": [
        "enabled",
        "disabled"
      ]
    },
    "enabled_by": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "id",
    "product_id",
    "url",
    "repo_url",
    "ref",
    "state",
    "enabled_by",
    "created_at"
  ]
}

AutoDeployEnabled

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^hook_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "repo_url": {
      "type": "string"
    },
    "source": {
      "default": "webhook",
      "type": "string",
      "enum": [
        "webhook",
        "github_app"
      ]
    },
    "ref": {
      "type": "string"
    },
    "state": {
      "type": "string",
      "enum": [
        "enabled",
        "disabled"
      ]
    },
    "enabled_by": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "secret": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "product_id",
    "url",
    "repo_url",
    "ref",
    "state",
    "enabled_by",
    "created_at",
    "secret"
  ]
}

AutoDeployDelivery

{
  "type": "object",
  "properties": {
    "workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    },
    "hook_id": {
      "type": "string",
      "pattern": "^hook_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "delivery_id": {
      "type": "string"
    },
    "event": {
      "type": "string",
      "const": "push"
    },
    "pushed_sha": {
      "type": [
        "string",
        "null"
      ]
    },
    "outcome": {
      "type": "string",
      "enum": [
        "ignored",
        "enabler_not_authorized",
        "product_closed",
        "freezing",
        "conflict",
        "not_found",
        "run_created",
        "freeze_failed",
        "disabled_before_run",
        "run_rejected"
      ]
    },
    "reason_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "source_freeze_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^frz_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "frozen_sha": {
      "type": [
        "string",
        "null"
      ]
    },
    "mainline_run_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^mrun_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "received_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "workspace_id",
    "hook_id",
    "delivery_id",
    "event",
    "pushed_sha",
    "outcome",
    "reason_code",
    "source_freeze_id",
    "frozen_sha",
    "mainline_run_id",
    "received_at",
    "updated_at"
  ]
}

AutoDeployDeliveries

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "workspace_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "string",
                "const": "ws_platform"
              }
            ]
          },
          "hook_id": {
            "type": "string",
            "pattern": "^hook_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "delivery_id": {
            "type": "string"
          },
          "event": {
            "type": "string",
            "const": "push"
          },
          "pushed_sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "ignored",
              "enabler_not_authorized",
              "product_closed",
              "freezing",
              "conflict",
              "not_found",
              "run_created",
              "freeze_failed",
              "disabled_before_run",
              "run_rejected"
            ]
          },
          "reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_freeze_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^frz_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "frozen_sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "mainline_run_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^mrun_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "received_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "workspace_id",
          "hook_id",
          "delivery_id",
          "event",
          "pushed_sha",
          "outcome",
          "reason_code",
          "source_freeze_id",
          "frozen_sha",
          "mainline_run_id",
          "received_at",
          "updated_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

AutoDeployAcknowledged

{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "const": true
    }
  },
  "required": [
    "received"
  ]
}

AutoDeployWebhookResponse

{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "workspace_id": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            {
              "type": "string",
              "const": "ws_platform"
            }
          ]
        },
        "hook_id": {
          "type": "string",
          "pattern": "^hook_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        "delivery_id": {
          "type": "string"
        },
        "event": {
          "type": "string",
          "const": "push"
        },
        "pushed_sha": {
          "type": [
            "string",
            "null"
          ]
        },
        "outcome": {
          "type": "string",
          "enum": [
            "ignored",
            "enabler_not_authorized",
            "product_closed",
            "freezing",
            "conflict",
            "not_found",
            "run_created",
            "freeze_failed",
            "disabled_before_run",
            "run_rejected"
          ]
        },
        "reason_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_freeze_id": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^frz_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "frozen_sha": {
          "type": [
            "string",
            "null"
          ]
        },
        "mainline_run_id": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^mrun_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "received_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "required": [
        "workspace_id",
        "hook_id",
        "delivery_id",
        "event",
        "pushed_sha",
        "outcome",
        "reason_code",
        "source_freeze_id",
        "frozen_sha",
        "mainline_run_id",
        "received_at",
        "updated_at"
      ]
    },
    {
      "type": "object",
      "properties": {
        "received": {
          "type": "boolean",
          "const": true
        }
      },
      "required": [
        "received"
      ]
    }
  ]
}

Schedule

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_type": {
      "type": "string",
      "const": "staging"
    },
    "path": {
      "type": "string"
    },
    "cron": {
      "type": "string"
    },
    "state": {
      "type": "string",
      "const": "active"
    },
    "deployment_id": {
      "type": "string",
      "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "next_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_run": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "schedule_id": {
              "type": "string",
              "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "scheduled_for": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "outcome": {
              "type": "string",
              "enum": [
                "dispatching",
                "succeeded",
                "failed",
                "timed_out",
                "platform_unavailable",
                "app_unavailable",
                "interrupted",
                "product_closed"
              ]
            },
            "http_status": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "correlation_id": {
              "type": "string",
              "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            },
            "dispatched_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
            },
            "finished_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "duration_ms": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "schedule_id",
            "scheduled_for",
            "outcome",
            "http_status",
            "reason_code",
            "correlation_id",
            "dispatched_at",
            "finished_at",
            "duration_ms"
          ]
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "id",
    "product_id",
    "environment_type",
    "path",
    "cron",
    "state",
    "deployment_id",
    "revision_id",
    "next_run_at",
    "last_run"
  ]
}

Schedules

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "environment_type": {
            "type": "string",
            "const": "staging"
          },
          "path": {
            "type": "string"
          },
          "cron": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "const": "active"
          },
          "deployment_id": {
            "type": "string",
            "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "revision_id": {
            "type": "string",
            "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "next_run_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_run": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "schedule_id": {
                    "type": "string",
                    "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  "scheduled_for": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "dispatching",
                      "succeeded",
                      "failed",
                      "timed_out",
                      "platform_unavailable",
                      "app_unavailable",
                      "interrupted",
                      "product_closed"
                    ]
                  },
                  "http_status": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reason_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "correlation_id": {
                    "type": "string",
                    "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
                  },
                  "dispatched_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "finished_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "duration_ms": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "schedule_id",
                  "scheduled_for",
                  "outcome",
                  "http_status",
                  "reason_code",
                  "correlation_id",
                  "dispatched_at",
                  "finished_at",
                  "duration_ms"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "product_id",
          "environment_type",
          "path",
          "cron",
          "state",
          "deployment_id",
          "revision_id",
          "next_run_at",
          "last_run"
        ]
      }
    },
    "next_cursor": {
      "type": "null"
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

ScheduleRun

{
  "type": "object",
  "properties": {
    "schedule_id": {
      "type": "string",
      "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "scheduled_for": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "outcome": {
      "type": "string",
      "enum": [
        "dispatching",
        "succeeded",
        "failed",
        "timed_out",
        "platform_unavailable",
        "app_unavailable",
        "interrupted",
        "product_closed"
      ]
    },
    "http_status": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "reason_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "correlation_id": {
      "type": "string",
      "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "dispatched_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "finished_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "duration_ms": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schedule_id",
    "scheduled_for",
    "outcome",
    "http_status",
    "reason_code",
    "correlation_id",
    "dispatched_at",
    "finished_at",
    "duration_ms"
  ]
}

ScheduleRuns

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "schedule_id": {
            "type": "string",
            "pattern": "^trg_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "scheduled_for": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "dispatching",
              "succeeded",
              "failed",
              "timed_out",
              "platform_unavailable",
              "app_unavailable",
              "interrupted",
              "product_closed"
            ]
          },
          "http_status": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "correlation_id": {
            "type": "string",
            "pattern": "^evt_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "dispatched_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "schedule_id",
          "scheduled_for",
          "outcome",
          "http_status",
          "reason_code",
          "correlation_id",
          "dispatched_at",
          "finished_at",
          "duration_ms"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

KvHistory

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "history_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "change": {
            "type": "string",
            "enum": [
              "overwritten",
              "deleted",
              "expired"
            ]
          },
          "recorded_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "history_id",
          "version",
          "change",
          "recorded_at",
          "size_bytes"
        ]
      }
    }
  },
  "required": [
    "items"
  ]
}

KvRestoreRequest

{
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "history_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "key",
    "history_id"
  ]
}

KvRestored

{
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "version": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "key",
    "version"
  ]
}

ManagedResourceRequest

{
  "type": "object",
  "properties": {
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_type": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    },
    "kind": {
      "type": "string",
      "const": "kv"
    }
  },
  "required": [
    "product_id",
    "environment_type",
    "kind"
  ]
}

ManagedResource

{
  "type": "object",
  "properties": {
    "resource_id": {
      "type": "string",
      "pattern": "^mres_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "string",
          "const": "ws_platform"
        }
      ]
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "environment_type": {
      "type": "string",
      "enum": [
        "preview",
        "staging",
        "production"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "kv"
      ]
    },
    "provision_model": {
      "type": "string",
      "enum": [
        "platform_pool",
        "provider_backed"
      ]
    },
    "handle_mode": {
      "type": "string",
      "enum": [
        "capability",
        "injected"
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "requested",
        "provisioning",
        "ready",
        "failed",
        "detached",
        "deleted"
      ]
    },
    "detached_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "retention_due_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "resource_id",
    "workspace_id",
    "product_id",
    "environment_type",
    "kind",
    "provision_model",
    "handle_mode",
    "state",
    "detached_at",
    "retention_due_at",
    "created_at",
    "updated_at"
  ]
}

ManagedResources

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "resource_id": {
            "type": "string",
            "pattern": "^mres_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "string",
                "const": "ws_platform"
              }
            ]
          },
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "environment_type": {
            "type": "string",
            "enum": [
              "preview",
              "staging",
              "production"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "kv"
            ]
          },
          "provision_model": {
            "type": "string",
            "enum": [
              "platform_pool",
              "provider_backed"
            ]
          },
          "handle_mode": {
            "type": "string",
            "enum": [
              "capability",
              "injected"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "requested",
              "provisioning",
              "ready",
              "failed",
              "detached",
              "deleted"
            ]
          },
          "detached_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "retention_due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "resource_id",
          "workspace_id",
          "product_id",
          "environment_type",
          "kind",
          "provision_model",
          "handle_mode",
          "state",
          "detached_at",
          "retention_due_at",
          "created_at",
          "updated_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

MainlineRun

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^mrun_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "input_revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "requested_by": {
      "type": "string",
      "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "trigger": {
      "type": "string",
      "enum": [
        "manual",
        "push"
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "running",
        "stopped",
        "completed",
        "superseded",
        "cancelled"
      ]
    },
    "step": {
      "type": "string",
      "enum": [
        "descriptor",
        "qualification",
        "release",
        "deployment",
        "surface"
      ]
    },
    "step_status": {
      "type": "string"
    },
    "reason_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "pipeline_run_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "revision_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "release_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^rel_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "deployment_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "surface_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "superseded_by_run_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^mrun_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "cancelled_by": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "product_id",
    "input_revision_id",
    "requested_by",
    "trigger",
    "state",
    "step",
    "step_status",
    "reason_code",
    "pipeline_run_id",
    "revision_id",
    "release_id",
    "deployment_id",
    "surface_id",
    "superseded_by_run_id",
    "cancelled_by",
    "created_at",
    "updated_at"
  ]
}

MainlineRuns

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^mrun_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^ws_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "product_id": {
            "type": "string",
            "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "input_revision_id": {
            "type": "string",
            "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "requested_by": {
            "type": "string",
            "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
          },
          "trigger": {
            "type": "string",
            "enum": [
              "manual",
              "push"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "running",
              "stopped",
              "completed",
              "superseded",
              "cancelled"
            ]
          },
          "step": {
            "type": "string",
            "enum": [
              "descriptor",
              "qualification",
              "release",
              "deployment",
              "surface"
            ]
          },
          "step_status": {
            "type": "string"
          },
          "reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "pipeline_run_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^pipe_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "release_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^rel_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "deployment_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^dep_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "surface_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^srf_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "superseded_by_run_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^mrun_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelled_by": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^usr_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "product_id",
          "input_revision_id",
          "requested_by",
          "trigger",
          "state",
          "step",
          "step_status",
          "reason_code",
          "pipeline_run_id",
          "revision_id",
          "release_id",
          "deployment_id",
          "surface_id",
          "superseded_by_run_id",
          "cancelled_by",
          "created_at",
          "updated_at"
        ]
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "next_cursor"
  ]
}

MainlineRunCreate

{
  "type": "object",
  "properties": {
    "product_id": {
      "type": "string",
      "pattern": "^prod_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "input_revision_id": {
      "type": "string",
      "pattern": "^rev_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    }
  },
  "required": [
    "product_id",
    "input_revision_id"
  ]
}

MainlineRunAction

{
  "type": "object",
  "properties": {}
}

Closure

{
  "type": "object",
  "properties": {
    "closure_kind": {
      "type": "string",
      "enum": [
        "product_retire",
        "account_close",
        "workspace_close"
      ]
    },
    "grace_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "active",
        "closure_pending",
        "retired",
        "closed"
      ]
    }
  },
  "required": [
    "closure_kind",
    "grace_until",
    "state"
  ]
}