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

# List Sync Runs

> List all sync runs under a sync



## OpenAPI

````yaml https://api.hightouch.io/api/swagger.json get /syncs/{syncId}/runs
openapi: 3.0.0
info:
  title: Hightouch API
  version: 1.0.0
  description: Hightouch Public Rest API to access syncs, models, sources and destinations
  contact:
    name: Hightouch
    url: https://hightouch.com
servers:
  - url: https://api.hightouch.com/api/v1
security: []
paths:
  /syncs/{syncId}/runs:
    get:
      summary: List Sync Runs
      description: List all sync runs under a sync
      operationId: ListSyncRuns
      parameters:
        - in: path
          name: syncId
          required: true
          schema:
            type: number
            format: double
        - description: query for specific run id
          in: query
          name: runId
          required: false
          schema:
            type: number
            format: double
        - description: select sync runs that are started after given ISO timestamp
          in: query
          name: after
          required: false
          schema:
            type: string
            format: date-time
        - description: select sync runs that are started before certain ISO timestamp
          in: query
          name: before
          required: false
          schema:
            type: string
            format: date-time
        - description: select sync runs that are started within last given minutes
          in: query
          name: within
          required: false
          schema:
            type: number
            format: double
        - description: set the offset on results (for pagination)
          in: query
          name: offset
          required: false
          schema:
            default: 0
            format: double
            type: number
        - description: limit the number of objects returned (default is 100)
          in: query
          name: limit
          required: false
          schema:
            default: 100
            format: double
            type: number
        - description: specify the order
          in: query
          name: orderBy
          required: false
          schema:
            default: id
            type: string
            enum:
              - id
              - createdAt
              - startedAt
              - finishedAt
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                properties:
                  hasMore:
                    type: boolean
                  data:
                    items:
                      $ref: '#/components/schemas/SyncRun'
                    type: array
                required:
                  - hasMore
                  - data
                type: object
              examples:
                Example 1:
                  value:
                    data:
                      - id: 42
                        startedAt: '2022-02-08T16:11:04.712Z'
                        createdAt: '2022-02-08T16:11:04.712Z'
                        finishedAt: '2022-02-08T16:11:11.698Z'
                        querySize: 773
                        status: success
                        completionRatio: 0.54
                        plannedRows:
                          addedCount: 773
                          changedCount: 0
                          removedCount: 0
                        successfulRows:
                          addedCount: 773
                          changedCount: 0
                          removedCount: 0
                        failedRows:
                          addedCount: 0
                          changedCount: 0
                          removedCount: 0
                        error: null
                      - id: 43
                        startedAt: '2022-02-08T16:11:04.712Z'
                        createdAt: '2022-02-08T17:44:05.198Z'
                        finishedAt: '2022-02-08T17:44:25.366Z'
                        querySize: 773
                        status: success
                        completionRatio: 0.54
                        plannedRows:
                          addedCount: 0
                          changedCount: 765
                          removedCount: 0
                        successfulRows:
                          addedCount: 0
                          changedCount: 765
                          removedCount: 0
                        failedRows:
                          addedCount: 0
                          changedCount: 0
                          removedCount: 0
                        error: null
                    hasMore: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '422':
          description: Validation Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateErrorJSON'
      security:
        - bearerAuth: []
components:
  schemas:
    SyncRun:
      properties:
        id:
          type: number
          format: double
          description: The sync run's id
        createdAt:
          type: string
          format: date-time
          description: >-
            The timestamp when sync run was created. In most cases this will be

            equivalent to `startedAt`, but it may be earlier if the sync was
            triggered

            while a run was already in progress, and the new run didn't start
            for

            a while.
        startedAt:
          type: string
          format: date-time
          description: The timestamp when the sync run started
        finishedAt:
          type: string
          format: date-time
          description: The timestamp when the sync run finished
        querySize:
          type: number
          format: double
          description: The number of rows in the query.
        status:
          $ref: '#/components/schemas/SyncRunStatus'
          description: The status of sync run
        completionRatio:
          type: number
          format: double
          description: The completion ratio of sync run, showing the progress of a sync run
        plannedRows:
          properties:
            removedCount:
              type: number
              format: double
              description: The number of removed rows.
            changedCount:
              type: number
              format: double
              description: The number of changed rows.
            addedCount:
              type: number
              format: double
              description: The number of added rows.
          required:
            - removedCount
            - changedCount
            - addedCount
          type: object
          description: >-
            The number of planned rows that this sync run was supposed to
            execute.


            Note that the counts for `successfulRows` and `failedRows` may not
            add up

            to `plannedRows` if the sync was cancelled.
        successfulRows:
          properties:
            removedCount:
              type: number
              format: double
              description: The number of successful removes.
            changedCount:
              type: number
              format: double
              description: The number of successful changes.
            addedCount:
              type: number
              format: double
              description: The number of successful adds.
          required:
            - removedCount
            - changedCount
            - addedCount
          type: object
          description: >-
            The number of rows that were successfully processed by the
            destination.
        failedRows:
          properties:
            removedCount:
              type: number
              format: double
              description: The number of failed removes.
            changedCount:
              type: number
              format: double
              description: The number of failed changes.
            addedCount:
              type: number
              format: double
              description: The number of failed adds.
          required:
            - removedCount
            - changedCount
            - addedCount
          type: object
          description: >-
            The number of rows that we attempted to sync, but were rejected by
            the

            destination.


            This does not include rows that weren't attempted due to the sync
            being

            cancelled.
        error:
          type: string
          description: Error message if the sync run didn't finish successfully
      required:
        - id
        - createdAt
        - startedAt
        - finishedAt
        - querySize
        - status
        - completionRatio
        - plannedRows
        - successfulRows
        - failedRows
      type: object
      additionalProperties: false
    ValidateErrorJSON:
      properties:
        message:
          type: string
          enum:
            - Validation failed
          nullable: false
        details:
          properties: {}
          additionalProperties: {}
          type: object
      required:
        - message
        - details
      type: object
      additionalProperties: false
    SyncRunStatus:
      description: The status of sync runs
      enum:
        - cancelled
        - failed
        - queued
        - success
        - warning
        - querying
        - processing
        - reporting
        - interrupted
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bearer

````