{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/nuix/main/json-schema/nuix-async-function-status-object-schema.json",
  "title": "AsyncFunctionStatusObject",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nuix-core-engine-rest-api-openapi.yml#/components/schemas/AsyncFunctionStatusObject",
  "type": "object",
  "properties": {
    "done": {
      "type": "boolean",
      "description": "True if the task is done.  False otherwise."
    },
    "cancelled": {
      "type": "boolean",
      "description": "True if the task is cancelled.  False otherwise."
    },
    "result": {
      "type": "object",
      "description": "The result of the task."
    },
    "token": {
      "type": "string",
      "description": "The user token for the task."
    },
    "functionKey": {
      "type": "string",
      "description": "The function key to use when querying status."
    },
    "progress": {
      "type": "number",
      "description": "Progress of the Async function"
    },
    "total": {
      "type": "number",
      "description": "The total."
    },
    "percentComplete": {
      "type": "number",
      "description": "The percent complete."
    },
    "updatedOn": {
      "type": "integer",
      "description": "Date at which the Async function was last updated represented in milliseconds since the epoch."
    },
    "status": {
      "type": "string",
      "description": "Status of the Async function."
    },
    "statusId": {
      "type": "string",
      "description": "A status ID if available."
    },
    "requestTime": {
      "type": "integer",
      "description": "Date at which the Async function request was made represented in milliseconds since the epoch."
    },
    "startTime": {
      "type": "integer",
      "description": "Date at which the Async function request was started represented in milliseconds since the epoch."
    },
    "finishTime": {
      "type": "integer",
      "description": "Date at which the Async function request was finished represented in milliseconds since the epoch."
    },
    "caseId": {
      "type": "string",
      "description": "Case identification token"
    },
    "caseName": {
      "type": "string",
      "description": "Name of the case on which the Async function was performed."
    },
    "hasSuccessfullyCompleted": {
      "type": "boolean",
      "description": "Indicated whether the Async function has successfully completed."
    },
    "friendlyName": {
      "type": "string",
      "description": "Friendly name for the Async function."
    },
    "caseLocation": {
      "type": "string",
      "description": "Location of the case on which the Async function was performed."
    },
    "requestor": {
      "type": "string",
      "description": "Username for user who requested the Async function."
    },
    "licenseShortName": {
      "type": "string",
      "description": "The license used when executing the Async fucntion."
    },
    "action": {
      "type": "string",
      "description": "Action if available."
    },
    "options": {
      "type": "object",
      "additionalProperties": {
        "type": "object"
      },
      "description": "Options used during the execution of the Async function."
    },
    "participatingInCaseFunctionQueue": {
      "type": "boolean",
      "description": "True if participating in the case function queue.  False otherwise."
    },
    "processedBy": {
      "type": "string",
      "description": "The server ID that processed the task."
    },
    "error": {
      "$ref": "#/$defs/ClusteredRestErrorResponse"
    }
  },
  "$defs": {
    "ClusteredRestErrorResponse": {
      "type": "object",
      "properties": {
        "serverId": {
          "type": "string",
          "description": "The server ID of the server reporting the error."
        },
        "developerMessage": {
          "type": "string",
          "description": "The technical description of the error."
        },
        "userMessage": {
          "type": "string",
          "description": "The friendly error message."
        },
        "additionalInfo": {
          "type": "object",
          "description": "Additional information about the error.",
          "additionalProperties": {
            "type": "object",
            "description": "This is a map of additional properties."
          }
        },
        "errorCode": {
          "type": "string",
          "description": "The specific error code for the error from the list of available error codes.",
          "enum": [
            "AUTHENTICATION_FAILED",
            "CASE_ACCESS_RESTRICTED",
            "CASE_LOCKED",
            "DELETE_DENIED",
            "DUPLICATE_CASES_DETECTED",
            "ENGINE_EXCEPTION",
            "FILE_TOO_LARGE",
            "INVALID_REQUEST_FORMAT",
            "INVALID_APPLICATION_RESPONSE",
            "INVALID_ARGUMENT",
            "ITEM_ACCESS_RESTRICTED",
            "LICENSE_EXCEPTION",
            "MEDIA_TYPE_NOT_SUPPORTED",
            "MEDIA_TYPE_NOT_ACCEPTABLE",
            "METHOD_NOT_ALLOWED",
            "NOT_IMPLEMENTED",
            "PRODUCTION_SET_FROZEN",
            "REQUIRED_ARGUMENT_MISSING",
            "RESOURCE_NOT_FOUND",
            "UNAUTHORISED",
            "UNKNOWN",
            "USER_SCRIPT_NOT_PROVIDED",
            "FOLDER_ALREADY_EXISTS",
            "CASE_LOCKED_BY_FUNCTION",
            "MISSING_THUMBNAIL",
            "ITEM_SET_ALREADY_EXISTS",
            "INVALID_LICENSE_TYPE_FOR_CASE",
            "SIMPLE_CASE_REQUIRED",
            "USER_ACCOUNT_LOCKED",
            "APPLICATION_NOT_REGISTERED",
            "INVALID_TEMPLATE",
            "DUPLICATE_RECORD",
            "CASE_MIGRATION_REQUIRED",
            "SERVICE_UNAVAILABLE",
            "RESPONSE_TOO_LARGE",
            "QUERY_PARSE_ERROR",
            "REMOTE_SYSTEM_ERROR",
            "FILE_SYSTEM_ERROR"
          ]
        }
      }
    }
  }
}