> ## 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.



## 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: 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
                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', or
            'failed'.
        data:
          anyOf:
            - items: {}
              type: array
            - type: object
            - type: 'null'
          title: Data
          description: >-
            Resulting data if the request is completed. Can be a dictionary or
            null.
        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:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````