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

# Get Collection

> Get collection details by ID.

Only superadmins (users in the system account) can view collections.



## OpenAPI

````yaml get /api/v1/collections/{collection_id}
openapi: 3.1.0
info:
  title: SnackBase
  description: Open-source Backend-as-a-Service (BaaS)
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/collections/{collection_id}:
    get:
      tags:
        - collections
      summary: Get Collection
      description: |-
        Get collection details by ID.

        Only superadmins (users in the system account) can view collections.
      operationId: get_collection_api_v1_collections__collection_id__get
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: string
            title: Collection Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionResponse'
        '403':
          description: Superadmin access required
        '404':
          description: Collection not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CollectionResponse:
      properties:
        id:
          type: string
          title: Id
          description: Collection ID (UUID)
        name:
          type: string
          title: Name
          description: Collection name
        table_name:
          type: string
          title: Table Name
          description: Physical table name in database
        schema:
          items:
            $ref: '#/components/schemas/SchemaFieldResponse'
          type: array
          title: Schema
          description: Collection schema
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the collection was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When the collection was last updated
      type: object
      required:
        - id
        - name
        - table_name
        - schema
        - created_at
        - updated_at
      title: CollectionResponse
      description: Response for a created collection.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SchemaFieldResponse:
      properties:
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
        required:
          type: boolean
          title: Required
          default: false
        default:
          title: Default
        unique:
          type: boolean
          title: Unique
          default: false
        options:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Options
        collection:
          anyOf:
            - type: string
            - type: 'null'
          title: Collection
        on_delete:
          anyOf:
            - type: string
            - type: 'null'
          title: On Delete
        pii:
          type: boolean
          title: Pii
          default: false
        mask_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mask Type
        expression:
          anyOf:
            - type: string
            - type: 'null'
          title: Expression
        return_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Return Type
      type: object
      required:
        - name
        - type
      title: SchemaFieldResponse
      description: Schema field in collection response.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````