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

# List task statuses of a job

> Not available for Load Folder jobs. For jobs using the new status table (`statusversion >= 26.3`), running task responses may populate `affected_rows` from the ReplicateEngine realtime status table. `affected_rows` is nullable: an unavailable count is `null`, including while running when a live count cannot be obtained. A known zero remains `0`. Clients that previously checked for `-1` must handle `null` instead; counts from an earlier independent job run are not used as a fallback. An automatic retry is another attempt of the same run, not a separate run. During `RETRY RUNNING`, the live total includes retained writes from an earlier partial-success attempt when the retry preserves them. Retries that drop, truncate, or refresh destination data use only the current attempt's count. If the retained baseline or current live count is unavailable, the total is null. Per-operation live counts are also cumulative when both attempts report that metric, or null when a contribution is unknown. Completed tasks use the final task history value as the authoritative count without adding the baseline again. These counts are affected-row totals, not destination table sizes or counts of distinct records. Running task `runtime` is calculated from the current attempt's start time when queried; temporary progress is not written back to task history.



## OpenAPI

````yaml /26.4/en/rest-api/openapi-v2.json get /v2/jobs/{job_id}/tasks/status
openapi: 3.0.3
info:
  title: CData Sync API
  description: >-
    REST API (v2) for CData Sync. The API lets you manage workspaces,
    connections, jobs, transformations, pipelines, and users, and to run and
    monitor data replication and transformation work.


    ## Base path

    All endpoints are served under the `/api.rsc` application path, e.g.
    `https://your-sync-host/api.rsc/v2/workspaces`.


    ## Authentication

    Requests are authenticated with an auth token passed in the
    `x-cdata-authtoken` header, or with HTTP Basic authentication using a Sync
    user's credentials. A token can be generated via `POST
    /v2/users/generate-token`.


    ## Response envelope

    Successful read/write responses return a JSON **array** of objects, even
    when a single resource is requested (the array then contains one element).
    `count` endpoints return an array containing a single `{ "count": <n> }`
    object. `DELETE` operations return `204 No Content`.


    ## Date/time format

    Date/time values are formatted as `yyyy-MM-dd'T'HH:mm:ssZZZ` (ISO-8601 with
    timezone offset). The format is also echoed in the `X-DateTime-Format`
    response header.


    ## Roles

    Most endpoints require the `cdata_user` role; workspace and user management
    endpoints require the `cdata_admin` role.
  version: '2.0'
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://sync.example.com/api.rsc/v2
        description: >-
          Base URL of your Sync instance, including scheme and application path
          (e.g. https://sync.example.com/api.rsc/v2).
security:
  - ApiKeyAuth: []
  - BasicAuth: []
tags:
  - name: Workspaces
    description: Manage workspaces and their child resources.
  - name: Connections
    description: Manage connections and inspect connection metadata.
  - name: Jobs
    description: Manage replication jobs, their tasks, history, and execution.
  - name: Transformations
    description: Manage transformations, their tasks, history, and execution.
  - name: Pipelines
    description: Manage pipelines, steps, events, history, and execution.
  - name: Users
    description: Manage users and generate auth tokens.
  - name: Vaults
    description: Manage vault registrations and the secrets stored in the Local vault.
  - name: Search
    description: Search accessible resources across workspaces.
paths:
  /v2/jobs/{job_id}/tasks/status:
    parameters:
      - $ref: '#/components/parameters/JobId'
    get:
      tags:
        - Jobs
      summary: List task statuses of a job
      description: >-
        Not available for Load Folder jobs. For jobs using the new status table
        (`statusversion >= 26.3`), running task responses may populate
        `affected_rows` from the ReplicateEngine realtime status table.
        `affected_rows` is nullable: an unavailable count is `null`, including
        while running when a live count cannot be obtained. A known zero remains
        `0`. Clients that previously checked for `-1` must handle `null`
        instead; counts from an earlier independent job run are not used as a
        fallback. An automatic retry is another attempt of the same run, not a
        separate run. During `RETRY RUNNING`, the live total includes retained
        writes from an earlier partial-success attempt when the retry preserves
        them. Retries that drop, truncate, or refresh destination data use only
        the current attempt's count. If the retained baseline or current live
        count is unavailable, the total is null. Per-operation live counts are
        also cumulative when both attempts report that metric, or null when a
        contribution is unknown. Completed tasks use the final task history
        value as the authoritative count without adding the baseline again.
        These counts are affected-row totals, not destination table sizes or
        counts of distinct records. Running task `runtime` is calculated from
        the current attempt's start time when queried; temporary progress is not
        written back to task history.
      operationId: listJobTaskStatus
      responses:
        '200':
          description: Task statuses
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TaskStatus'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    JobId:
      name: job_id
      in: path
      required: true
      description: Job identifier.
      schema:
        type: string
  schemas:
    TaskStatus:
      type: object
      additionalProperties: false
      properties:
        task_id:
          type: string
        job_history_id:
          type: string
          nullable: true
          description: >-
            Job execution owning the effective task history; null when a
            matching history is not yet available.
        index:
          type: integer
        query:
          type: string
        status:
          type: string
          description: >-
            The task run status, e.g. QUEUED, RUNNING, SUCCESS, RETRY SUCCESS,
            PARTIAL_SUCCESS, RETRY PARTIAL_SUCCESS, FAILED, RETRY FAILED, ERROR,
            or SKIPPED. PARTIAL_SUCCESS (and RETRY PARTIAL_SUCCESS) indicates
            that at least one chunk succeeded and at least one chunk failed; the
            task is retried when Automatic Retry is enabled.
        details:
          type: string
          description: >-
            A detailed message for the status. For failed or partial-success
            tasks this is the error message; for successful tasks it is a
            summary such as "Records affected: N". Returned as a flat string for
            backward compatibility.
        run_type:
          type: string
          nullable: true
          description: >-
            Replication run type reported by ReplicateEngine for upgraded jobs
            (`statusversion >= 26.3`), e.g. FULL_SNAPSHOT, INCREMENTAL_SNAPSHOT,
            PARTITIONED_SNAPSHOT, INCREMENTAL, or CDC. Null when unavailable.
        start_position:
          type: string
          nullable: true
          description: >-
            Position the run started from, such as a timestamp or CDC position.
            Null when unavailable.
        last_checkpoint:
          type: string
          nullable: true
          description: Last checkpoint reached by the run. Null when unavailable.
        records_inserted:
          type: integer
          format: int64
          nullable: true
          description: >-
            Records inserted by the run, summed across automatic retries that
            keep previous writes. Null when unavailable.
        records_merged:
          type: integer
          format: int64
          nullable: true
          description: >-
            Records merged by the run, summed across automatic retries that keep
            previous writes. Null when unavailable.
        records_deleted:
          type: integer
          format: int64
          nullable: true
          description: >-
            Records deleted by the run, summed across automatic retries that
            keep previous writes. Null when unavailable.
        error_message:
          type: string
          nullable: true
          description: >-
            Error message of a failed or partially successful completed run.
            Null otherwise.
        affected_rows:
          type: integer
          nullable: true
          description: >-
            Records affected by the task, or null when the count is unavailable.
            A known zero is 0. Unknown counts are not represented by -1 or a
            count from an earlier independent job run. An automatic retry is
            another attempt of the same run. For upgraded jobs (`statusversion
            >= 26.3`), running tasks may return a realtime value from the
            ReplicateEngine status table. During RETRY RUNNING, the total
            includes retained writes from an earlier partial-success attempt
            when the retry preserves them. Retries that drop, truncate, or
            refresh destination data use only the current attempt's count. If
            the retained baseline or current live count is unavailable, the
            total is null. Completed tasks use the final task history value
            without adding the baseline again. This is an affected-row total,
            not the destination table size or a count of distinct records.
        runtime:
          type: string
          description: >-
            Elapsed time from the current attempt start while running; final
            stored runtime after completion.
        last_run_at:
          type: string
          format: date-time
        run_start_at:
          type: string
          format: date-time
        instance_id:
          type: string
        source_table:
          type: string
        destination_table:
          type: string
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type: integer
          description: HTTP status code.
        message:
          type: string
          description: Short status message.
        error:
          type: string
          description: Detailed error description.
        error_code:
          type: string
          description: >-
            Stable Vault error category when the failure originated from a Vault
            operation.
          enum:
            - INVALID_REFERENCE
            - PROVIDER_NOT_FOUND
            - ITEM_NOT_FOUND
            - PROVIDER_UNAVAILABLE
            - AUTHENTICATION_FAILED
            - PERMISSION_DENIED
            - TYPE_MISMATCH
            - INVALID_REGISTRATION
            - READ_ONLY
            - UNKNOWN
        provider_id:
          type: string
          description: Vault provider identifier when safe and applicable.
        item_name:
          type: string
          description: Vault item name when safe and applicable.
  responses:
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The caller does not have permission to access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-cdata-authtoken
      description: A Sync user auth token. Generate one via POST /v2/users/generate-token.
    BasicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication with a Sync user's username and API Token.

````

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