> ## Documentation Index
> Fetch the complete documentation index at: https://sl-6d1f19fe-mintlify-ff95e355.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a playlist

> Fetches an object given its ID.



## OpenAPI

````yaml https://api.streamloop.app/v1/openapi.json get /playlists/{id}
openapi: 3.1.0
info:
  contact:
    name: Streamloop
    url: https://streamloop.app
  description: >-
    The Streamloop REST API. Authenticate with either an `X-API-Key` header (a
    Streamloop API key, prefix `sl_` — simplest for programmatic clients) or an
    OAuth 2.1 bearer access token (obtain one via https://auth.streamloop.app).
    Collections are cursor-paginated (`limit` + `cursor`, returning `{ data,
    page }`). Errors are RFC 7807 problem documents.
  summary: >-
    Programmatic access to Streamloop — create and control 24/7 loop streams,
    manage media, destinations, playlists, and billing.
  title: Streamloop API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.streamloop.app/v1
security:
  - oauth2: []
  - bearerAuth: []
  - apiKey: []
tags:
  - description: The authenticated user's account.
    name: account
  - description: Credits, usage analytics, invoices, and top-ups.
    name: billing
  - description: Crypto deposit options for topping up credits.
    name: crypto
  - description: Manage streaming destinations (custom RTMP).
    name: destinations
  - description: 'Service metadata: status and the OpenAPI document (unauthenticated).'
    name: meta
  - description: Manage and publish stream playlists.
    name: playlists
  - description: Create, control, schedule, and monitor 24/7 loop streams.
    name: streams
  - description: Upload and manage source media (video/audio).
    name: uploads
paths:
  /playlists/{id}:
    get:
      tags:
        - playlists
      summary: Get a playlist
      description: Fetches an object given its ID.
      operationId: getPlaylist
      parameters:
        - description: Resource identifier.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/Playlist'
                  - type: 'null'
          description: Successful response.
          headers:
            RateLimit-Limit:
              description: Requests allowed per window.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests remaining in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Missing or invalid access token.
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The token lacks the required scope or access to the resource.
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The resource does not exist or is not visible to the caller.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request body or parameters are invalid.
        '429':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Rate limit exceeded. Retry after the indicated delay.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
        '502':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The upstream data service returned an error.
      security:
        - oauth2:
            - streamloop:read
        - bearerAuth: []
        - apiKey: []
components:
  schemas:
    Playlist:
      properties:
        copiedFrom:
          type:
            - string
            - 'null'
        createdAt:
          format: date-time
          type: string
        diff:
          description: |-
            Snapshot-vs-draft diff (B-13 first-occurrence-by-objectId
            algorithm; zero-distance items go in `unchanged`, not `moved`;
            duplicate objectIds matched positionally). When no snapshot exists,
            diff = { unchanged: items, added: [], removed: [], moved: [] }.
          properties:
            added:
              items:
                properties:
                  id:
                    type: string
                  objectID:
                    type: string
                  position:
                    description: >-
                      0-based; positions for a playlist form {0..N-1} exactly.
                      Enforced by mutation layer (full-rewrite) and unique
                      index.
                    type: integer
                required:
                  - id
                  - objectID
                  - position
                type: object
              type: array
            moved:
              items:
                properties:
                  fromPosition:
                    type: integer
                  item:
                    properties:
                      id:
                        type: string
                      objectID:
                        type: string
                      position:
                        description: >-
                          0-based; positions for a playlist form {0..N-1}
                          exactly. Enforced by mutation layer (full-rewrite) and
                          unique index.
                        type: integer
                    required:
                      - id
                      - objectID
                      - position
                    type: object
                  toPosition:
                    type: integer
                required:
                  - fromPosition
                  - item
                  - toPosition
                type: object
              type: array
            removed:
              description: >-
                May reference deleted PlaylistItem rows; projection-only type
                avoids the non-null hazard (NB-12).
              items:
                description: >-
                  Projection-only frozen-side item (NB-12). Not a Node, no Relay
                  ID,

                  no FK hydration. The underlying PlaylistItem row may have been

                  deleted; this type carries the frozen `itemId` string by
                  design so

                  the GraphQL non-null contract `[SnapshotPlaylistItem!]!`
                  cannot

                  be broken by a deletion.
                properties:
                  itemId:
                    description: >-
                      typeid plitm_* — frozen at write; underlying PlaylistItem
                      row may have been deleted.
                    type: string
                  objectId:
                    description: typeid obj_*
                    type: string
                  position:
                    type: integer
                required:
                  - itemId
                  - objectId
                  - position
                type: object
              type: array
            unchanged:
              items:
                properties:
                  id:
                    type: string
                  objectID:
                    type: string
                  position:
                    description: >-
                      0-based; positions for a playlist form {0..N-1} exactly.
                      Enforced by mutation layer (full-rewrite) and unique
                      index.
                    type: integer
                required:
                  - id
                  - objectID
                  - position
                type: object
              type: array
          required:
            - added
            - moved
            - removed
            - unchanged
          type: object
        hasUnpublishedChanges:
          description: |-
            snapshot != nil && Playlist.version > snapshot.version. Returns
            false during the B-11 STREAMING+no-snapshot window — deliberate:
            the stream is live but nothing has been published yet.
          type: boolean
        id:
          type: string
        items:
          items:
            properties:
              id:
                type: string
              object:
                properties:
                  duration:
                    type:
                      - integer
                      - 'null'
                  id:
                    type: string
                  name:
                    type: string
                  type:
                    enum:
                      - audio
                      - video
                      - image
                    type: string
                required:
                  - id
                  - name
                  - type
                type: object
              objectID:
                type: string
              position:
                description: >-
                  0-based; positions for a playlist form {0..N-1} exactly.
                  Enforced by mutation layer (full-rewrite) and unique index.
                type: integer
            required:
              - id
              - object
              - objectID
              - position
            type: object
          type: array
        kind:
          enum:
            - video
            - audio
          type: string
        liveItems:
          description: |-
            Projected from PlaylistSnapshot.items JSON (NB-12) — never
            FK-hydrated against the live PlaylistItem table. Empty list during
            the B-11 STREAMING+no-snapshot window.
          items:
            description: |-
              Projection-only frozen-side item (NB-12). Not a Node, no Relay ID,
              no FK hydration. The underlying PlaylistItem row may have been
              deleted; this type carries the frozen `itemId` string by design so
              the GraphQL non-null contract `[SnapshotPlaylistItem!]!` cannot
              be broken by a deletion.
            properties:
              itemId:
                description: >-
                  typeid plitm_* — frozen at write; underlying PlaylistItem row
                  may have been deleted.
                type: string
              objectId:
                description: typeid obj_*
                type: string
              position:
                type: integer
            required:
              - itemId
              - objectId
              - position
            type: object
          type: array
        liveVersion:
          description: |-
            PlaylistSnapshot.version — Playlist.version frozen at the last LIVE
            write. Returns 0 when no snapshot exists OR during the B-11
            STREAMING+no-snapshot transient window (WriteInitialPlaylistSnapshot
            retry).
          type: integer
        mode:
          enum:
            - sequential
            - shuffle
          type: string
        publishStatus:
          description: |-
            Workflow-state derivation. NB-13: PREPARING wins over PENDING even
            when a concurrent edit advances Playlist.version while a publish
            is preparing.
          enum:
            - IDLE
            - PENDING
            - PREPARING
            - FAILED
            - NOT_LIVE
          type: string
        streamID:
          type: string
        updatedAt:
          format: date-time
          type: string
        version:
          description: >-
            Bumped by 1 per committed spec mutation batch. Used for optimistic
            concurrency and as the snapshot handle for PreparePlaylistWorkflow.
          type: integer
      required:
        - createdAt
        - diff
        - hasUnpublishedChanges
        - id
        - kind
        - liveItems
        - liveVersion
        - mode
        - publishStatus
        - streamID
        - updatedAt
        - version
      type: object
    Problem:
      description: RFC 7807 problem-details error body.
      properties:
        code:
          description: A stable, machine-readable error code.
          type: string
        detail:
          description: A human-readable explanation specific to this occurrence.
          type: string
        status:
          description: The HTTP status code.
          type: integer
        title:
          description: A short, human-readable summary of the problem.
          type: string
        type:
          description: A URI reference identifying the problem type.
          format: uri-reference
          type: string
      required:
        - type
        - title
        - status
        - detail
        - code
      type: object
  securitySchemes:
    oauth2:
      description: OAuth 2.1 authorization-code flow with PKCE.
      flows:
        authorizationCode:
          authorizationUrl: https://auth.streamloop.app/api/auth/oauth2/authorize
          scopes:
            streamloop:billing: Read billing/usage and create top-up links
            streamloop:destructive: Delete streams and destinations
            streamloop:read: Read streams, destinations, playlists, and billing status
            streamloop:write: Create and control streams, destinations, and playlists
          tokenUrl: https://auth.streamloop.app/api/auth/oauth2/token
      type: oauth2
    bearerAuth:
      bearerFormat: JWT
      description: An OAuth 2.1 bearer access token.
      scheme: bearer
      type: http
    apiKey:
      description: >-
        A Streamloop API key (prefix `sl_`), sent in the `X-API-Key` header.
        Create and manage keys in the dashboard. The simplest auth for
        programmatic / agent clients — no OAuth flow required; the key acts as
        its owning user.
      in: header
      name: X-API-Key
      type: apiKey

````