{
  "openapi": "3.0.3",
  "info": {
    "title": "OpsPilot selected API reference",
    "version": "2026-11-10",
    "description": "A verified selection of read-only OpsPilot endpoints, not the complete platform API. Use your deployment API origin. Availability depends on permissions and deployment configuration."
  },
  "servers": [
    {
      "url": "https://api.opspilot.us/api/v1",
      "description": "Hosted API example; replace with your deployment URL."
    }
  ],
  "security": [
    {
      "APIKey": []
    },
    {
      "BearerToken": []
    }
  ],
  "paths": {
    "/jobs": {
      "get": {
        "summary": "List service jobs",
        "description": "Requires the job:read permission and access to the resource workspace.",
        "responses": {
          "200": {
            "description": "Request succeeded. Response fields vary by endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "pageSize": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, expired, revoked, or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission or workspace access."
          },
          "429": {
            "description": "Rate limited. Honor Retry-After."
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/jobs/{id}": {
      "get": {
        "summary": "Read one service job",
        "description": "Requires the job:read permission and access to the resource workspace.",
        "responses": {
          "200": {
            "description": "Request succeeded. Response fields vary by endpoint."
          },
          "401": {
            "description": "Missing, expired, revoked, or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission or workspace access."
          },
          "429": {
            "description": "Rate limited. Honor Retry-After."
          },
          "404": {
            "description": "Resource not found in this workspace."
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/jobs/summary": {
      "get": {
        "summary": "Read service job summary",
        "description": "Requires the job:read permission and access to the resource workspace.",
        "responses": {
          "200": {
            "description": "Request succeeded. Response fields vary by endpoint."
          },
          "401": {
            "description": "Missing, expired, revoked, or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission or workspace access."
          },
          "429": {
            "description": "Rate limited. Honor Retry-After."
          }
        }
      }
    },
    "/webhooks/events": {
      "get": {
        "summary": "Read the supported event catalog",
        "description": "Requires the webhook:read permission and access to the resource workspace.",
        "responses": {
          "200": {
            "description": "Request succeeded. Response fields vary by endpoint."
          },
          "401": {
            "description": "Missing, expired, revoked, or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission or workspace access."
          },
          "429": {
            "description": "Rate limited. Honor Retry-After."
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "summary": "List outbound webhook subscriptions",
        "description": "Requires the webhook:read permission and access to the resource workspace.",
        "responses": {
          "200": {
            "description": "Request succeeded. Response fields vary by endpoint."
          },
          "401": {
            "description": "Missing, expired, revoked, or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission or workspace access."
          },
          "429": {
            "description": "Rate limited. Honor Retry-After."
          }
        }
      }
    },
    "/webhooks/{id}/deliveries": {
      "get": {
        "summary": "Read delivery history for a webhook",
        "description": "Requires the webhook:read permission and access to the resource workspace.",
        "responses": {
          "200": {
            "description": "Request succeeded. Response fields vary by endpoint."
          },
          "401": {
            "description": "Missing, expired, revoked, or invalid authentication."
          },
          "403": {
            "description": "Insufficient permission or workspace access."
          },
          "429": {
            "description": "Rate limited. Honor Retry-After."
          },
          "404": {
            "description": "Resource not found in this workspace."
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "APIKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "BearerToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Session JWT or an OpsPilot API key accepted by the deployment."
      }
    }
  }
}
