Skip to content
Start here

List live inputs

client.Stream.LiveInputs.List(ctx, params) (*LiveInputListResponse, error)
GET/accounts/{account_id}/stream/live_inputs

Lists the live inputs created for an account. To get the credentials needed to stream to a specific live input, request a single live input.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Stream WriteStream Read
ParametersExpand Collapse
params LiveInputListParams
AccountID param.Field[string]

Path param: Identifier.

maxLength32
IncludeCounts param.Field[bool]optional

Query param: Includes the total number of videos associated with the submitted query parameters.

ReturnsExpand Collapse
type LiveInputListResponse struct{…}
LiveInputs []LiveInputListResponseLiveInputoptional
Created Timeoptional

The date and time the live input was created.

formatdate-time
DeleteRecordingAfterDays float64optional

Indicates the number of days after which the live inputs recordings will be deleted. When a stream completes and the recording is ready, the value is used to calculate a scheduled deletion date for that recording. Omit the field to indicate no change, or include with a null value to remove an existing scheduled deletion.

minimum30
Enabled booloptional

Indicates whether the live input is enabled and can accept streams.

Meta unknownoptional

A user modifiable key-value store used to reference other systems of record for managing live inputs.

Modified Timeoptional

The date and time the live input was last modified.

formatdate-time
UID stringoptional

A unique identifier for a live input.

maxLength32
Range int64optional

The total number of remaining live inputs based on cursor position.

Total int64optional

The total number of live inputs that match the provided filters.

List live inputs

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/stream"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  liveInputs, err := client.Stream.LiveInputs.List(context.TODO(), stream.LiveInputListParams{
    AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", liveInputs.LiveInputs)
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "liveInputs": [
      {
        "created": "2014-01-02T02:20:00Z",
        "deleteRecordingAfterDays": 45,
        "enabled": true,
        "meta": {
          "name": "test stream 1"
        },
        "modified": "2014-01-02T02:20:00Z",
        "uid": "66be4bf738797e01e1fca35a7bdecdcd"
      }
    ],
    "range": 1000,
    "total": 35586
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "liveInputs": [
      {
        "created": "2014-01-02T02:20:00Z",
        "deleteRecordingAfterDays": 45,
        "enabled": true,
        "meta": {
          "name": "test stream 1"
        },
        "modified": "2014-01-02T02:20:00Z",
        "uid": "66be4bf738797e01e1fca35a7bdecdcd"
      }
    ],
    "range": 1000,
    "total": 35586
  }
}