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

# Retrieve all sessions



## OpenAPI

````yaml GET /session
openapi: 3.1.0
info:
  title: Livepeer API Reference
  description: |
    Welcome to the Livepeer API reference docs. Here you will find all the
    endpoints exposed on the standard Livepeer API, learn how to use them and
    what they return.
  version: 1.0.0
servers:
  - url: https://livepeer.studio/api
security:
  - apiKey: []
tags:
  - name: stream
    description: Operations related to livestream api
  - name: asset
    description: Operations related to asset/vod api
  - name: webhook
    description: Operations related to webhook api
  - name: multistream
    description: Operations related to multistream api
  - name: session
    description: Operations related to session api
  - name: room
    description: Operations related to rooms api
  - name: transcode
    description: Operations related to transcode api
  - name: metrics
    description: Operations related to metrics api
  - name: playback
    description: Operations related to playback api
  - name: accessControl
    description: Operations related to access control/signing keys api
  - name: task
    description: Operations related to tasks api
  - name: generate
    description: Operations related to AI generate api
paths:
  /session:
    get:
      tags:
        - session
      summary: Retrieve sessions
      operationId: getSessions
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/session'
                x-speakeasy-name-override: data
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      x-codeSamples:
        - lang: typescript
          label: getSessions
          source: |-
            import { Livepeer } from "livepeer";

            const livepeer = new Livepeer({
              apiKey: "<YOUR_BEARER_TOKEN_HERE>",
            });

            async function run() {
              const result = await livepeer.session.getAll();

              // Handle the result
              console.log(result);
            }

            run();
        - lang: go
          label: getSessions
          source: "package main\n\nimport(\n\tlivepeergo \"github.com/livepeer/livepeer-go\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n    s := livepeergo.New(\n        livepeergo.WithSecurity(\"<YOUR_BEARER_TOKEN_HERE>\"),\n    )\n\n    ctx := context.Background()\n    res, err := s.Session.GetAll(ctx)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.Data != nil {\n        // handle response\n    }\n}"
        - lang: python
          label: getSessions
          source: |-
            from livepeer import Livepeer

            s = Livepeer(
                api_key="<YOUR_BEARER_TOKEN_HERE>",
            )

            res = s.session.get_all()

            if res.data is not None:
                # handle response
                pass
components:
  schemas:
    session:
      type: object
      required:
        - name
        - streamId
      additionalProperties: false
      properties:
        id:
          type: string
          readOnly: true
          example: de7818e7-610a-4057-8f6f-b785dc1e6f88
        kind:
          type: string
          example: stream
          deprecated: true
        userId:
          type: string
          readOnly: true
          example: 66E2161C-7670-4D05-B71D-DA2D6979556F
          deprecated: true
        name:
          type: string
          example: test_session
        lastSeen:
          type: number
          example: 1587667174725
        sourceSegments:
          type: number
          example: 1
        transcodedSegments:
          type: number
          example: 2
        sourceSegmentsDuration:
          type: number
          example: 1
          description: Duration of all the source segments, sec
        transcodedSegmentsDuration:
          type: number
          example: 2
          description: Duration of all the transcoded segments, sec
        sourceBytes:
          type: number
          example: 1
        transcodedBytes:
          type: number
          example: 2
        ingestRate:
          type: number
          example: 1
          description: Rate at which sourceBytes increases (bytes/second)
        outgoingRate:
          type: number
          example: 2
          description: Rate at which transcodedBytes increases (bytes/second)
        isHealthy: e003b07a-f76c-4f44-b433-f453ca6cbc57
        issues: 41f26f02-b6ef-4da2-af01-a5878c2404e3
        createdAt:
          type: number
          readOnly: true
          description: Timestamp (in milliseconds) at which stream object was created
          example: 1587667174725
        parentId:
          type: string
          example: de7818e7-610a-4057-8f6f-b785dc1e6f88
          description: Points to parent stream object
        projectId:
          type: string
          description: The ID of the project
          example: aac12556-4d65-4d34-9fb6-d1f0985eb0a9
        record:
          description: >
            Whether the stream should be recorded. Uses default settings. For
            more customization, create and configure an object store.
          type: boolean
          example: false
        recordingStatus:
          readOnly: true
          type: string
          description: The status of the recording process of this stream session.
          enum:
            - waiting
            - ready
            - failed
            - deleted
            - none
        recordingUrl:
          type: string
          readOnly: true
          description: URL for accessing the recording of this stream session.
        mp4Url:
          type: string
          readOnly: true
          description: The URL for the stream session recording packaged in an MP4.
        playbackId:
          type: string
          example: eaw4nk06ts2d0mzb
          description: >-
            The playback ID to use with the Playback Info endpoint to retrieve
            playback URLs.
        profiles: baeb59e6-454a-46e9-b2f2-c52a9f324714
        recordingSpec: 5ab3d0ee-842b-4164-8c0e-96c6ef8d2287
    error:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            type: string
            example:
              - id not provided
              - Account not found
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````