{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/github/main/json-schema/github-job-schema.json",
  "title": "Job",
  "description": "Information of a job execution in a workflow run",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/github-actions-api-openapi.yml#/components/schemas/job",
  "type": "object",
  "properties": {
    "id": {
      "description": "The id of the job.",
      "type": "integer"
    },
    "run_id": {
      "description": "The id of the associated workflow run.",
      "type": "integer"
    },
    "run_url": {
      "type": "string"
    },
    "run_attempt": {
      "type": "integer",
      "description": "Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run."
    },
    "node_id": {
      "type": "string"
    },
    "head_sha": {
      "description": "The SHA of the commit that is being run.",
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "html_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "description": "The phase of the lifecycle that the job is currently in.",
      "type": "string",
      "enum": [
        "queued",
        "in_progress",
        "completed",
        "waiting"
      ]
    },
    "conclusion": {
      "description": "The outcome of the job.",
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "success",
        "failure",
        "neutral",
        "cancelled",
        "skipped",
        "timed_out",
        "action_required"
      ]
    },
    "created_at": {
      "description": "The time that the job created, in ISO 8601 format.",
      "format": "date-time",
      "type": "string"
    },
    "started_at": {
      "description": "The time that the job started, in ISO 8601 format.",
      "format": "date-time",
      "type": "string"
    },
    "completed_at": {
      "description": "The time that the job finished, in ISO 8601 format.",
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "description": "The name of the job.",
      "type": "string"
    },
    "steps": {
      "description": "Steps in this job.",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "status",
          "conclusion",
          "number"
        ],
        "properties": {
          "status": {
            "description": "The phase of the lifecycle that the job is currently in.",
            "type": "string",
            "enum": [
              "queued",
              "in_progress",
              "completed"
            ]
          },
          "conclusion": {
            "description": "The outcome of the job.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "The name of the job.",
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "started_at": {
            "description": "The time that the step started, in ISO 8601 format.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "completed_at": {
            "description": "The time that the job finished, in ISO 8601 format.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "check_run_url": {
      "type": "string"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Labels for the workflow job. Specified by the \"runs_on\" attribute in the action's workflow file."
    },
    "runner_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.)"
    },
    "runner_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.)"
    },
    "runner_group_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.)"
    },
    "runner_group_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.)"
    },
    "workflow_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The name of the workflow."
    },
    "head_branch": {
      "type": [
        "string",
        "null"
      ],
      "description": "The name of the current branch."
    }
  },
  "required": [
    "id",
    "node_id",
    "run_id",
    "run_url",
    "head_sha",
    "workflow_name",
    "head_branch",
    "name",
    "url",
    "html_url",
    "status",
    "conclusion",
    "started_at",
    "completed_at",
    "check_run_url",
    "labels",
    "runner_id",
    "runner_name",
    "runner_group_id",
    "runner_group_name",
    "created_at"
  ]
}