{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-devops/json-schema/microsoft-azure-devops-work-item-schema.json",
  "title": "WorkItem",
  "description": "An Azure DevOps work item (Bug, Task, User Story, etc.)",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-devops-work-items-api-openapi.yml#/components/schemas/WorkItem",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique numeric identifier of the work item"
    },
    "rev": {
      "type": "integer",
      "description": "Revision number of the work item (increments on each update)"
    },
    "fields": {
      "type": "object",
      "description": "Dynamic map of field reference names to values. Common fields include System.Title, System.State, System.AssignedTo, System.Description, System.WorkItemType, System.AreaPath, System.IterationPath, etc.\n",
      "additionalProperties": true
    },
    "relations": {
      "type": "array",
      "description": "Links and relations to other work items or external resources",
      "items": {
        "$ref": "#/$defs/WorkItemRelation"
      }
    },
    "_links": {
      "type": "object",
      "description": "HAL links for navigating related resources",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "URL to access this work item via the REST API"
    }
  },
  "$defs": {
    "WorkItemRelation": {
      "type": "object",
      "description": "A relation between a work item and another resource",
      "properties": {
        "rel": {
          "type": "string",
          "description": "Relation type (e.g., System.LinkTypes.Hierarchy-Reverse, AttachedFile)"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "URL of the related resource"
        },
        "attributes": {
          "type": "object",
          "description": "Additional attributes for the relation (e.g., comment, isLocked)",
          "additionalProperties": true
        }
      }
    }
  }
}