{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/LongTaskStatusWithLinks",
  "title": "LongTaskStatusWithLinks",
  "required": [
    "_links",
    "elapsedTime",
    "finished",
    "id",
    "messages",
    "name",
    "percentageComplete",
    "successful"
  ],
  "type": "object",
  "properties": {
    "ari": {
      "type": "string",
      "description": "the ARI for the long task, based on its ID",
      "example": "example_value"
    },
    "id": {
      "type": "string",
      "example": "abc123"
    },
    "name": {
      "required": [
        "args",
        "key"
      ],
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "args": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {}
          }
        }
      },
      "example": "Example Title"
    },
    "elapsedTime": {
      "type": "integer",
      "format": "int64",
      "example": 10
    },
    "percentageComplete": {
      "type": "integer",
      "format": "int32",
      "example": 10
    },
    "successful": {
      "type": "boolean",
      "example": true
    },
    "finished": {
      "type": "boolean",
      "example": true
    },
    "messages": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Message"
      },
      "example": []
    },
    "_links": {
      "$ref": "#/components/schemas/GenericLinks"
    },
    "status": {
      "type": "string",
      "example": "example_value"
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Message"
      },
      "example": []
    },
    "additionalDetails": {
      "type": "object",
      "properties": {
        "destinationId": {
          "type": "string",
          "nullable": true
        },
        "destinationUrl": {
          "type": "string"
        },
        "totalPageNeedToCopy": {
          "type": "integer"
        },
        "additionalProperties": {
          "type": "string"
        }
      },
      "example": "example_value"
    }
  },
  "description": "Same as LongTaskStatus but with `_links` property.\n\nStatus keys:\n\n- `ERROR_UNKNOWN` - Generic error\n- `ERROR_LOCK_FAILED` - Could not get the lock on destination space\n- `ERROR_RELINK` - Error when relink pages/attachments\n- `ERROR_COPY_PAGE` - Error while copying 1 page\n- `WARN_RENAME_PAGE` - Warning page is rename during copy\n- `WARN_IGNORE_COPY_PERMISSION` - Warning could not copy permission\n- `WARN_IGNORE_COPY_ATTACHMENT` - Warning could not copy attachment\n- `WARN_IGNORE_DELETE_PAGE` - Warning ignoring delete of a non agreed on page\n- `STATUS_COPIED_PAGES` - Message total pages are copied\n- `STATUS_COPYING_PAGES` - Message copy pages\n- `STATUS_RELINK_PAGES` - Message relink pages/attachments\n- `STATUS_DELETING_PAGES` - Message delete pages\n- `STATUS_DELETED_PAGES` - Message total pages are deleted\n- `STATUS_MOVING_PAGES` - Message move pages\n- `WARN_IGNORE_VIEW_RESTRICTED` - Permission changed - view restricted\n- `WARN_IGNORE_EDIT_RESTRICTED` - Permission changed - edit restricted\n- `INITIALIZING_TASK` - Message when initializing task\n- `UNKNOWN_STATUS` - Message when status is unknown"
}