> ## Documentation Index
> Fetch the complete documentation index at: https://docs.occtoo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# queuedTaskById

> Gets a queued task of the current tenant by its global id. Null when there is none.



**query** `queuedTaskById(id: ID!): QueuedTask`

## Arguments

**`id`**: `ID!` (required)

Global id of the task (`QueuedTask.id`).

## Returns

`QueuedTask`

**`artifacts`**: `[QueuedTaskArtifact!]!`

The files this task wrote or is writing.

---

**`awaitingConfirmation`**: `Boolean!`

True while the task is prepared and waits for confirmQueuedTask before it writes anything.

---

**`configuration`**: `TaskConfiguration!`

The choices the task was queued with.

---

**`createdAt`**: `DateTime!`

When the task was queued (UTC).

---

**`createdBy`**: `UUID!`

Who queued the task.

---

**`details`**: `TaskDetails!`

What the task was queued to do and how it is going, in one place.

---

**`expiresAt`**: `DateTime!`

When the task and the files it wrote stop being kept.

---

**`id`**: `ID!`

Global id of the task. `queuedTaskById`, `cancelQueuedTask`, `retryQueuedTask` and `confirmQueuedTask` take it. The `id` filter in `queuedTasks(where:)` takes the raw UUID.

---

**`lastUpdatedAt`**: `DateTime!`

When the task last changed (UTC), such as a new status or progress.

---

**`progress`**: `Float`

Percentage complete, or null while the total is still unknown.

---

**`state`**: `TaskState!`

What the task reports about itself while it runs and once it is done.

---

**`status`**: `TaskStatus!`

Where the task is in its lifecycle.

---

**`tenantId`**: `ID!`

Global id of the tenant that owns the task.

---

**`type`**: `TaskType!`

Which kind of work the task carries out.

## Examples

```graphql Query
query QueuedTaskById($id: ID!) {
  queuedTaskById(id: $id) {
    artifacts {
      available
      completedAt
      createdAt
      filename
      kind
      sizeBytes
    }
    awaitingConfirmation
    configuration {
      __typename
      ... on CardsImportConfiguration {
        cardDefinitionId
        delimiter
        filename
        format
      }
    }
    createdAt
    createdBy
    details {
      __typename
      ... on CardsImportDetails {
        analysisResult {
          __typename
        }
        cardDefinitionId
        delimiter
        errorFileUrl
        failedRecords
        filename
      }
    }
  }
}
```

```json Variables
{
  "id": "id"
}
```

```json Response
{
  "data": {
    "queuedTaskById": {
      "artifacts": [
        {
          "available": true,
          "completedAt": "value",
          "createdAt": "value",
          "filename": "string",
          "kind": "INPUT",
          "sizeBytes": "value"
        }
      ],
      "awaitingConfirmation": true,
      "configuration": {
        "__typename": "CardsImportConfiguration",
        "cardDefinitionId": "string",
        "delimiter": "string",
        "filename": "string",
        "format": "EXCEL"
      },
      "createdAt": "value",
      "createdBy": "value",
      "details": {
        "__typename": "CardsImportDetails",
        "analysisResult": {
          "__typename": "AnalysisResult"
        },
        "cardDefinitionId": "string",
        "delimiter": "string",
        "errorFileUrl": "string",
        "failedRecords": "value",
        "filename": "string"
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.