{
  "info": {
    "title": "scheduling/tasks",
    "version": ""
  },
  "paths": {
    "/api/scheduling/tasks": {
      "get": {
        "tags": [
          "task"
        ],
        "summary": "List tasks",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskList"
                }
              }
            },
            "description": "Tasks retrieved successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "filter",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Advanced filter expression using RFC 7644 SCIM syntax. Refer to [RFC 7644](https://datatracker.ietf.org/doc/rfc7644/) for syntax details. All comparisons are case-insensitive. Supported fields: `name`, `enabled`, `resourceId`, `ownerId`, `spaceId`, `createdAt`, `updatedAt`, `updatedBy`, `lastStatus`, `lastTriggeredBy`, `lastStartedAt`, `lastEndedAt`, `lastExecutedAs`, and `triggerType`.\n"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            },
            "required": false,
            "description": "Maximum number of tasks to return per page."
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Cursor token for fetching the next page of results."
          },
          {
            "in": "query",
            "name": "resourceId",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "The unique identifier of the resource to filter tasks by."
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "enum": [
                "+createdAt",
                "-createdAt",
                "+enabled",
                "-enabled",
                "+name",
                "-name",
                "+ownerId",
                "-ownerId",
                "+resourceId",
                "-resourceId",
                "+spaceId",
                "-spaceId",
                "+updatedAt",
                "-updatedAt",
                "+updatedBy",
                "-updatedBy",
                "+lastStatus",
                "-lastStatus",
                "+lastTriggeredBy",
                "-lastTriggeredBy",
                "+lastStartedAt",
                "-lastStartedAt",
                "+lastEndedAt",
                "-lastEndedAt",
                "+lastExecutedAs",
                "-lastExecutedAs",
                "+triggerType",
                "-triggerType"
              ],
              "type": "string",
              "default": "-updatedAt"
            },
            "required": false,
            "description": "Field and direction to sort results by. Prefix the field name with\n`+` for ascending or `-` for descending order. Defaults to `-updatedAt`.\n"
          }
        ],
        "description": "Retrieves a paginated list of tasks the requesting user has access to. Results include task metadata such as owner, resource, space, and last run status. Use the `filter` parameter to narrow results by field values, or `sort` to control the ordering.",
        "operationId": "listTasks",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-replaces": [
          {
            "namespace": "",
            "uniqueIdentifier": "GET:/v1/tasks"
          }
        ],
        "x-qlik-tier": {
          "tier": "1",
          "limit": 1000
        }
      },
      "post": {
        "tags": [
          "task"
        ],
        "summary": "Create a task",
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": "Task created successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "query",
            "name": "migrateFrom",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "When provided, specifies the unique identifier of a legacy reload-task to migrate from the previous scheduling system."
          }
        ],
        "description": "Creates a new task for the specified resource. The task is owned by the requesting user and is disabled by default until explicitly enabled. The `resourceId` is derived automatically from the task's state definitions and cannot be set directly in the request body.",
        "operationId": "createTask",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Task"
              },
              "examples": {
                "objectExample": {
                  "$ref": "#/components/examples/createSingleEventTriggerTask"
                }
              }
            }
          },
          "required": true
        },
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-replaces": [
          {
            "namespace": "",
            "uniqueIdentifier": "POST:/v1/tasks"
          }
        ],
        "x-qlik-tier": {
          "tier": "2",
          "limit": 100
        }
      }
    },
    "/api/scheduling/tasks/{id}": {
      "get": {
        "tags": [
          "task"
        ],
        "summary": "Get a task",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": "Task details retrieved successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the task to retrieve."
          }
        ],
        "description": "Retrieves the full definition and metadata for a specific task, including its trigger configuration, state definitions, owner, and last run status. Use this operation to inspect a task before updating or starting it.",
        "operationId": "getTask",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-replaces": [
          {
            "namespace": "",
            "uniqueIdentifier": "GET:/v1/tasks/{id}"
          }
        ],
        "x-qlik-tier": {
          "tier": "1",
          "limit": 1000
        }
      },
      "patch": {
        "tags": [
          "task"
        ],
        "summary": "Patch a task",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": "Task updated successfully."
          },
          "204": {
            "description": "Task updated with no content to return."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the task to update."
          }
        ],
        "description": "Partially updates a specific task using a JSON Patch document (RFC 6902). Only the fields included in the patch operations are modified. All other fields remain unchanged. If the task is owned by another user, ownership is transferred to the requesting user.",
        "operationId": "patchTask",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JSONPatch"
              }
            }
          },
          "required": true
        },
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-tier": {
          "tier": "2",
          "limit": 100
        }
      },
      "put": {
        "tags": [
          "task"
        ],
        "summary": "Replace a task",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": "Task replaced successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the task to replace."
          }
        ],
        "description": "Replaces the full definition of a specific task with the supplied payload. All fields not included in the request body are reset to their defaults. If the task is owned by another user, ownership is transferred to the requesting user. Use `PATCH` instead to apply a partial update.",
        "operationId": "updateTask",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Task"
              }
            }
          },
          "required": true
        },
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-replaces": [
          {
            "namespace": "",
            "uniqueIdentifier": "PUT:/v1/tasks/{id}"
          }
        ],
        "x-qlik-tier": {
          "tier": "2",
          "limit": 100
        }
      },
      "delete": {
        "tags": [
          "task"
        ],
        "summary": "Delete a task",
        "responses": {
          "204": {
            "description": "Task deleted successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the task to delete."
          }
        ],
        "description": "Deletes a specific task and cancels any scheduled or pending runs associated with it. This action cannot be undone. Tenant admins can delete tasks owned by other users.",
        "operationId": "deleteTask",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-replaces": [
          {
            "namespace": "",
            "uniqueIdentifier": "DELETE:/v1/tasks/{id}"
          }
        ],
        "x-qlik-tier": {
          "tier": "2",
          "limit": 100
        }
      }
    },
    "/api/scheduling/tasks/{id}/actions/start": {
      "post": {
        "tags": [
          "task"
        ],
        "summary": "Start a task",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Task started successfully"
                    }
                  }
                }
              }
            },
            "description": "Task started successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the task to start."
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string",
              "default": "manual"
            },
            "required": false,
            "description": "The origin of the trigger. Defaults to `manual`. For event-triggered tasks, this can be the name of the triggering task.\n"
          }
        ],
        "description": "Triggers an immediate run of the specified task outside its normal schedule. The optional `source` parameter identifies what initiated the run, which is recorded in the run history for auditing purposes.",
        "operationId": "startTask",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-replaces": [
          {
            "namespace": "",
            "uniqueIdentifier": "POST:/v1/tasks/{id}/actions/start"
          }
        ],
        "x-qlik-tier": {
          "tier": "2",
          "limit": 100
        }
      }
    },
    "/api/scheduling/tasks/{id}/graphs/ancestors": {
      "get": {
        "tags": [
          "task-graph"
        ],
        "summary": "Get ancestor graph",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskGraph"
                }
              }
            },
            "description": "Ancestor graph retrieved successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the task."
          },
          {
            "in": "query",
            "name": "level",
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1
            },
            "required": false,
            "description": "Maximum ancestor depth to traverse breadth-first."
          },
          {
            "in": "query",
            "name": "withTask",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false,
            "description": "When `true`, includes the full task document for each accessible vertex in the response."
          }
        ],
        "description": "Retrieves the ancestor subgraph for a specific task, with the requested task as the root vertex. Traverses parent relationships breadth-first up to the depth specified by `level`. Use this to understand all upstream dependencies of a task.",
        "operationId": "listAncestorTasks",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-tier": {
          "tier": "1",
          "limit": 1000
        }
      }
    },
    "/api/scheduling/tasks/{id}/graphs/children": {
      "get": {
        "tags": [
          "task-graph"
        ],
        "summary": "List child tasks",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskList"
                }
              }
            },
            "description": "Child tasks retrieved successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the parent task."
          },
          {
            "in": "query",
            "name": "filter",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Advanced filter expression using RFC 7644 SCIM syntax. Refer to [RFC 7644](https://datatracker.ietf.org/doc/rfc7644/) for syntax details. All comparisons are case-insensitive. Supported fields: `name`, `enabled`, `resourceId`, `ownerId`, `spaceId`, `createdAt`, `updatedAt`, `updatedBy`, `lastStatus`, `lastTriggeredBy`, `lastStartedAt`, `lastEndedAt`, `lastExecutedAs`, and `triggerType`.\n"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            },
            "required": false,
            "description": "Maximum number of tasks to return per page."
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Cursor token for fetching the next page of results."
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "enum": [
                "+createdAt",
                "-createdAt",
                "+enabled",
                "-enabled",
                "+name",
                "-name",
                "+ownerId",
                "-ownerId",
                "+resourceId",
                "-resourceId",
                "+spaceId",
                "-spaceId",
                "+updatedAt",
                "-updatedAt",
                "+updatedBy",
                "-updatedBy",
                "+lastStatus",
                "-lastStatus",
                "+lastTriggeredBy",
                "-lastTriggeredBy",
                "+lastStartedAt",
                "-lastStartedAt",
                "+lastEndedAt",
                "-lastEndedAt",
                "+lastExecutedAs",
                "-lastExecutedAs",
                "+triggerType",
                "-triggerType"
              ],
              "type": "string",
              "default": "-updatedAt"
            },
            "required": false,
            "description": "Field and direction to sort results by. Prefix the field name with\n`+` for ascending or `-` for descending order. Defaults to `-updatedAt`.\n"
          }
        ],
        "description": "Retrieves a paginated list of tasks that are direct children of the specified task in the dependency graph. A child task is one that is triggered when the parent task completes successfully.",
        "operationId": "listChildTasks",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-tier": {
          "tier": "1",
          "limit": 1000
        }
      }
    },
    "/api/scheduling/tasks/{id}/graphs/descendants": {
      "get": {
        "tags": [
          "task-graph"
        ],
        "summary": "Get descendant graph",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskGraph"
                }
              }
            },
            "description": "Descendant graph retrieved successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the task."
          },
          {
            "in": "query",
            "name": "level",
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1
            },
            "required": false,
            "description": "Maximum descendant depth to traverse breadth-first."
          },
          {
            "in": "query",
            "name": "withTask",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false,
            "description": "When `true`, includes the full task document for each accessible vertex in the response."
          }
        ],
        "description": "Retrieves the descendant subgraph for a specific task, with the requested task as the root vertex. Traverses child relationships breadth-first down to the depth specified by `level`. Use this to identify all downstream tasks that will be triggered when this task completes.",
        "operationId": "listDescendantTasks",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-tier": {
          "tier": "1",
          "limit": 1000
        }
      }
    },
    "/api/scheduling/tasks/{id}/graphs/parents": {
      "get": {
        "tags": [
          "task-graph"
        ],
        "summary": "List parent tasks",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskList"
                }
              }
            },
            "description": "Parent tasks retrieved successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the child task."
          },
          {
            "in": "query",
            "name": "filter",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Advanced filter expression using RFC 7644 SCIM syntax. Refer to [RFC 7644](https://datatracker.ietf.org/doc/rfc7644/) for syntax details. All comparisons are case-insensitive. Supported fields: `name`, `enabled`, `resourceId`, `ownerId`, `spaceId`, `createdAt`, `updatedAt`, `updatedBy`, `lastStatus`, `lastTriggeredBy`, `lastStartedAt`, `lastEndedAt`, `lastExecutedAs`, and `triggerType`.\n"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            },
            "required": false,
            "description": "Maximum number of tasks to return per page."
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Cursor token for fetching the next page of results."
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "enum": [
                "+createdAt",
                "-createdAt",
                "+enabled",
                "-enabled",
                "+name",
                "-name",
                "+ownerId",
                "-ownerId",
                "+resourceId",
                "-resourceId",
                "+spaceId",
                "-spaceId",
                "+updatedAt",
                "-updatedAt",
                "+updatedBy",
                "-updatedBy",
                "+lastStatus",
                "-lastStatus",
                "+lastTriggeredBy",
                "-lastTriggeredBy",
                "+lastStartedAt",
                "-lastStartedAt",
                "+lastEndedAt",
                "-lastEndedAt",
                "+lastExecutedAs",
                "-lastExecutedAs",
                "+triggerType",
                "-triggerType"
              ],
              "type": "string",
              "default": "-updatedAt"
            },
            "required": false,
            "description": "Field and direction to sort results by. Prefix the field name with\n`+` for ascending or `-` for descending order. Defaults to `-updatedAt`.\n"
          }
        ],
        "description": "Retrieves a paginated list of tasks that are direct parents of the specified task in the dependency graph. A parent task is one whose completion triggers the current task.",
        "operationId": "listParentTasks",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-tier": {
          "tier": "1",
          "limit": 1000
        }
      }
    },
    "/api/scheduling/tasks/{id}/graphs/subgraph": {
      "get": {
        "tags": [
          "task-graph"
        ],
        "summary": "Get task subgraph",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskGraph"
                }
              }
            },
            "description": "Task subgraph retrieved successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the task."
          },
          {
            "in": "query",
            "name": "level",
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1
            },
            "required": false,
            "description": "Maximum ancestor and descendant depth to traverse breadth-first."
          },
          {
            "in": "query",
            "name": "withTask",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false,
            "description": "When `true`, includes the full task document for each accessible vertex in the response."
          }
        ],
        "description": "Retrieves the combined ancestor-and-descendant subgraph for a specific task, with the requested task as the root vertex. Traverses both parent and child relationships breadth-first up to the depth specified by `level`. Use this to see the full dependency context for a task in one request.",
        "operationId": "listTaskSubgraph",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-tier": {
          "tier": "1",
          "limit": 1000
        }
      }
    },
    "/api/scheduling/tasks/{id}/runs": {
      "get": {
        "tags": [
          "task"
        ],
        "summary": "List task runs",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrchRunList"
                }
              }
            },
            "description": "Task runs retrieved successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the task."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            },
            "required": false,
            "description": "Maximum number of task runs to return per page."
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Cursor token for fetching the next page of results."
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "enum": [
                "+startedAt",
                "-startedAt",
                "+endedAt",
                "-endedAt",
                "+status",
                "-status",
                "+taskId",
                "-taskId",
                "+actionId",
                "-actionId"
              ],
              "type": "string",
              "default": "-startedAt"
            },
            "required": false,
            "description": "Field and direction to sort results by. Prefix the field name with `+` for ascending or `-` for descending order. Defaults to `-startedAt`.\n"
          }
        ],
        "description": "Retrieves a paginated list of execution runs for the specified task, ordered by most recent run by default. Each run record includes the start and end time, status, and the identity that triggered it.",
        "operationId": "getTaskRuns",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-replaces": [
          {
            "namespace": "",
            "uniqueIdentifier": "GET:/v1/tasks/{id}/runs"
          }
        ],
        "x-qlik-tier": {
          "tier": "1",
          "limit": 1000
        }
      }
    },
    "/api/scheduling/tasks/{id}/runs/{runId}/log": {
      "get": {
        "tags": [
          "task"
        ],
        "summary": "Get task run log",
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "logContent": {
                      "type": "string",
                      "example": "Task run log content"
                    }
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "logContent": {
                      "type": "string",
                      "example": "Task run log content",
                      "description": "Log content in plain text format."
                    }
                  }
                }
              }
            },
            "description": "Task run log retrieved successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the task."
          },
          {
            "in": "path",
            "name": "runId",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the task run."
          },
          {
            "in": "header",
            "name": "Accept",
            "schema": {
              "enum": [
                "application/json",
                "text/plain"
              ],
              "type": "string",
              "default": "application/json"
            },
            "required": false,
            "description": "The preferred response format for the log content."
          }
        ],
        "description": "Retrieves the execution log for a specific task run. Set the `Accept` header to `text/plain` to receive the raw log as a downloadable file, or `application/json` (default) to receive it wrapped in a JSON object with a `logContent` field.",
        "operationId": "getTaskRunLog",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-replaces": [
          {
            "namespace": "",
            "uniqueIdentifier": "GET:/v1/tasks/{id}/runs/{runId}/log"
          }
        ],
        "x-qlik-tier": {
          "tier": "1",
          "limit": 1000
        }
      }
    },
    "/api/scheduling/tasks/{id}/runs/last": {
      "get": {
        "tags": [
          "task"
        ],
        "summary": "Get last task run",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrchRun"
                }
              }
            },
            "description": "Last task run retrieved successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the task."
          }
        ],
        "description": "Retrieves the most recent execution run for the specified task. Returns a 404 response if the task has never been run. Use this operation to quickly check whether the last run succeeded or failed without paginating through the full run history.",
        "operationId": "getTaskLastRun",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-replaces": [
          {
            "namespace": "",
            "uniqueIdentifier": "GET:/v1/tasks/{id}/runs/last"
          }
        ],
        "x-qlik-tier": {
          "tier": "1",
          "limit": 1000
        }
      }
    },
    "/api/scheduling/tasks/resources/{id}/runs": {
      "get": {
        "tags": [
          "task"
        ],
        "summary": "List task runs for a resource",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrchRunList"
                }
              }
            },
            "description": "Task runs retrieved successfully."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The unique identifier of the resource to retrieve task runs for."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100,
              "minimum": 1
            },
            "required": false,
            "description": "Maximum number of task runs to return per page."
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Cursor token for fetching the next page of results."
          },
          {
            "in": "query",
            "name": "sort",
            "schema": {
              "enum": [
                "+startedAt",
                "-startedAt",
                "+endedAt",
                "-endedAt",
                "+status",
                "-status",
                "+taskId",
                "-taskId",
                "+actionId",
                "-actionId"
              ],
              "type": "string",
              "default": "-startedAt"
            },
            "required": false,
            "description": "Field and direction to sort results by. Prefix the field name with `+` for ascending or `-` for descending order. Defaults to `-startedAt`.\n"
          }
        ],
        "description": "Retrieves a paginated list of task runs for a given resource, identified by `id`. Returns run history across all tasks associated with that resource, ordered by the most recent run by default.",
        "operationId": "getResourceRuns",
        "x-qlik-visibility": "public",
        "x-qlik-stability": "stable",
        "x-qlik-deprecated": false,
        "x-qlik-replaces": [
          {
            "namespace": "",
            "uniqueIdentifier": "GET:/v1/tasks/resources/{id}/runs"
          }
        ],
        "x-qlik-tier": {
          "tier": "1",
          "limit": 1000
        }
      }
    }
  },
  "openapi": "3.0.0",
  "components": {
    "examples": {
      "createSingleEventTriggerTask": {
        "value": {
          "name": "Reload app4 when Task 1 succeeded",
          "events": [
            {
              "name": "task1-succeeded",
              "type": "com.qlik.v1.task.run.finished",
              "source": "system-events.task",
              "correlation": [
                {
                  "contextAttributeName": "id",
                  "contextAttributeValue": "task-1"
                }
              ]
            }
          ],
          "states": [
            {
              "end": true,
              "name": "App4.Reload",
              "type": "event",
              "onEvents": [
                {
                  "actions": [
                    {
                      "name": "app4.reload",
                      "functionRef": {
                        "refName": "AppReload",
                        "arguments": {
                          "appId": "app4",
                          "partial": false
                        }
                      }
                    }
                  ],
                  "eventRefs": [
                    "task1-succeeded"
                  ]
                }
              ],
              "exclusive": false
            }
          ],
          "description": "This is a Reload Task Demo in Serverless Workflow Spec"
        },
        "summary": "payload for creating a Task"
      }
    },
    "responses": {
      "BadRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "invalidPage": {
                "value": {
                  "errors": [
                    {
                      "code": 400,
                      "context": "GetTasks",
                      "timestamp": "2023-07-17T12:00:00Z"
                    }
                  ],
                  "traceId": "abc123"
                },
                "summary": "Invalid page cursor"
              },
              "invalidSort": {
                "value": {
                  "errors": [
                    {
                      "code": 400,
                      "context": "GetTasks",
                      "timestamp": "2023-07-17T12:00:00Z"
                    }
                  ],
                  "traceId": "abc123"
                },
                "summary": "Invalid sort field"
              }
            }
          }
        },
        "description": "The request is malformed or contains invalid parameters."
      },
      "Conflict": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        },
        "description": "The request conflicts with the current state of the resource."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        },
        "description": "Access denied. You lack permission to perform this operation."
      },
      "InternalServerError": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        },
        "description": "An unexpected error occurred on the server."
      },
      "NotFound": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        },
        "description": "The requested resource was not found."
      },
      "ServiceUnavailable": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        },
        "description": "The service is temporarily unavailable. Retry the request after a short delay."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        },
        "description": "Authentication credentials are missing or invalid."
      }
    },
    "schemas": {
      "action": {
        "type": "object",
        "oneOf": [
          {
            "required": [
              "name",
              "functionRef"
            ]
          },
          {
            "required": [
              "name",
              "publish"
            ]
          },
          {
            "required": [
              "name",
              "subscribe"
            ]
          },
          {
            "required": [
              "name",
              "subFlowRef"
            ]
          }
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "app.reload",
            "pattern": "^[A-Za-z0-9 ./_\\\\()\\-]{1,100}$",
            "maxLength": 100,
            "minLength": 1,
            "description": "A unique name for this action within the workflow."
          },
          "retryRef": {
            "type": "string",
            "example": "default-retry",
            "description": "A reference to a defined workflow retry policy. If absent, the default retry policy applies."
          },
          "condition": {
            "type": "string",
            "example": "${ .resourceId != null }",
            "minLength": 1,
            "description": "An expression that must evaluate to `true` for this action to be performed. When `false`, the action is skipped."
          },
          "functionRef": {
            "$ref": "#/components/schemas/functionref"
          },
          "retryableErrors": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "io.qlik.error.temporary-failure",
              "description": "A unique reference to a defined workflow error."
            },
            "minItems": 1,
            "description": "Workflow error references for which this action must be retried. Used only when `autoRetries` is `false`."
          },
          "nonRetryableErrors": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "io.qlik.error.invalid-state",
              "description": "A unique reference to a defined workflow error."
            },
            "minItems": 1,
            "description": "Workflow error references for which this action must not be retried. Used only when `autoRetries` is `true`."
          }
        },
        "additionalProperties": false
      },
      "actionExecTimeout": {
        "type": "string",
        "example": "3S",
        "minLength": 1,
        "description": "The maximum duration for executing a single action, expressed as an ISO 8601 duration string or an expression that evaluates to one."
      },
      "correlationDef": {
        "type": "object",
        "required": [
          "contextAttributeName"
        ],
        "properties": {
          "contextAttributeName": {
            "enum": [
              "id",
              "status",
              "appId",
              "spaceId",
              "datasetId"
            ],
            "type": "string",
            "example": "id",
            "description": "The name of the CloudEvent extension context attribute to match on."
          },
          "contextAttributeValue": {
            "type": "string",
            "example": "task-1",
            "minLength": 1,
            "description": "The expected value of the CloudEvent extension context attribute."
          }
        },
        "description": "A correlation definition used to match a CloudEvent to a specific workflow instance.",
        "additionalProperties": false
      },
      "crondef": {
        "oneOf": [
          {
            "type": "string",
            "minLength": 1,
            "description": "A cron expression defining when workflow instances should be created automatically."
          },
          {
            "type": "object",
            "required": [
              "expression"
            ],
            "properties": {
              "expression": {
                "type": "string",
                "minLength": 1,
                "description": "A cron expression describing when the workflow instance should be created."
              },
              "validUntil": {
                "type": "string",
                "description": "The date and time (ISO 8601 format) after which this cron expression is no longer active."
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "end": {
        "type": "boolean",
        "default": true,
        "description": "Marks this state as a terminal state in the workflow."
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HttpResult"
            }
          },
          "traceId": {
            "type": "string",
            "description": "A trace identifier for correlating the error to a specific service request."
          }
        }
      },
      "eventdef": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "task1-succeeded",
            "pattern": "^[A-Za-z0-9 ./_\\\\()\\-]{1,100}$",
            "maxLength": 100,
            "minLength": 1,
            "description": "A unique name identifying this event definition within the workflow."
          },
          "type": {
            "enum": [
              "com.qlik.v1.task.run.finished",
              "com.qlik/active-analytics-orch"
            ],
            "type": "string",
            "example": "com.qlik.v1.task.run.finished",
            "description": "The CloudEvents type attribute identifying the kind of event."
          },
          "source": {
            "enum": [
              "system-events.task",
              "dataset.updated"
            ],
            "type": "string",
            "example": "system-events.task",
            "description": "The CloudEvents source attribute identifying the origin of the event."
          },
          "dataOnly": {
            "type": "boolean",
            "default": true,
            "description": "When `true`, only the event payload is accessible to consuming workflow states. When `false`, both the payload and context attributes are accessible."
          },
          "correlation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/correlationDef"
            },
            "minItems": 1,
            "description": "Correlation definitions used to match incoming CloudEvents to this workflow instance."
          }
        },
        "additionalProperties": false
      },
      "Events": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/eventdef"
        },
        "minItems": 1,
        "description": "CloudEvent definitions for the workflow. Defines the events that can be consumed or produced by the workflow."
      },
      "eventstate": {
        "type": "object",
        "oneOf": [
          {
            "required": [
              "name",
              "type",
              "onEvents",
              "end"
            ]
          },
          {
            "required": [
              "name",
              "type",
              "onEvents",
              "transition"
            ]
          }
        ],
        "properties": {
          "end": {
            "$ref": "#/components/schemas/end"
          },
          "name": {
            "type": "string",
            "example": "App.Reload",
            "pattern": "^[A-Za-z0-9 ./_\\\\()\\-]{1,100}$",
            "maxLength": 100,
            "minLength": 1,
            "description": "The name of this state, unique within the workflow."
          },
          "type": {
            "enum": [
              "EVENT"
            ],
            "type": "string",
            "example": "event",
            "description": "The state type. Must be `EVENT` for event-driven states."
          },
          "onEvents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/onevents"
            },
            "description": "The events to consume and the optional actions to perform when they are received."
          },
          "timeouts": {
            "type": "object",
            "properties": {
              "eventTimeout": {
                "$ref": "#/components/schemas/eventTimeout"
              },
              "stateExecTimeout": {
                "$ref": "#/components/schemas/stateExecTimeout"
              },
              "actionExecTimeout": {
                "$ref": "#/components/schemas/actionExecTimeout"
              }
            },
            "description": "State-specific timeout durations."
          },
          "exclusive": {
            "type": "boolean",
            "default": true,
            "description": "When `true`, consuming any one of the defined events causes its associated actions to execute. When `false`, all defined events must be consumed before actions are performed."
          },
          "compensatedBy": {
            "type": "string",
            "example": "reload",
            "pattern": "^[A-Za-z0-9 ./_\\\\()\\-]{1,100}$",
            "minLength": 1,
            "description": "The unique name of a workflow state responsible for compensating this state if it fails."
          }
        },
        "description": "A workflow state that waits for one or more CloudEvents, then consumes them and invokes one or more actions sequentially or in parallel.",
        "additionalProperties": false
      },
      "eventTimeout": {
        "type": "string",
        "example": "3S",
        "minLength": 1,
        "description": "The maximum duration to wait for the defined events to be received, expressed as an ISO 8601 duration string or an expression that evaluates to one."
      },
      "functionref": {
        "type": "object",
        "oneOf": [
          {
            "type": "string",
            "example": "app.reload",
            "pattern": "^[A-Za-z0-9 ./_\\\\()\\-]{1,100}$",
            "maxLength": 100,
            "minLength": 1,
            "description": "The name of the referenced function."
          },
          {
            "type": "object",
            "required": [
              "refName"
            ],
            "properties": {
              "invoke": {
                "enum": [
                  "SYNC",
                  "ASYNC"
                ],
                "type": "string",
                "default": "SYNC",
                "description": "Specifies whether the function is invoked synchronously or asynchronously."
              },
              "refName": {
                "enum": [
                  "app.reload"
                ],
                "type": "string",
                "description": "The name of the function to invoke."
              },
              "arguments": {
                "type": "object",
                "example": {
                  "appId": "80c6f35f-c9d7-4488-bb5a-ad973b13ec00",
                  "partial": false
                },
                "description": "Arguments to pass to the function.",
                "additionalProperties": true
              },
              "selectionSet": {
                "type": "string",
                "description": "A GraphQL selection set string. Only applicable when the function type is `graphql`."
              }
            },
            "description": "A structured function reference with arguments and invocation options.",
            "additionalProperties": false
          }
        ],
        "example": {
          "refName": "app.reload",
          "arguments": {
            "appId": "80c6f35f-c9d7-4488-bb5a-ad973b13ec00",
            "partial": false
          }
        },
        "description": "A reference to a function to invoke, either as a name string or a structured object."
      },
      "HttpResult": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer"
          },
          "inner": {
            "$ref": "#/components/schemas/HttpResult"
          },
          "title": {
            "type": "string"
          },
          "result": {},
          "context": {
            "type": "string"
          },
          "timestamp": {
            "type": "string"
          }
        }
      },
      "JSONPatch": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "op",
            "path"
          ],
          "properties": {
            "op": {
              "enum": [
                "add",
                "remove",
                "replace",
                "move",
                "copy"
              ],
              "type": "string",
              "description": "The patch operation to perform."
            },
            "path": {
              "type": "string",
              "description": "A JSON Pointer (RFC 6901) identifying the field to patch."
            },
            "value": {
              "$ref": "#/components/schemas/PatchValue"
            }
          },
          "description": "A JSON Patch document as defined by RFC 6902."
        }
      },
      "Link": {
        "required": [
          "href"
        ],
        "properties": {
          "href": {
            "type": "string",
            "description": "The URL of the linked resource."
          }
        }
      },
      "onevents": {
        "type": "object",
        "required": [
          "eventRefs"
        ],
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/action"
            },
            "description": "Actions to perform when the matched events are consumed."
          },
          "eventRefs": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "task1-succeeded",
              "pattern": "^[A-Za-z0-9 ./_\\\\()\\-]{1,100}$",
              "description": "A unique event name defined in the workflow."
            },
            "maxItems": 100,
            "minItems": 1,
            "description": "References to one or more unique event names defined in the workflow events list.",
            "uniqueItems": true
          },
          "actionMode": {
            "enum": [
              "SEQUENTIAL",
              "PARALLEL"
            ],
            "type": "string",
            "default": "SEQUENTIAL",
            "description": "Specifies whether actions are performed sequentially or in parallel."
          }
        },
        "additionalProperties": false
      },
      "OrchMeta": {
        "type": "object",
        "required": [
          "type",
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "0c42b269-51d4-453a-a8ea-55734d209aa9",
            "description": "The unique identifier of the orchestration instance associated with this task in the scheduling service."
          },
          "type": {
            "enum": [
              0,
              1,
              2,
              3
            ],
            "type": "integer",
            "example": 3,
            "description": "The type identifier of the orchestration system handling this task.",
            "x-enum-varnames": [
              "AUTOMATION",
              "DI_PIPELINE",
              "TEMPORAL",
              "MINIBUS"
            ]
          },
          "attrs": {
            "type": "object",
            "example": {
              "last_run_status": "SUCCEEDED",
              "last_run_worker_type": "reloads"
            },
            "description": "Additional attributes of the orchestration instance associated with this task in the scheduling service.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "lastRun": {
            "$ref": "#/components/schemas/OrchRunBase"
          }
        }
      },
      "OrchRun": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OrchRunBase"
          },
          {
            "type": "object",
            "required": [
              "resourceId",
              "taskId",
              "actionId",
              "taskName",
              "taskMeta"
            ],
            "properties": {
              "log": {
                "type": "string",
                "description": "The raw log output from the task run."
              },
              "taskId": {
                "type": "string",
                "description": "The unique identifier of the task."
              },
              "actionId": {
                "type": "string",
                "description": "The unique identifier of the action that was executed."
              },
              "taskMeta": {
                "$ref": "#/components/schemas/taskMetadata"
              },
              "taskName": {
                "type": "string",
                "description": "The name of the task at the time it was run."
              },
              "resourceId": {
                "type": "string",
                "description": "The unique identifier of the resource the task operated on."
              }
            }
          }
        ]
      },
      "OrchRunBase": {
        "type": "object",
        "required": [
          "status",
          "id",
          "workerId",
          "workerType",
          "triggeredBy"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "0c42b269-51d4-453a-a8ea-55734d209aa9",
            "description": "The unique identifier of the task run."
          },
          "status": {
            "enum": [
              "RUNNING",
              "SUCCEEDED",
              "FAILED"
            ],
            "type": "string",
            "example": "SUCCEEDED",
            "description": "The current status of the task run."
          },
          "endedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2018-03-20T09:12:28Z",
            "readOnly": true,
            "description": "The UTC timestamp when the task run ended."
          },
          "workerId": {
            "type": "string",
            "example": "550e8400-e29b-41d4-a716-446655440000",
            "description": "The unique identifier of the worker that executed the job. For example, a reload run carries the reload ID from the engine, and an automation run carries the automation run ID."
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2018-03-20T09:12:28Z",
            "readOnly": true,
            "description": "The UTC timestamp when the task run started."
          },
          "executedAs": {
            "type": "string",
            "example": "z1w_5hWRq-wIxXON_slIRrsF0YxpYjA",
            "description": "The user ID of the user on whose behalf the task was executed."
          },
          "workerType": {
            "type": "string",
            "example": "reloads",
            "description": "The type or name of the target system that executed the run."
          },
          "triggeredBy": {
            "type": "string",
            "example": "manual",
            "description": "The identity or event that triggered the task run."
          }
        }
      },
      "OrchRunList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrchRun"
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "next": {
                "$ref": "#/components/schemas/Link"
              },
              "prev": {
                "$ref": "#/components/schemas/Link"
              },
              "self": {
                "$ref": "#/components/schemas/Link"
              }
            }
          }
        }
      },
      "PatchValue": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "integer"
          },
          {
            "type": "boolean"
          },
          {
            "type": "array",
            "items": {}
          },
          {
            "type": "object"
          }
        ],
        "description": "The value to use in a JSON Patch operation."
      },
      "schedule": {
        "oneOf": [
          {
            "type": "string",
            "minLength": 1,
            "description": "A repeating time interval in ISO 8601 format that defines when workflow instances are automatically created. UTC timezone is assumed."
          },
          {
            "type": "object",
            "oneOf": [
              {
                "example": {
                  "interval": "PT15M"
                },
                "required": [
                  "interval"
                ]
              },
              {
                "required": [
                  "cron"
                ]
              }
            ],
            "properties": {
              "cron": {
                "$ref": "#/components/schemas/crondef"
              },
              "interval": {
                "type": "string",
                "minLength": 1,
                "description": "A repeating time interval in ISO 8601 format that defines when workflow instances are automatically created."
              },
              "timezone": {
                "type": "string",
                "default": "UTC",
                "description": "The timezone name used to evaluate the interval and cron expression. Defaults to `UTC`."
              },
              "recurrence": {
                "type": "string",
                "description": "An RRULE recurrence rule string defining when the workflow recurs."
              },
              "endDateTime": {
                "type": "string",
                "description": "The date and time (ISO 8601 format) when the workflow schedule ends."
              },
              "startDateTime": {
                "type": "string",
                "description": "The date and time (ISO 8601 format) when the workflow schedule begins."
              }
            },
            "description": "A structured schedule definition with optional recurrence, date range, and timezone.",
            "additionalProperties": false
          }
        ]
      },
      "startdef": {
        "type": "object",
        "oneOf": [
          {
            "type": "object",
            "required": [
              "schedule"
            ],
            "properties": {
              "schedule": {
                "$ref": "#/components/schemas/schedule"
              },
              "stateName": {
                "type": "string",
                "pattern": "^[a-z0-9](-?[a-z0-9])*$",
                "minLength": 1,
                "description": "The name of the starting workflow state."
              }
            },
            "description": "A scheduled workflow start definition.",
            "additionalProperties": false
          }
        ],
        "example": {
          "schedule": {
            "recurrence": "RRULE:FREQ=DAILY;INTERVAL=1",
            "startDateTime": "2025-08-31T23:22:27Z"
          }
        },
        "description": "The start definition for a workflow, including optional schedule configuration."
      },
      "stateExecTimeout": {
        "type": "string",
        "example": "3S",
        "minLength": 1,
        "description": "The maximum duration for executing this state, expressed as an ISO 8601 duration string or an expression that evaluates to one."
      },
      "Task": {
        "type": "object",
        "example": {
          "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
          "name": "TaskExample",
          "events": [
            {
              "name": "event1",
              "type": "com.qlik/active-analytics-orch",
              "source": "dataset.updated",
              "correlation": [
                {
                  "contextAttributeName": "appId",
                  "contextAttributeValue": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
                }
              ]
            }
          ],
          "states": [
            {
              "end": true,
              "name": "Reload",
              "type": "event",
              "onEvents": [
                {
                  "actions": [
                    {
                      "name": "app.reload",
                      "functionRef": {
                        "refName": "app.reload",
                        "arguments": {
                          "appId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                          "partial": false
                        }
                      }
                    }
                  ],
                  "eventRefs": [
                    "app1-dataset-updated"
                  ]
                }
              ],
              "exclusive": false
            }
          ],
          "enabled": true,
          "version": "1.0.0",
          "metadata": {
            "usage": "ANALYTICS",
            "ownerId": 0,
            "spaceId": "",
            "trigger": {
              "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
              "type": 4
            },
            "tenantId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "createdAt": "2025-08-31T23:22:27.929Z",
            "createdBy": 0,
            "updatedAt": "2025-08-31T23:27:51.207Z",
            "orchestration": {
              "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
              "type": 3,
              "attrs": {
                "last_run_status": "SUCCEEDED",
                "last_run_endedAt": "2025-08-31T23:28:06Z",
                "last_run_startedAt": "2025-08-31T23:28:04Z",
                "last_run_worker_type": "reloads"
              }
            }
          },
          "keepActive": false,
          "resourceId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
          "description": "this is an example of task response",
          "specVersion": "1.16.0"
        },
        "required": [
          "name",
          "specVersion"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "1111aaaa-bbbb-1a1a-b22b-aaaa1111bbbb2222",
            "readOnly": true,
            "description": "The unique identifier assigned to the task by the service."
          },
          "key": {
            "type": "string",
            "example": "reload",
            "description": "An optional expression used to generate a domain-specific workflow instance identifier."
          },
          "name": {
            "type": "string",
            "example": "Scheduling of demo-app",
            "maxLength": 100,
            "minLength": 1,
            "description": "The name that identifies the workflow definition. Combined with `version`, the name forms a unique identifier for the task.",
            "x-qlik-filterable": true
          },
          "start": {
            "$ref": "#/components/schemas/startdef"
          },
          "events": {
            "$ref": "#/components/schemas/Events"
          },
          "states": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/eventstate"
            },
            "minItems": 1,
            "description": "The list of state definitions that compose the workflow."
          },
          "enabled": {
            "type": "boolean",
            "default": false,
            "description": "Indicates whether the task is enabled. Disabled tasks will not trigger automatically."
          },
          "version": {
            "type": "string",
            "example": "1.0.0",
            "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
            "description": "The semantic version of the workflow definition."
          },
          "metadata": {
            "$ref": "#/components/schemas/taskMetadata"
          },
          "keepActive": {
            "type": "boolean",
            "default": false,
            "description": "When `true`, workflow instances are not terminated when there are no active execution paths. Instances can be ended via a terminate end definition or a configured `workflowExecTimeout`."
          },
          "resourceId": {
            "type": "string",
            "example": "80c6f35f-c9d7-4488-bb5a-ad973b13ec00",
            "description": "The unique identifier of the resource this task operates on. The value supplied in a request body is ignored and is derived automatically from `states`.",
            "x-qlik-filterable": true
          },
          "annotations": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "reload app",
              "description": "A single annotation term."
            },
            "minItems": 1,
            "description": "A list of terms describing the workflow's intended purpose, subject areas, or other important qualities."
          },
          "description": {
            "type": "string",
            "example": "time-schedule reload task for test-app",
            "maxLength": 1024,
            "description": "A human-readable description of the workflow's purpose."
          },
          "specVersion": {
            "type": "string",
            "example": "1.12.0",
            "minLength": 1,
            "description": "The Serverless Workflow specification version used by this task."
          }
        },
        "additionalProperties": false
      },
      "TaskGraph": {
        "type": "object",
        "example": {
          "edges": [
            {
              "attrs": {
                "depth": 1
              },
              "source": "22222222-2222-2222-2222-222222222222",
              "target": "11111111-1111-1111-1111-111111111111"
            }
          ],
          "taskId": "11111111-1111-1111-1111-111111111111",
          "vertices": [
            {
              "attrs": {
                "depth": 0,
                "isChild": false,
                "isParent": true
              },
              "taskId": "11111111-1111-1111-1111-111111111111"
            },
            {
              "attrs": {
                "depth": 1,
                "isChild": true,
                "isParent": false
              },
              "taskId": "22222222-2222-2222-2222-222222222222"
            }
          ]
        },
        "properties": {
          "edges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskGraphEdge"
            },
            "example": [
              {
                "attrs": {
                  "depth": 1
                },
                "source": "22222222-2222-2222-2222-222222222222",
                "target": "11111111-1111-1111-1111-111111111111"
              }
            ]
          },
          "taskId": {
            "type": "string",
            "example": "11111111-1111-1111-1111-111111111111"
          },
          "vertices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskGraphVertex"
            },
            "example": [
              {
                "attrs": {
                  "depth": 0,
                  "isChild": false,
                  "isParent": true
                },
                "taskId": "11111111-1111-1111-1111-111111111111"
              },
              {
                "attrs": {
                  "depth": 1,
                  "isChild": true,
                  "isParent": false
                },
                "taskId": "22222222-2222-2222-2222-222222222222"
              }
            ]
          }
        }
      },
      "TaskGraphEdge": {
        "type": "object",
        "example": {
          "attrs": {
            "depth": 1
          },
          "source": "22222222-2222-2222-2222-222222222222",
          "target": "11111111-1111-1111-1111-111111111111"
        },
        "properties": {
          "attrs": {
            "type": "object",
            "example": {
              "depth": 1
            },
            "additionalProperties": true
          },
          "source": {
            "type": "string",
            "example": "22222222-2222-2222-2222-222222222222"
          },
          "target": {
            "type": "string",
            "example": "11111111-1111-1111-1111-111111111111"
          }
        }
      },
      "TaskGraphVertex": {
        "type": "object",
        "example": {
          "task": {
            "id": "11111111-1111-1111-1111-111111111111",
            "name": "Reload app",
            "enabled": true,
            "version": "1.0.0",
            "resourceId": "80c6f35f-c9d7-4488-bb5a-ad973b13ec00",
            "specVersion": "1.16.0"
          },
          "attrs": {
            "depth": 0
          },
          "taskId": "11111111-1111-1111-1111-111111111111"
        },
        "properties": {
          "task": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Task"
              }
            ],
            "example": {
              "id": "11111111-1111-1111-1111-111111111111",
              "name": "Reload app",
              "enabled": true,
              "version": "1.0.0",
              "resourceId": "80c6f35f-c9d7-4488-bb5a-ad973b13ec00",
              "specVersion": "1.16.0"
            }
          },
          "attrs": {
            "type": "object",
            "example": {
              "depth": 0,
              "isChild": false,
              "isParent": true
            },
            "additionalProperties": true
          },
          "taskId": {
            "type": "string",
            "example": "11111111-1111-1111-1111-111111111111"
          }
        }
      },
      "TaskList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "links": {
            "properties": {
              "next": {
                "$ref": "#/components/schemas/Link"
              },
              "prev": {
                "$ref": "#/components/schemas/Link"
              },
              "self": {
                "$ref": "#/components/schemas/Link"
              }
            }
          }
        }
      },
      "taskMetadata": {
        "type": "object",
        "properties": {
          "usage": {
            "enum": [
              "ANALYTICS",
              "DATA_PREPARATION",
              "DATAFLOW_PREP",
              "SINGLE_TABLE_PREP"
            ],
            "type": "string",
            "example": "ANALYTICS",
            "description": "The product domain in which the resource is used. Defaults to `ANALYTICS` when not present."
          },
          "ownerId": {
            "type": "string",
            "example": "z1w_5hWRq-wIxXON_slIRrsF0YxpYjA",
            "description": "The user ID of the task owner.",
            "x-qlik-filterable": true
          },
          "spaceId": {
            "type": "string",
            "example": "434f9f7c-4eeb-43f0-8f08-88b91f357c07",
            "description": "The unique identifier of the space the task operates in."
          },
          "trigger": {
            "$ref": "#/components/schemas/TriggerMeta"
          },
          "tenantId": {
            "type": "string",
            "example": "rpxzti_ptV0RS4eGPSsaI0SCKl-6h2a",
            "description": "The unique identifier of the tenant the task operates in."
          },
          "topology": {
            "$ref": "#/components/schemas/taskTopology"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2018-03-20T09:12:28Z",
            "readOnly": true,
            "description": "The UTC timestamp when the task was created."
          },
          "createdBy": {
            "type": "string",
            "example": "LP_LlaXYhUUWMr5csy8pFfTHecXePH5Z",
            "description": "The user ID of the user who created the task.",
            "x-qlik-filterable": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2018-03-20T09:12:28Z",
            "readOnly": true,
            "description": "The UTC timestamp when the task was deleted."
          },
          "spaceType": {
            "enum": [
              "personal",
              "shared",
              "managed"
            ],
            "type": "string",
            "example": "shared",
            "description": "The type of space the task operates in."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2018-03-20T09:12:28Z",
            "description": "The UTC timestamp when the task was last updated."
          },
          "disabledCode": {
            "enum": [
              "MANUALLY",
              "CONSECUTIVE-FAILURES",
              "APP-SCRIPT-UPDATED",
              "OWNER-DELETED",
              "OWNER-DISABLED",
              "APP-MOVED-SPACE",
              "OWNER-MOVED"
            ],
            "type": "string",
            "example": "MANUALLY",
            "description": "The reason the task is currently disabled."
          },
          "migratedFrom": {
            "type": "string",
            "example": "c7dba73-dd5a-4725-9dd2-8bd9c8d126d7",
            "description": "The unique identifier of the legacy reload task this task was migrated from, if applicable."
          },
          "resourceName": {
            "type": "string",
            "example": "sample app",
            "description": "The name of the resource on which the task was created."
          },
          "resourceType": {
            "type": "string",
            "example": "app",
            "description": "The type of resource on which the task was created."
          },
          "orchestration": {
            "$ref": "#/components/schemas/OrchMeta"
          },
          "scriptOwnerId": {
            "type": "string",
            "example": "z1w_5hWRq-wIxXON_slIRrsF0YxpYjA",
            "description": "The user ID of the owner whose script context is used when running the task."
          },
          "resourceSubType": {
            "type": "string",
            "example": "script",
            "description": "The subtype of resource on which the task was created."
          }
        },
        "additionalProperties": false
      },
      "taskTopology": {
        "type": "object",
        "properties": {
          "isChild": {
            "type": "boolean",
            "example": false,
            "description": "When `true`, this task is triggered by one or more parent tasks."
          },
          "isParent": {
            "type": "boolean",
            "example": true,
            "description": "When `true`, this task has one or more downstream dependent tasks."
          }
        },
        "description": "Indicates the task's position in a dependency graph.",
        "additionalProperties": false
      },
      "TriggerMeta": {
        "type": "object",
        "required": [
          "type",
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "0c42b269-51d4-453a-a8ea-55734d209aa9",
            "description": "The unique identifier of the trigger associated with this task."
          },
          "type": {
            "enum": [
              0,
              1,
              2,
              3,
              4
            ],
            "type": "integer",
            "example": 1,
            "description": "The type identifier of the trigger associated with this task.",
            "x-enum-varnames": [
              "TIME_SCHEDULE",
              "SINGLE_EVENT",
              "MULTI_EVENT",
              "MIXED",
              "AAO_DATA_UPDATED"
            ]
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://{tenant}.{region}.qlikcloud.com",
      "variables": {
        "region": {
          "default": "us",
          "description": "The region the tenant is hosted in"
        },
        "tenant": {
          "default": "your-tenant",
          "description": "Name of the tenant that will be called"
        }
      }
    }
  ]
}