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

# Get code files for a cleaning task

> Retrieve metadata for all code files generated by the cleaning agent for the specified task.



## OpenAPI

````yaml /api-reference/openapi.yml get /agents/cleaning/{cleaningTaskId}/code
openapi: 3.0.3
info:
  title: DataLinks
  version: 2.2.3
servers:
  - url: https://api.datalinks.com/api/v1
    description: production server
security:
  - bearerAuth: []
  - openId:
      - implicit
paths:
  /agents/cleaning/{cleaningTaskId}/code:
    get:
      tags:
        - agents
      summary: Get code files for a cleaning task
      description: >-
        Retrieve metadata for all code files generated by the cleaning agent for
        the specified task.
      operationId: getCleaningTaskCode
      parameters:
        - name: cleaningTaskId
          in: path
          description: The unique identifier of the cleaning task.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: List of code file metadata for the cleaning task.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CleanerAgentCodeFile'
        '404':
          description: The cleaning task does not exist.
components:
  schemas:
    CleanerAgentCodeFile:
      required:
        - content
        - name
      type: object
      properties:
        name:
          type: string
          description: Filename of the code file.
          example: clean.py
        content:
          type: string
          description: Code file content aka the code.
      description: Code file generated by cleaning agent.
  securitySchemes:
    bearerAuth:
      type: http
      description: >
        Use a Bearer token for authentication. Submit the token using the
        `Authorization`

        header: `Authorization: Bearer <token>`.
      scheme: bearer
    openId:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: >-
            https://login.datalinks.com/realms/datalinks-realm/protocol/openid-connect/auth
          scopes:
            openid: openid

````