List live inputs
client.stream.liveInputs.list(LiveInputListParams { account_id, include_counts } params, RequestOptionsoptions?): LiveInputListResponse { liveInputs, range, total }
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:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
List live inputs
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const liveInputs = await client.stream.liveInputs.list({
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
});
console.log(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
}
}