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

# Get Batch Definition By Id



## OpenAPI

````yaml /api-v2.json get /batch-definitions/id/{definition_id}
openapi: 3.1.0
info:
  title: Meibel AI API
  summary: Meibel Gateway Service
  description: >-
    Our API allows you to interact with our services. Read the
    [docs](https://docs.meibel.ai) to learn how to use it.
  version: 0.6.4
servers:
  - url: https://api.meibel.ai/v2
    description: Meibel API (v2)
  - url: https://api.dev.meibel.ai/v2
    description: Meibel Dev API (v2)
  - url: http://localhost:8000/v2
    description: Local Development
security: []
tags:
  - name: Datasources
    description: v2 datasource management
  - name: Data Elements
    description: v2 data element CRUD and search
  - name: File Upload
    description: Upload files to a datasource and track upload progress
  - name: Ingest
    description: Trigger and monitor datasource ingestion
  - name: Datasource Downloads
    description: Export all datasource content as a zip archive
  - name: Table Descriptions
    description: v2 table and column descriptions
  - name: Metadata Model Catalog
    description: v2 metadata model catalog
  - name: Confidence Scoring
    description: v2 confidence scoring jobs and summaries
  - name: Documents
    description: Parse and transform documents into structured data
  - name: Agents
    description: Agent definition management
  - name: Sessions
    description: Agent session (execution) management and chat
  - name: Artifact Schemas
    description: Agent artifact schema management
paths:
  /batch-definitions/id/{definition_id}:
    get:
      tags:
        - Batch Definitions
      summary: Get Batch Definition By Id
      operationId: getBatchById
      parameters:
        - name: definition_id
          in: path
          required: true
          schema:
            type: string
            title: Definition Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchDefinitionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
      x-codeSamples:
        - lang: Python
          label: Python
          source: |-
            from meibel import MeibelClient

            client = MeibelClient(api_key="your-api-key")

            result = client.batches.get_by_id("definition_id_value")
            print(result)
        - lang: TypeScript
          label: TypeScript
          source: |-
            import { MeibelClient } from 'meibel';

            const client = new MeibelClient({ apiKey: 'your-api-key' });

            const result = await client.batches.getById('definition_id_value');
            console.log(result);
        - lang: Go
          label: Go
          source: |-
            import v2 "github.com/meibel-ai/meibel-go/v2"

            client := v2.NewClient(v2.WithAPIKey("your-api-key"))
            ctx := context.Background()

            result, err := client.Batches.GetById(ctx, "definition_id_value")
            if err != nil {
                log.Fatal(err)
            }
            fmt.Println(result)
components:
  schemas:
    BatchDefinitionResponse:
      properties:
        id:
          type: string
          title: Id
        customer_id:
          type: string
          title: Customer Id
        project_id:
          type: string
          title: Project Id
        name:
          type: string
          title: Name
        version:
          type: string
          title: Version
        parent_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Version
        catalog_urn:
          type: string
          title: Catalog Urn
        agent_urn:
          type: string
          title: Agent Urn
        agent_spec_json:
          additionalProperties: true
          type: object
          title: Agent Spec Json
        input_datasource_id:
          type: string
          title: Input Datasource Id
        filters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Filters
          description: Optional override for the tool's parameters schema
        output_datasource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Datasource Id
        user_message:
          anyOf:
            - type: string
            - type: 'null'
          title: User Message
        concurrency:
          type: integer
          title: Concurrency
        retry_limit:
          type: integer
          title: Retry Limit
        recurrence_cron:
          anyOf:
            - type: string
            - type: 'null'
          title: Recurrence Cron
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          type: string
          title: Created By
        deleted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deleted At
      type: object
      required:
        - id
        - customer_id
        - project_id
        - name
        - version
        - parent_version
        - catalog_urn
        - agent_urn
        - agent_spec_json
        - input_datasource_id
        - concurrency
        - retry_limit
        - created_at
        - created_by
      title: BatchDefinitionResponse
      description: Full BatchDefinition snapshot.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Meibel-API-Key

````