{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api-evangelist.github.io/weaviate/json-schema/weaviate-distributed-task-schema.json",
  "title": "DistributedTask",
  "description": "Distributed task metadata.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the task."
    },
    "version": {
      "type": "integer",
      "description": "The version of the task."
    },
    "status": {
      "type": "string",
      "description": "The status of the task."
    },
    "startedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the task was created."
    },
    "finishedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the task was finished."
    },
    "finishedNodes": {
      "type": "array",
      "description": "The nodes that finished the task.",
      "items": {
        "type": "string"
      }
    },
    "error": {
      "type": "string",
      "description": "The high level reason why the task failed."
    },
    "payload": {
      "type": "object",
      "description": "The payload of the task."
    },
    "units": {
      "type": "array",
      "description": "Units of the task. Only present for tasks that use unit tracking.",
      "items": {
        "$ref": "#/components/schemas/DistributedTaskUnit"
      }
    }
  }
}