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

# Get a stack

> Fetches one stack's metadata by ID (pinned cover, live member count, provenance). The response is metadata only and does not include the stack's assets — to get its frames, use `list_assets` with `stack_id`.



## OpenAPI

````yaml https://api.gumnut.ai/openapi.json get /api/stacks/{stack_id}
openapi: 3.1.0
info:
  title: Gumnut API
  description: API for using Gumnut to manage photos and videos
  version: 0.1.0
servers: []
security: []
paths:
  /api/stacks/{stack_id}:
    get:
      tags:
        - stacks
      summary: Get a stack
      description: >-
        Fetches one stack's metadata by ID (pinned cover, live member count,
        provenance). The response is metadata only and does not include the
        stack's assets — to get its frames, use `list_assets` with `stack_id`.
      operationId: get_stack
      parameters:
        - name: stack_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              Stack ID (with `asset_stack_` prefix) to fetch. Obtain from
              `list_stacks`, or from the `stack_id` field carried by any asset
              that belongs to a stack.
            title: Stack Id
          description: >-
            Stack ID (with `asset_stack_` prefix) to fetch. Obtain from
            `list_stacks`, or from the `stack_id` field carried by any asset
            that belongs to a stack.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StackResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    StackResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique stack identifier with 'asset_stack_' prefix
        primary_asset_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Primary Asset Id
          description: >-
            ID of the asset the user pinned as the stack's cover, or null if
            none is pinned. Null for an auto-detected burst unless a user has
            since pinned a cover — there is no server-selected default, so a
            client showing a stack with no pinned cover picks its own. A pinned
            cover that has been trashed keeps its ID here; it is cleared only
            once the asset is permanently deleted.
        asset_count:
          type: integer
          title: Asset Count
          description: >-
            Number of live assets in this stack. Excludes trashed members, so it
            can drop below the number of frames originally grouped.
        origin:
          $ref: '#/components/schemas/StackOrigin'
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When this stack was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When this stack was last updated
      type: object
      required:
        - id
        - asset_count
        - origin
        - created_at
        - updated_at
      title: StackResponse
      description: Represents a group of assets displayed as a single tile.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StackOrigin:
      type: string
      enum:
        - auto_burst
        - user
      title: StackOrigin
      description: >-
        How a stack came to exist.


        `auto_burst` marks a stack the burst detector created from the time +

        EXIF-camera signal; `user` marks a stack a user created or edited
        (manual

        create, set-cover, add/remove, unstack). The distinction is what keeps

        re-detection from stomping a user's correction — the detection pass
        skips

        `user` stacks.
    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

````