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

# Grok Tasks



## OpenAPI

````yaml /openapi/grok.json post /grok/tasks
openapi: 3.0.0
info:
  title: Grok
  version: 1.0.0
  description: API reference for Grok on Ace Data Cloud.
servers:
  - url: https://api.acedata.cloud
    description: Ace Data Cloud API
security:
  - bearerAuth: []
paths:
  /grok/tasks:
    post:
      summary: Grok Tasks
      operationId: queryGrokTasks
      parameters:
        - in: header
          name: accept
          schema:
            enum:
              - application/json
            type: string
          required: false
          description: Grok Tasks Param Accept
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: Grok Tasks Id
                ids:
                  type: array
                  items:
                    type: string
                  description: Grok Tasks Ids
                action:
                  enum:
                    - retrieve
                    - retrieve_batch
                  type: string
                  default: retrieve
                  description: Grok Tasks Action
              example:
                action: retrieve
                id: task-id
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GrokTaskRecord'
                  - type: object
                    required:
                      - items
                      - count
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/GrokTaskRecord'
                        description: >-
                          Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Items.2A27F03Be540
                      count:
                        type: integer
                        minimum: 0
                        description: >-
                          Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Count.Ad0C1D6B3Ab3
                  - type: object
                    additionalProperties: false
                    description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.2.86C29Ed46E47
              example:
                items: []
                count: 0
          description: Grok Tasks Response 200
        '400':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: token_mismatched
                        message: The specified token is not matched with API.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: token_mismatched
                            description: Grok Tasks Response 400 Error Code
                          message:
                            type: string
                            example: The specified token is not matched with API.
                            description: Grok Tasks Response 400 Error Message
                      trace_id:
                        type: string
                        description: Grok Tasks Response 400 Trace Id
          description: Grok Tasks Response 400
        '401':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: invalid_token
                        message: The specified token is invalid or wrong.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: invalid_token
                            description: Grok Tasks Response 401 Error Code
                          message:
                            type: string
                            example: The specified token is invalid or wrong.
                            description: Grok Tasks Response 401 Error Message
                      trace_id:
                        type: string
                        description: Grok Tasks Response 401 Trace Id
          description: Grok Tasks Response 401
        '500':
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    example:
                      error:
                        code: api_error
                        message: Internal server error.
                      trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            example: api_error
                            description: Grok Tasks Response 500 Error Code
                          message:
                            type: string
                            example: Internal server error.
                            description: Grok Tasks Response 500 Error Message
                      trace_id:
                        type: string
                        description: Grok Tasks Response 500 Trace Id
          description: Grok Tasks Response 500
      security:
        - bearerAuth: []
components:
  schemas:
    GrokTaskRecord:
      type: object
      required:
        - id
        - type
        - created_at
        - trace_id
        - request
      properties:
        id:
          type: string
          description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Id.13919Bb2E478
        type:
          type: string
          description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Type.Fa323177De5C
        trace_id:
          type: string
          description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Trace Id.42F0E89B8E2D
        request:
          $ref: '#/components/schemas/GrokTaskRequestPayload'
        response:
          $ref: '#/components/schemas/GrokTaskResultPayload'
        created_at:
          type: number
          format: double
          description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Created At.4882E909A2Ed
        started_at:
          type: number
          format: double
          description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Started At.F5942F76Aa08
        finished_at:
          type: number
          format: double
          nullable: true
          description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Finished At.Fcd84A81B07C
        elapsed:
          type: number
          format: double
          minimum: 0
          nullable: true
          description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Elapsed.9A16F8Bd5A5B
        user_id:
          type: string
          description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.User Id.00B592Dc5C43
        actor_user_id:
          type: string
          nullable: true
          description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Actor User Id.06Aa9E7B38C9
        api_id:
          type: string
          description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Api Id.3F6A97E247D7
        application_id:
          type: string
          description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Application Id.473Fa3A3Fa6C
        credential_id:
          type: string
          nullable: true
          description: Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Credential Id.9A68A1591940
        authorization_id:
          type: string
          nullable: true
          description: >-
            Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Authorization
            Id.93F34Cefdf8A
    GrokTaskRequestPayload:
      type: object
      additionalProperties: true
      description: >-
        Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Groktaskrequestpayload.4Cb096Bb57C0
    GrokTaskResultPayload:
      type: object
      additionalProperties: true
      description: >-
        Openapi.E517B391Fdc64A30A05Feb88Cb4B0A63.Groktaskresultpayload.D5Dda769A167
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from https://platform.acedata.cloud

````