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

# Get task data or status

> Retrieve the data (or results) of an enrichment run by the task id. If the request is still processing, the status field will show a 'processing' status, if the request is completed, your data will be returned in the 'data' key. The task_id is provided as a response when you launch an enrichment task.

<Info>
  While a **bulk** task is running the response carries a `progress` object with `total`, `completed`, `failed` and `processing` counts of inputs, so you can tell a task that is advancing from one that is stuck. `failed` covers every finished input that produced no data, clean misses included. It is omitted for single (non-bulk) runs.
</Info>

<Info>
  Pass `include_partial=true` to also get back the rows that have already finished, without waiting for the rest. It is off by default because it makes every poll read the whole result set. Partial `data` covers only the finished rows, so it is **not** aligned to your inputs.
</Info>

<Tip>
  A task that is going nowhere can be stopped with [Cancel a task](/api-reference/endpoint/tasks-cancel), which also refunds what its unfinished requests reserved.
</Tip>


## OpenAPI

````yaml GET /v1/tasks/{task_id}
openapi: 3.1.0
info:
  title: Databar.ai API
  description: >-

    # Authentication


    Databar uses API keys to allow access to the API. You can find your API key
    in your workspace home page, but to use the REST API you’ll first need to
    schedule a call with us.

    Our API expects the API key to be included in all API requests to the server
    in the Header of your request with the key `x-apikey`.

    To find your API key, head over to your Databar workspace and click
    Integrations.


    **Example:**


    `bash

    curl https://api.databar.ai/v1/user/me -H x-apikey: {YOUR_API_KEY}`
  contact:
    email: info@databar.ai
  version: 0.1.2
servers:
  - url: https://api.databar.ai
    description: Production
security: []
paths:
  /v1/tasks/{task_id}:
    get:
      tags:
        - Get enrichment data or status
      summary: Get task data or status
      description: >-
        Retrieve the data (or results) of an enrichment run by the task id. If
        the request is still processing, the status field will show a
        'processing' status, if the request is completed, your data will be
        returned in the 'data' key. The task_id is provided as a response when
        you launch an enrichment task.
      operationId: get_status_request_v1_tasks__task_id__get
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            description: The unique identifier of the task whose status you are querying.
            title: Task Id
          description: The unique identifier of the task whose status you are querying.
        - name: include_partial
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Partial
          description: >-
            While a bulk task is still running, also return the rows that have
            already finished. Off by default: it makes every poll read the whole
            result set.
        - name: x-apikey
          in: header
          required: true
          schema:
            title: API Key
            description: API Key for authentication
          description: API Key for authentication
      responses:
        '200':
          description: The task status along with any associated data or errors.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/app__api__v1__task__Task'
              examples:
                processing:
                  summary: Processing Task
                  value:
                    task_id: abc123
                    status: processing
                    credits_spent: 0
                processing_bulk:
                  summary: Processing Bulk Task
                  value:
                    task_id: abc123
                    status: processing
                    progress:
                      total: 100
                      completed: 42
                      failed: 3
                      processing: 55
                    credits_spent: 4.2
                completed:
                  summary: Completed Task
                  value:
                    task_id: abc123
                    status: completed
                    data:
                      some_key: some_value
                    credits_spent: 12
                failed:
                  summary: Failed Task
                  value:
                    task_id: abc123
                    status: failed
                    error: An error message
                    credits_spent: 0
        '403':
          description: Forbidden access
          content:
            application/json:
              example:
                detail: Forbidden
        '404':
          description: 'Not Found: Task with specified ID does not exist.'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    app__api__v1__task__Task:
      properties:
        task_id:
          type: string
          title: Task Id
          description: Unique identifier of the task.
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: 'Deprecated: use task_id instead. Same value as task_id.'
          deprecated: true
        status:
          type: string
          title: Status
          description: >-
            Current status of the request. Can be 'processing', 'completed',
            'partially_completed', 'failed' or 'cancelled'.
        progress:
          anyOf:
            - additionalProperties:
                type: integer
              type: object
            - type: 'null'
          title: Progress
          description: >-
            How far a bulk run has got: `total`, `completed`, `failed` and
            `processing` counts of inputs. `failed` covers every finished input
            that produced no data, clean misses included. Omitted for single
            (non-bulk) runs.
        data:
          anyOf:
            - items: {}
              type: array
            - type: object
            - type: 'null'
          title: Data
          description: >-
            Resulting data once completed. For bulk runs this is an array
            aligned to the inputs: one element per input, in the same order they
            were submitted, with null for inputs that returned no data
            (len(data) equals the number of inputs, and data[i] is the result
            for input i). A single (non-bulk) run returns the result object
            directly.
        error:
          anyOf:
            - items:
                type: string
              type: array
            - type: string
            - type: 'null'
          title: Error
          description: Error message if the request has failed.
        credits_spent:
          type: number
          title: Credits Spent
          description: Total credits spent for this request.
          default: 0
      type: object
      required:
        - task_id
        - status
      title: Task
    HTTPValidationError:
      properties:
        error:
          type: string
          title: Error
          description: VALIDATION_ERROR
        detail:
          type: string
          title: Detail
          description: Human-readable summary, one problem per field joined by '; '.
        fields:
          type: array
          title: Fields
          items:
            type: object
            properties:
              loc:
                items:
                  type: string
                type: array
              msg:
                type: string
            required:
              - loc
              - msg
      type: object
      required:
        - error
        - detail
      title: HTTPValidationError

````

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