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

# Cancel specific data integrity job for a destination

> Request cancellation of a data integrity job by ID.



## OpenAPI

````yaml /generated/openapi-generated-2023-12-01.json post /destinations/{destination_id}/data-integrity/{job_id}/cancel
openapi: 3.1.0
info:
  title: Prequel Data Export
  description: Data Export API spec
  version: '2023-12-01'
servers:
  - url: https://api.prequel.co
    description: Cloud-hosted server (US)
  - url: https://eu-api.prequel.co
    description: Cloud-hosted server (EU)
  - url: https://{custom_host}/
    description: Cloud-prem or shared-cloud server
security:
  - ApiKeyAuth: []
paths:
  /destinations/{destination_id}/data-integrity/{job_id}/cancel:
    post:
      tags:
        - Data Integrity
      summary: Cancel specific data integrity job for a destination
      description: Request cancellation of a data integrity job by ID.
      operationId: create-data-integrity-job-cancellation-request
      parameters:
        - name: destination_id
          in: path
          required: true
          description: Destination ID.
          schema:
            type: string
        - name: job_id
          in: path
          required: true
          description: Integrity Job ID.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    $ref: '#/components/schemas/GetDataIntegrityJobResponse'
                    $schema: https://json-schema.org/draft/2020-12/schema
                    $id: >-
                      https://github.com/prequel-co/datafeed/internal/export/api/models/get-data-integrity-job-response
                  message:
                    type: string
                type: object
                required:
                  - status
                  - data
                  - message
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetDataIntegrityJobResponse:
      properties:
        job:
          $ref: '#/components/schemas/DataIntegrityJobResource'
      additionalProperties: false
      type: object
      required:
        - job
    DataIntegrityJobResource:
      properties:
        id:
          type: string
        org_schema:
          type: string
        submitted_at:
          type: string
          format: date-time
          description: Timestamp when the job was submitted.
        started_at:
          type: string
          format: date-time
          description: Timestamp when the job started execution.
        ended_at:
          type: string
          format: date-time
          description: Timestamp when the job ended execution.
        destination_id:
          type: string
          description: The unique identifier of the destination associated with this job.
        status:
          type: string
          description: The current status of the job.
        model_ids:
          items:
            type: string
          type: array
          description: List of model identifiers related to the job.
        model_sample_primary_ids:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
          description: Mapping of primary ids used for sampling in each model.
        data_integrity_results:
          items:
            $ref: '#/components/schemas/DataIntegrityResultResource'
          type: array
          description: Results of the data integrity checks.
        log_message:
          type: string
          description: >-
            A message logging the result of the integrity check for each
            specific model.
      additionalProperties: false
      type: object
      required:
        - id
        - org_schema
        - submitted_at
        - started_at
        - ended_at
        - destination_id
        - status
        - model_ids
        - model_sample_primary_ids
        - data_integrity_results
        - log_message
    ErrorResponse:
      properties:
        status:
          type: string
          const: error
        message:
          type: string
        data:
          type: 'null'
      type: object
      required:
        - status
        - message
    DataIntegrityResultResource:
      properties:
        model_name:
          type: string
          description: Name of the model checked for integrity.
        is_healthy:
          type: boolean
          description: Indicator of whether the model data is healthy.
        error_message:
          type: string
          description: Error message if there is an issue with the data integrity.
        sampling_rate:
          type: number
          description: The rate at which data is sampled for integrity checks.
        total_rows_compared:
          type: integer
          description: Total number of rows compared during the integrity check.
        total_rows_stale:
          type: integer
          description: Number of rows that are outdated or no longer relevant.
        total_rows_pending:
          type: integer
          description: Number of rows pending to be updated or processed.
        total_rows_missing:
          type: integer
          description: Number of rows that are expected but missing.
        total_rows_incorrect:
          type: integer
          description: Number of rows that do not match the expected values.
        total_rows_orphaned:
          type: integer
          description: >-
            Number of rows that exist without corresponding parent entries. This
            is likely due to hard deletes in the source
        mismatched_partitions:
          items:
            $ref: '#/components/schemas/MismatchedPartition'
          type: array
          description: The partitions that did not have matching hashes.
      additionalProperties: false
      type: object
      required:
        - model_name
        - is_healthy
        - error_message
        - sampling_rate
        - total_rows_compared
        - total_rows_stale
        - total_rows_pending
        - total_rows_missing
        - total_rows_incorrect
        - total_rows_orphaned
    MismatchedPartition:
      properties:
        source_row_count:
          type: integer
        destination_row_count:
          type: integer
        last_modified_lower_bound_epoch:
          type: integer
        last_modified_upper_bound_epoch:
          type: integer
      additionalProperties: false
      type: object
      required:
        - source_row_count
        - destination_row_count
        - last_modified_lower_bound_epoch
        - last_modified_upper_bound_epoch
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````