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

# Get Log Chunk

> Retrieve a specific chunk of logs by its index



## OpenAPI

````yaml GET /chunk
openapi: 3.0.3
info:
  title: Logging API
  description: >-
    API for uploading, retrieving, and managing log chunks in a distributed
    logging system
  version: 1.0.0
  contact:
    name: API Support
servers:
  - url: https://logging.monolisk.co
    description: Production server
  - url: http://localhost:8787
    description: Development server
security:
  - bearerAuth: []
tags:
  - name: logs
    description: Log management operations
  - name: chunks
    description: Chunk-specific operations
paths:
  /chunk:
    get:
      summary: Get specific chunk
      description: Retrieve a specific chunk of logs by its index
      operationId: getLogChunk
      parameters:
        - name: jobId
          in: query
          required: true
          description: The job ID to retrieve the chunk for
          schema:
            type: string
            example: job-123
        - name: chunkIndex
          in: query
          required: true
          description: The index of the chunk to retrieve (0-based)
          schema:
            type: integer
            minimum: 0
            example: 0
      responses:
        '200':
          description: Log chunk data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChunkedLogPart'
              example:
                jobId: job-123
                jobMeta:
                  jobType: build
                  gameId: game-456
                  placeId: 789
                  placeName: Main Place
                  startTime: '2025-01-01T00:00:00Z'
                  runtime: 5000
                chunkIndex: 0
                totalChunks: 3
                isChunked: true
                groups:
                  group1:
                    id: group1
                    name: Build Process
                    format:
                      color:
                        - 0
                        - 255
                        - 0
                      bold: true
                messages:
                  - groupId: group1
                    content: Starting build process...
                    time: 1704067200000
                    type: info
        '400':
          description: Missing or invalid parameters
          content:
            text/plain:
              schema:
                type: string
                enum:
                  - Missing jobId
                  - Missing chunkIndex
                  - Invalid chunkIndex
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Chunk not found
          content:
            text/plain:
              schema:
                type: string
                example: Chunk not found
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '500':
          description: Error retrieving chunk
          content:
            text/plain:
              schema:
                type: string
                example: Error retrieving chunk
      security:
        - bearerAuth: []
components:
  schemas:
    ChunkedLogPart:
      allOf:
        - $ref: '#/components/schemas/LogsChunk'
        - type: object
          required:
            - chunkIndex
            - totalChunks
            - isChunked
          properties:
            chunkIndex:
              type: integer
              description: Index of this chunk (0-based)
              minimum: 0
              example: 0
            totalChunks:
              type: integer
              description: Total number of chunks for this job
              minimum: 1
              example: 3
            isChunked:
              type: boolean
              description: Always true for chunked log parts
              example: true
    LogsChunk:
      type: object
      required:
        - groups
        - messages
        - jobId
        - jobMeta
      properties:
        groups:
          type: object
          description: Map of group IDs to group definitions
          additionalProperties:
            $ref: '#/components/schemas/LogChunkGroup'
          example:
            group1:
              id: group1
              name: Build Process
              format:
                color:
                  - 0
                  - 255
                  - 0
                bold: true
        messages:
          type: array
          description: Array of log messages
          items:
            $ref: '#/components/schemas/LogMessage'
        jobId:
          type: string
          description: Unique job identifier
          example: job-123
        jobMeta:
          $ref: '#/components/schemas/JobMetadata'
    LogChunkGroup:
      type: object
      required:
        - name
        - id
      properties:
        name:
          type: string
          description: Display name of the group
          example: Build Process
        id:
          type: string
          description: Unique identifier for the group
          example: group1
        format:
          $ref: '#/components/schemas/LogChunkGroupFormat'
        parent:
          type: string
          description: ID of the parent group
          example: parentGroup1
    LogMessage:
      type: object
      required:
        - groupId
        - content
        - time
        - type
      properties:
        groupId:
          type: string
          description: ID of the group this message belongs to
          example: group1
        content:
          type: string
          description: The log message content
          example: Build completed successfully
        time:
          type: integer
          description: Timestamp in milliseconds
          example: 1704067200000
        type:
          type: string
          enum:
            - error
            - output
            - warning
            - info
            - special
          description: Type of log message
          example: info
    JobMetadata:
      type: object
      required:
        - jobType
        - gameId
        - startTime
        - runtime
      properties:
        jobType:
          type: string
          description: Type of job
          example: build
        jobId:
          type: string
          description: Unique job identifier
          example: job-123
        gameId:
          type: string
          description: Game identifier
          example: game-456
        placeId:
          type: integer
          description: Place identifier
          example: 789
        placeName:
          type: string
          description: Name of the place
          example: Main Place
        startTime:
          type: string
          format: date-time
          description: Job start time in ISO format
          example: '2025-01-01T00:00:00Z'
        runtime:
          type: integer
          description: Job runtime in milliseconds
          example: 5000
    LogChunkGroupFormat:
      type: object
      description: Formatting options for log groups
      properties:
        color:
          type: array
          description: RGB color values
          items:
            type: integer
            minimum: 0
            maximum: 255
          minItems: 3
          maxItems: 3
          example:
            - 255
            - 0
            - 0
        bold:
          type: boolean
          description: Whether text should be bold
          example: true
        italic:
          type: boolean
          description: Whether text should be italic
          example: false
  responses:
    Unauthorized:
      description: Authentication required
      content:
        text/plain:
          schema:
            type: string
            example: Unauthorized
    Forbidden:
      description: Insufficient permissions
      content:
        text/plain:
          schema:
            type: string
            example: Forbidden
    MethodNotAllowed:
      description: HTTP method not allowed for this endpoint
      content:
        text/plain:
          schema:
            type: string
            example: Method Not Allowed
      headers:
        Allow:
          description: Allowed HTTP methods
          schema:
            type: string
            example: GET, POST
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Authorization header with Bearer token

````