{
  "openapi": "3.1.0",
  "info": {
    "title": "Unofficial concept: Sentry connector for Meta Muse",
    "version": "0.1.0",
    "summary": "Unofficial concept — not an official Sentry or Meta product.",
    "description": "Unofficial concept. Not affiliated with, endorsed by, or published by Sentry or Meta. This is an independent interpretation of how a Sentry connector for Muse could look.\n\nCurated on-call REST surface so Muse can list, inspect, and lightly triage Sentry issues.\n\nNot the full Sentry API. Not Sentry MCP. Not a Meta-reviewed directory connector.\n\nQuestions: Barnir <barnir@agentmail.to>. Personal contact for this unofficial sketch, not Sentry or Meta support.",
    "contact": {
      "name": "Barnir",
      "email": "barnir@agentmail.to",
      "x-note": "Personal contact for this unofficial concept. Not a Sentry or Meta support channel."
    },
    "x-unofficial-concept": true,
    "x-disclaimer": "Unofficial concept. Not affiliated with, endorsed by, or published by Sentry or Meta. This is an independent interpretation of how a Sentry connector for Muse could look.",
    "x-contact-email": "barnir@agentmail.to"
  },
  "servers": [
    {
      "url": "https://unofficial-sentry-muse-connector.vercel.app",
      "description": "Unofficial concept deployment. Not an official Sentry or Meta host."
    }
  ],
  "tags": [
    {
      "name": "Unofficial concept",
      "description": "Unofficial concept. Not affiliated with, endorsed by, or published by Sentry or Meta. This is an independent interpretation of how a Sentry connector for Muse could look."
    }
  ],
  "components": {
    "securitySchemes": {
      "sentryBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Sentry User Auth Token. This unofficial concept forwards the token and does not store it. Not minted by Muse or this app."
      }
    },
    "parameters": {
      "SentryHost": {
        "in": "header",
        "name": "X-Sentry-Host",
        "required": false,
        "description": "Unofficial concept region override. Allowed: sentry.io, us.sentry.io, de.sentry.io. Arbitrary hosts are rejected (SSRF).",
        "schema": {
          "type": "string",
          "enum": [
            "sentry.io",
            "us.sentry.io",
            "de.sentry.io"
          ],
          "default": "sentry.io"
        }
      }
    }
  },
  "security": [
    {
      "sentryBearer": []
    }
  ],
  "paths": {
    "/api/v1": {
      "get": {
        "tags": [
          "Unofficial concept"
        ],
        "summary": "Discovery document for this unofficial concept",
        "security": [],
        "responses": {
          "200": {
            "description": "Always includes unofficialConcept and disclaimer."
          }
        }
      }
    },
    "/api/v1/me": {
      "get": {
        "tags": [
          "Unofficial concept"
        ],
        "summary": "Who the Bearer token is (unofficial concept)",
        "description": "Read-only. Returns the Sentry user and organizations. Not an official Sentry identity product.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SentryHost"
          }
        ],
        "responses": {
          "200": {
            "description": "User + orgs with disclaimer envelope."
          },
          "401": {
            "description": "Missing Bearer token."
          }
        }
      }
    },
    "/api/v1/issues": {
      "get": {
        "tags": [
          "Unofficial concept"
        ],
        "summary": "List issues (unofficial on-call slice)",
        "description": "Read-only Sentry issue search. Pass organization slug from /api/v1/me. query uses Sentry search syntax (e.g. is:unresolved assigned:me).",
        "parameters": [
          {
            "$ref": "#/components/parameters/SentryHost"
          },
          {
            "in": "query",
            "name": "organization",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Sentry organization slug."
          },
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sentry search query. Omit for Sentry's default is:unresolved."
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "statsPeriod",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "24h",
                "14d"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Summarized issues plus disclaimer."
          },
          "400": {
            "description": "Missing organization."
          }
        }
      }
    },
    "/api/v1/issues/{id}": {
      "get": {
        "tags": [
          "Unofficial concept"
        ],
        "summary": "Get one issue (unofficial concept)",
        "parameters": [
          {
            "$ref": "#/components/parameters/SentryHost"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Numeric Sentry issue id."
          }
        ],
        "responses": {
          "200": {
            "description": "Summarized issue plus disclaimer."
          }
        }
      },
      "patch": {
        "tags": [
          "Unofficial concept"
        ],
        "summary": "Light triage write (unofficial concept, mutating)",
        "description": "MUTATING. Forwards to Sentry PUT /api/0/issues/{id}/. Only status and assignedTo. Ask the user first. Not official Sentry admin.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SentryHost"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "resolved",
                      "unresolved",
                      "ignored"
                    ]
                  },
                  "assignedTo": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Username, \"me\", or null to unassign."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated summarized issue plus disclaimer."
          },
          "400": {
            "description": "Invalid body."
          }
        }
      }
    },
    "/api/v1/issues/{id}/latest-event": {
      "get": {
        "tags": [
          "Unofficial concept"
        ],
        "summary": "Truncated latest event (unofficial concept)",
        "description": "Read-only. Returns a short stack and message only — no breadcrumbs, request bodies, or PII blobs.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SentryHost"
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Truncated event plus disclaimer."
          }
        }
      }
    }
  }
}