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

# Create Task

> Creates a new tasks object with the specified parameters.



## OpenAPI

````yaml /26.2/en/rest-api/openapi-v1.json post /tasks
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:
  /tasks:
    post:
      tags:
        - tasks
      summary: Create Task
      description: Creates a new tasks object with the specified parameters.
      operationId: createtasks
      requestBody:
        description: The tasks entity to post
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tasks'
        required: true
      responses:
        '201':
          description: tasks created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tasks'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CDataError'
      security:
        - basic: []
        - authtoken_header: []
        - authtoken_query: []
components:
  schemas:
    tasks:
      type: object
      properties:
        TaskId:
          description: The id of current task.
          type: integer
          format: int64
        JobName:
          description: The name of the job contain the current task.
          type: string
        JobId:
          description: The id of the job contain the current task.
          type: string
        Index:
          description: The index of task.
          type: string
        Query:
          description: The query of task.
          type: string
        Table:
          description: The table name of query.
          type: string
        IsActive:
          description: Whether the task is active.
          type: boolean
        RowVersion:
          description: The version number of row information.
          type: string
      required:
        - JobName
    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'

````