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

# Execute Job

> Executes the specified job.



## OpenAPI

````yaml /26.2/en/rest-api/openapi-v1.json post /executeJob
openapi: 3.0.1
info:
  title: CData OpenAPI
  version: 26.2.0
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://sync.example.com/api.rsc
        description: >-
          Base URL of your Sync instance, including scheme and application path
          (e.g. https://sync.example.com/api.rsc).
security: []
paths:
  /executeJob:
    post:
      tags:
        - executeJob
      summary: Execute Job
      description: Executes the specified job.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/executeJob_input'
      responses:
        '200':
          description: The action result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/executeJob_output'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CDataError'
      security:
        - basic: []
        - authtoken_header: []
        - authtoken_query: []
components:
  schemas:
    executeJob_input:
      type: object
      properties:
        JobId:
          type: string
          description: The id of the job to run.
        WorkspaceId:
          type: string
          description: The id of WorkspaceId.
          default: default
        JobName:
          type: string
          description: The name of the job to run.
        WaitForResults:
          type: string
          description: >-
            Wait for the Job to complete and return the results of each task
            ran. Defaults to true.
          default: 'true'
        Timeout:
          type: string
          description: >-
            Timeout in seconds that controls how long Sync should wait for a
            previous execution to complete.
          default: '0'
        ResyncOptions:
          type: string
          description: >-
            Comma-separated re-sync options that override replicate options,
            e.g. Period=FromBeginning,WriteMode=Drop.
    executeJob_output:
      type: array
      items:
        type: object
        properties:
          JobName:
            description: The job name.
            type: string
          Status:
            type: string
            description: The job execution result.
          Query:
            type: string
            description: The last executed query.
          Result:
            type: string
            description: The executed result of the last query.
          Detail:
            type: string
            description: The job execution detail.
          RunStartDate:
            type: string
            description: The job run start date.
          QueryStatus:
            type: string
            description: The status of last executed query.
    CDataError:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CDataInError'
    CDataInError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    basic:
      scheme: basic
      type: http
    authtoken_header:
      type: apiKey
      in: header
      name: x-cdata-authtoken
    authtoken_query:
      type: apiKey
      in: query
      name: '@authtoken'

````