{
  "openapi": "3.1.0",
  "info": {
    "title": "Metrics Collector Backend Example OpenAPI Example",
    "version": "1.0.0",
    "description": "Illustrative OpenAPI contract for a Spala-style backend handoff. Not a live API and not generated runtime code."
  },
  "servers": [
    {
      "url": "https://example-project-api.spala.example",
      "description": "Placeholder API base URL. Replace with the published Spala project API base URL."
    }
  ],
  "tags": [
    {
      "name": "metrics-collector",
      "description": "A public example of the backend contract Spala can help create for metrics ingestion: events, dashboards, alerts, incidents, auth, API keys, and docs."
    }
  ],
  "paths": {
    "/api/ingest": {
      "post": {
        "operationId": "post_ingest",
        "summary": "POST /api/ingest example route",
        "description": "Illustrative Spala backend contract route. Not a live API endpoint.",
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Example successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation or request error."
          },
          "401": {
            "description": "Authentication required when the route is protected."
          },
          "403": {
            "description": "Authenticated user does not have access to this resource."
          },
          "404": {
            "description": "Resource not found."
          }
        }
      }
    },
    "/api/metrics": {
      "get": {
        "operationId": "get_metrics",
        "summary": "GET /api/metrics example route",
        "description": "Illustrative Spala backend contract route. Not a live API endpoint.",
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Example successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation or request error."
          },
          "401": {
            "description": "Authentication required when the route is protected."
          },
          "403": {
            "description": "Authenticated user does not have access to this resource."
          },
          "404": {
            "description": "Resource not found."
          }
        }
      }
    },
    "/api/dashboards": {
      "get": {
        "operationId": "get_dashboards",
        "summary": "GET /api/dashboards example route",
        "description": "Illustrative Spala backend contract route. Not a live API endpoint.",
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Example successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation or request error."
          },
          "401": {
            "description": "Authentication required when the route is protected."
          },
          "403": {
            "description": "Authenticated user does not have access to this resource."
          },
          "404": {
            "description": "Resource not found."
          }
        }
      }
    },
    "/api/alerts": {
      "post": {
        "operationId": "post_alerts",
        "summary": "POST /api/alerts example route",
        "description": "Illustrative Spala backend contract route. Not a live API endpoint.",
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Example successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation or request error."
          },
          "401": {
            "description": "Authentication required when the route is protected."
          },
          "403": {
            "description": "Authenticated user does not have access to this resource."
          },
          "404": {
            "description": "Resource not found."
          }
        }
      }
    },
    "/api/incidents": {
      "get": {
        "operationId": "get_incidents",
        "summary": "GET /api/incidents example route",
        "description": "Illustrative Spala backend contract route. Not a live API endpoint.",
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Example successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation or request error."
          },
          "401": {
            "description": "Authentication required when the route is protected."
          },
          "403": {
            "description": "Authenticated user does not have access to this resource."
          },
          "404": {
            "description": "Resource not found."
          }
        }
      }
    },
    "/api/incidents/{id}": {
      "patch": {
        "operationId": "patch_incidents_id",
        "summary": "PATCH /api/incidents/{id} example route",
        "description": "Illustrative Spala backend contract route. Not a live API endpoint.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Example successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "Validation or request error."
          },
          "401": {
            "description": "Authentication required when the route is protected."
          },
          "403": {
            "description": "Authenticated user does not have access to this resource."
          },
          "404": {
            "description": "Resource not found."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "x-spala-example-boundary": "Illustrative public example only. Not a live customer API, not Spala source code, and not private platform architecture.",
  "x-spala-frontend-handoff": "Frontend receives ingestion format, dashboard query parameters, auth/API-key rules, error format, and generated docs."
}