{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rollbar.com/schemas/rollbar/deploy.json",
  "title": "Rollbar Deploy",
  "description": "A Rollbar deployment record representing a code release. Deploys are used to correlate error spikes with specific releases and track which code version introduced issues.",
  "type": "object",
  "required": ["environment", "revision"],
  "properties": {
    "id": {
      "type": "integer",
      "description": "The deploy ID assigned by Rollbar."
    },
    "project_id": {
      "type": "integer",
      "description": "The project ID this deploy belongs to."
    },
    "environment": {
      "type": "string",
      "description": "The environment deployed to (e.g., production, staging, development).",
      "maxLength": 255
    },
    "revision": {
      "type": "string",
      "description": "The revision identifier, typically a Git commit SHA or version string.",
      "maxLength": 40
    },
    "local_username": {
      "type": "string",
      "description": "The local system username of the person who performed the deploy."
    },
    "rollbar_username": {
      "type": "string",
      "description": "The Rollbar username of the person who performed the deploy."
    },
    "comment": {
      "type": "string",
      "description": "An optional comment describing the deployment or changes included.",
      "maxLength": 64000
    },
    "status": {
      "type": "string",
      "description": "The status of the deployment lifecycle.",
      "enum": ["started", "succeeded", "failed", "timed_out"]
    },
    "start_time": {
      "type": "integer",
      "description": "Unix timestamp when the deploy started."
    },
    "finish_time": {
      "type": "integer",
      "description": "Unix timestamp when the deploy finished."
    },
    "user_id": {
      "type": "integer",
      "description": "The Rollbar user ID who initiated the deploy."
    }
  },
  "$defs": {
    "DeployStatus": {
      "type": "string",
      "description": "The lifecycle status of a deployment.",
      "enum": ["started", "succeeded", "failed", "timed_out"]
    }
  }
}