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

# Get attached function

> Returns an attached function by name.



## OpenAPI

````yaml https://api.trychroma.com/openapi.json get /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/functions/{function_name}
openapi: 3.1.0
info:
  title: chroma-frontend
  description: ''
  license:
    name: ''
  version: 1.0.0
servers: []
security: []
paths:
  /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/functions/{function_name}:
    get:
      tags:
        - Function
      summary: Get attached function
      description: Returns an attached function by name.
      operationId: get_attached_function
      parameters:
        - name: tenant
          in: path
          description: Tenant UUID
          required: true
          schema:
            type: string
          example: 1e30d217-3d78-4f8c-b244-79381dc6a254
        - name: database
          in: path
          description: Database name
          required: true
          schema:
            type: string
        - name: collection_id
          in: path
          description: Collection UUID
          required: true
          schema:
            type: string
          example: 1e30d217-3d78-4f8c-b244-79381dc6a254
        - name: function_name
          in: path
          description: Function name
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Attached function retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAttachedFunctionResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Attached function not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetAttachedFunctionResponse:
      type: object
      required:
        - attached_function
      properties:
        attached_function:
          $ref: '#/components/schemas/AttachedFunctionApiResponse'
    ErrorResponse:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
    AttachedFunctionApiResponse:
      type: object
      description: >-
        API response struct for attached function with function_name instead of
        function_id
      required:
        - id
        - name
        - function_name
        - input_collection_id
        - output_collection
        - tenant_id
        - database_id
        - completion_offset
        - min_records_for_invocation
      properties:
        completion_offset:
          type: integer
          format: int64
          description: >-
            Completion offset: the WAL position up to which the attached
            function has processed records
          minimum: 0
        database_id:
          type: string
          description: Database name this attached function belongs to
        function_name:
          type: string
          description: Name of the function (e.g., "record_counter", "statistics")
        id:
          $ref: '#/components/schemas/AttachedFunctionUuid'
          description: Unique identifier for the attached function
        input_collection_id:
          $ref: '#/components/schemas/CollectionUuid'
          description: Source collection that triggers the attached function
        min_records_for_invocation:
          type: integer
          format: int64
          description: >-
            Minimum number of new records required before the attached function
            runs again
          minimum: 0
        name:
          type: string
          description: Human-readable name for the attached function instance
        output_collection:
          type: string
          description: Name of target collection where attached function output is stored
        output_collection_id:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CollectionUuid'
              description: ID of the output collection (lazily filled in after creation)
        params:
          type:
            - string
            - 'null'
          description: Optional JSON parameters for the function
        tenant_id:
          type: string
          description: Tenant name this attached function belongs to
    AttachedFunctionUuid:
      type: string
      format: uuid
      description: >-
        AttachedFunctionUuid is a wrapper around Uuid to provide a type for
        attached function identifiers.
    CollectionUuid:
      type: string
      format: uuid
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-chroma-token

````