Live Streams
Download SpecapiKey
streamKey
string
The unique stream key that allows you to stream videos.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
name
string
You can filter live streams by their name or a part of their name.
- Example
- "My Video"
sortBy
string
Allowed: createdAt, publishedAt, name. createdAt - the time a livestream was created using the specified streamKey. publishedAt - the time a livestream was published using the specified streamKey. name - the name of the livestream. If you choose one of the time based options, the time is presented in ISO-8601 format.
- Example
- "createdAt"
sortOrder
string
Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. For title, it is 0-9 and A-Z ascending and Z-A, 9-0 descending.
- Enum
-
- asc
- desc
- Example
- "desc"
currentPage
int
Choose the number of search results to return per page. Minimum value: 1
- Default
- 1
- Example
- 2
pageSize
int
Results per page. Allowed values 1-100, default is 25.
- Default
- 25
- Example
- 30
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#list
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#list
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
// retrieve the first page of all livestreams
const liveStreams = await client.liveStreams.list({ });
// retrieve the livestreams having a given name
const liveStreams2 = await client.liveStreams.list({
name: 'My livestream'
});
// retrieve the livestreams having a given stream key
const liveStreams2 = await client.liveStreams.list({
streamKey:'30087931-229e-42cf-b5f9-e91bcc1f7332'
});
// retrieve the second page of 30 items sorted by name desc
const liveStreams3 = await client.liveStreams.list({
sortBy: 'name',
sortOrder: 'desc',
currentPage: 2,
pageSize: 30
});
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#list
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique ID for the live stream you want to watch.
# example passing only required values which don't have defaults set
# Show live stream
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#list
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#list
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class getExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var liveStreamId = li400mYKSgQ6xs7taUeSaEKr; // string | The unique ID for the live stream you want to watch.
var apiLiveStreamsInstance = apiInstance.LiveStreams();
try
{
// Show live stream
LiveStream result = apiLiveStreamsInstance.get(liveStreamId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LiveStreamsApi.get: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/LiveStreamsAPI.md#list
Response
Success
data
array[object (LiveStream)]
required
LiveStream
object (LiveStream)
assets
object (assets)
hls
string
uri
The http live streaming (HLS) link for your live video stream.
- Example
- "https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8"
iframe
string
The embed code for the iframe containing your live video stream.
- Example
- "<iframe src=\\\"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5\\\" width=\\\"100%\\\" height=\\\"100%\\\" frameborder=\\\"0\\\" scrolling=\\\"no\\\" allowfullscreen=\\\"\\\"></iframe>"
player
string
uri
A link to the video player that is playing your live stream.
- Example
- "https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr"
thumbnail
string
uri
A link to the thumbnail for your video.
- Example
- "https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg"
broadcasting
boolean
Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not.
- Example
- true
createdAt
string
date-time
When the player was created, presented in ISO-8601 format.
- Example
- "2020-01-31T10:17:47+00:00"
liveStreamId
string
required
The unique identifier for the live stream. Live stream IDs begin with "li."
- Example
- "li400mYKSgQ6xs7taUeSaEKr"
name
string
The name of your live stream.
- Example
- "My Live Stream"
playerId
string
The unique identifier for the player.
- Example
- "pl45d5vFFGrfdsdsd156dGhh"
public
boolean
Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature here.
- Example
- true
restreams
array[object (Restreams response object)]
required
Returns the list of RTMP restream destinations.
Restreams response object
object (Restreams response object)
name
string
Returns the name of a restream destination.
- Example
- "My RTMP server"
serverUrl
string
Returns the RTMP URL of a restream destination.
- Example
- "rtmp://my.broadcast.example.com/app"
streamKey
string
Returns the unique key of the live stream that is set up for restreaming.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
streamKey
string
The unique, private stream key that you use to begin streaming.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
updatedAt
string
date-time
When the player was last updated, presented in ISO-8601 format.
- Example
- "2020-01-31T10:18:47+00:00"
pagination
object (pagination)
required
- Example
- { "currentPage": 3, "currentPageItems": 20, "itemsTotal": 123, "links": { "first": { "rel": "first", "uri": "/videos/search?currentPage=1&pageSize=20" }, "last": { "rel": "last", "uri": "/videos/search?currentPage=6&pageSize=20" }, "next": { "rel": "next", "uri": "/videos/search?currentPage=4&pageSize=20" }, "previous": { "rel": "previous", "uri": "/videos/search?currentPage=2&pageSize=20" } }, "pageSize": 20, "pagesTotal": 7 }
currentPage
int
The current page index.
currentPageItems
int
The number of items on the current page.
itemsTotal
int
Total number of items that exist.
links
array[object (PaginationLink)]
required
PaginationLink
object (PaginationLink)
rel
string
uri
string
uri
pageSize
int
Maximum number of item per page.
pagesTotal
int
Number of items listed in the current page.
apiKey
name
string
required
Add a name for your live stream here.
- Example
- "My Live Stream Video"
playerId
string
The unique identifier for the player.
- Example
- "pl4f4ferf5erfr5zed4fsdd"
public
boolean
Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature here.
restreams
array[object (Restreams request object)]
Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations.
Restreams request object
object (Restreams request object)
Adding restream destinations is optional. However, if you set a restream destination, you must provide all attributes for each destination.
name
string
required
Use this parameter to define a name for the restream destination.
- Example
- "My RTMP server"
serverUrl
string
required
Use this parameter to set the RTMP URL of the restream destination.
- Example
- "rtmp://my.broadcast.example.com/app"
streamKey
string
required
Use this parameter to provide the unique key of the live stream that you want to restream.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#create
// instantiate the client
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
liveStreamCreationPayload := apivideosdk.LiveStreamCreationPayload
liveStreamCreationPayload.SetName("My Live Stream Video") // Add a name for your live stream here.
liveStreamCreationPayload.SetPublic(true) // Whether your video can be viewed by everyone, or requires authentication to see it.
liveStreamCreationPayload.SetPlayerId("pl4f4ferf5erfr5zed4fsdd") // The unique identifier for the player.
liveStreamCreatePayload.SetRestreams([]RestreamsRequestObject) // Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations.
res, err := client.LiveStreams.Create(liveStreamCreationPayload)
if err != nil
fmt.Fprintf(os.Stdout, "Response from `LiveStreams.Create`: %v", res)
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#create
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const liveStreamCreationPayload = {
name: "My Live Stream", // Add a name for your live stream here.
_public: true, // Whether your video can be viewed by everyone, or requires authentication to see it.
playerId: "pl4f4ferf5erfr5zed4fsdd", // The unique identifier for the player.
restreams: [ // Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations.
{
streamKey: "dw-dew8-q6w9-k67w-1ws8",
serverUrl: "rtmp://my.broadcast.example.com/app",
name: "My RTMP server",
},
],
};
const liveStream = await client.liveStreams.create(liveStreamCreationPayload);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#create
= # LiveStreamCreationPayload |
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#create
// instantiate the client
ApiVideoClient client ;
LiveStreamCreationPayload liveStreamCreationPayload ;
liveStreamCreationPayload.; // Add a name for your live stream here.
liveStreamCreationPayload.; // Whether your video can be viewed by everyone, or requires authentication to see it.
liveStreamCreationPayload.; // The unique identifier for the player.
liveStreamCreationPayload.;
try
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#create
var apiVideoClient = new ApiVideoClient("YOUR_API_KEY");
var liveStreamCreationPayload = new LiveStreamCreationPayload()
{
name = "My Live Stream Video",
_public = true,
playerid = "pl4f4ferf5erfr5zed4fsdd",
restreams = new List<RestreamsRequestObject>(){
new RestreamsRequestObject(){name="My RTMP server", streamKey="dw-dew8-q6w9-k67w-1ws8", serverUrl="rtmp://my.broadcast.example.com/app" }
}
};
try
{
var liveStream = apiVideoClient.LiveStreams().create(liveStreamCreationPayload);
}
catch (ApiException e)
{
// Manage create error here
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/LiveStreamsAPI.md#create
ApiVideoClient.apiKey =
let liveStreamCreationPayload = LiveStreamCreationPayload(
name: ,
_public: true,
playerId: ,
restreams: [RestreamsRequestObject(
name: ,
serverUrl: ,
streamKey:
)]
)
LiveStreamsAPI.create(liveStreamCreationPayload: liveStreamCreationPayload) { liveStream, error in
if let liveStream = liveStream {
// Do something with the livestream
}
if let error = error {
// Manage create error here
}
}
Response
Success
Bad Request
This error occurs when a field is empty in the restreams
array in your request.
This error occurs when the rtmp app name is missing from serverURL
in the restreams
array.
This error occurs when the URL you set in serverURL
is not rtmp
.
This error occurs when you set more than 5 restream destinations.
This error occurs when a field is sent as null
in the restreams
array in your request.
assets
object (assets)
hls
string
uri
The http live streaming (HLS) link for your live video stream.
- Example
- "https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8"
iframe
string
The embed code for the iframe containing your live video stream.
- Example
- "<iframe src=\\\"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5\\\" width=\\\"100%\\\" height=\\\"100%\\\" frameborder=\\\"0\\\" scrolling=\\\"no\\\" allowfullscreen=\\\"\\\"></iframe>"
player
string
uri
A link to the video player that is playing your live stream.
- Example
- "https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr"
thumbnail
string
uri
A link to the thumbnail for your video.
- Example
- "https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg"
broadcasting
boolean
Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not.
- Example
- true
createdAt
string
date-time
When the player was created, presented in ISO-8601 format.
- Example
- "2020-01-31T10:17:47+00:00"
liveStreamId
string
required
The unique identifier for the live stream. Live stream IDs begin with "li."
- Example
- "li400mYKSgQ6xs7taUeSaEKr"
name
string
The name of your live stream.
- Example
- "My Live Stream"
playerId
string
The unique identifier for the player.
- Example
- "pl45d5vFFGrfdsdsd156dGhh"
public
boolean
Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature here.
- Example
- true
restreams
array[object (Restreams response object)]
required
Returns the list of RTMP restream destinations.
Restreams response object
object (Restreams response object)
name
string
Returns the name of a restream destination.
- Example
- "My RTMP server"
serverUrl
string
Returns the RTMP URL of a restream destination.
- Example
- "rtmp://my.broadcast.example.com/app"
streamKey
string
Returns the unique key of the live stream that is set up for restreaming.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
streamKey
string
The unique, private stream key that you use to begin streaming.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
updatedAt
string
date-time
When the player was last updated, presented in ISO-8601 format.
- Example
- "2020-01-31T10:18:47+00:00"
name
string
The name of the parameter that caused the error.
problems
array[object (BadRequest)]
Returns any additional problems in the request in an array of objects.
BadRequest
object (BadRequest)
name
string
The name of the parameter that caused the error.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
apiKey
liveStreamId
string
required
The unique ID for the live stream you want to watch.
- Example
- "li400mYKSgQ6xs7taUeSaEKr"
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#get
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#get
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream you want to retrieve.
const liveStream = await client.liveStreams.get(liveStreamId);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#get
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique ID for the live stream you want to watch.
# example passing only required values which don't have defaults set
# Show live stream
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#get
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#get
import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.LiveStreamsApi;
import java.util.*;
public class Example {
public static void main(String[] args) {
ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
// if you rather like to use the sandbox environment:
// ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);
LiveStreamsApi apiInstance = client.liveStreams();
String liveStreamId = "li400mYKSgQ6xs7taUeSaEKr"; // The unique ID for the live stream you want to watch.
try {
LiveStream result = apiInstance.get(liveStreamId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LiveStreamsApi#get");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getMessage());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#get
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class getExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var liveStreamId = li400mYKSgQ6xs7taUeSaEKr; // string | The unique ID for the live stream you want to watch.
var apiLiveStreamsInstance = apiInstance.LiveStreams();
try
{
// Show live stream
LiveStream result = apiLiveStreamsInstance.get(liveStreamId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LiveStreamsApi.get: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/LiveStreamsAPI.md#get
Response
Success
assets
object (assets)
hls
string
uri
The http live streaming (HLS) link for your live video stream.
- Example
- "https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8"
iframe
string
The embed code for the iframe containing your live video stream.
- Example
- "<iframe src=\\\"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5\\\" width=\\\"100%\\\" height=\\\"100%\\\" frameborder=\\\"0\\\" scrolling=\\\"no\\\" allowfullscreen=\\\"\\\"></iframe>"
player
string
uri
A link to the video player that is playing your live stream.
- Example
- "https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr"
thumbnail
string
uri
A link to the thumbnail for your video.
- Example
- "https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg"
broadcasting
boolean
Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not.
- Example
- true
createdAt
string
date-time
When the player was created, presented in ISO-8601 format.
- Example
- "2020-01-31T10:17:47+00:00"
liveStreamId
string
required
The unique identifier for the live stream. Live stream IDs begin with "li."
- Example
- "li400mYKSgQ6xs7taUeSaEKr"
name
string
The name of your live stream.
- Example
- "My Live Stream"
playerId
string
The unique identifier for the player.
- Example
- "pl45d5vFFGrfdsdsd156dGhh"
public
boolean
Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature here.
- Example
- true
restreams
array[object (Restreams response object)]
required
Returns the list of RTMP restream destinations.
Restreams response object
object (Restreams response object)
name
string
Returns the name of a restream destination.
- Example
- "My RTMP server"
serverUrl
string
Returns the RTMP URL of a restream destination.
- Example
- "rtmp://my.broadcast.example.com/app"
streamKey
string
Returns the unique key of the live stream that is set up for restreaming.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
streamKey
string
The unique, private stream key that you use to begin streaming.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
updatedAt
string
date-time
When the player was last updated, presented in ISO-8601 format.
- Example
- "2020-01-31T10:18:47+00:00"
Delete a live stream
If you do not need a live stream any longer, you can send a request to delete it. All you need is the liveStreamId.
apiKey
liveStreamId
string
required
The unique ID for the live stream that you want to remove.
- Example
- "li400mYKSgQ6xs7taUeSaEKr"
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#delete
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#delete
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique identifier of the live stream whose thumbnail you want to delete.
const liveStream = await client.liveStreams.deleteThumbnail(liveStreamId);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#delete
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique ID for the live stream that you want to remove.
# example passing only required values which don't have defaults set
# Delete a live stream
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#delete
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#delete
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class deleteExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var liveStreamId = li400mYKSgQ6xs7taUeSaEKr; // string | The unique ID for the live stream that you want to remove.
var apiLiveStreamsInstance = apiInstance.LiveStreams();
try
{
// Delete a live stream
apiLiveStreamsInstance.delete(liveStreamId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LiveStreamsApi.delete: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/LiveStreamsAPI.md#delete
Response
No Content
Empty response
No schema
apiKey
liveStreamId
string
required
The unique ID for the live stream that you want to update information for such as player details.
- Example
- "li400mYKSgQ6xs7taUeSaEKr"
name
string
The name you want to use for your live stream.
- Example
- "My Live Stream Video"
playerId
string
The unique ID for the player associated with a live stream that you want to update.
- Example
- "pl45KFKdlddgk654dspkze"
public
boolean
Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature here.
restreams
array[object (Restreams request object)]
Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed.
Restreams request object
object (Restreams request object)
Adding restream destinations is optional. However, if you set a restream destination, you must provide all attributes for each destination.
name
string
required
Use this parameter to define a name for the restream destination.
- Example
- "My RTMP server"
serverUrl
string
required
Use this parameter to set the RTMP URL of the restream destination.
- Example
- "rtmp://my.broadcast.example.com/app"
streamKey
string
required
Use this parameter to provide the unique key of the live stream that you want to restream.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#update
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#update
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream that you want to update information for such as player details.
const liveStreamUpdatePayload = {
name: "My Live Stream Video", // The name you want to use for your live stream.
_public: true, // Whether your video can be viewed by everyone, or requires authentication to see it.
playerId: "pl45KFKdlddgk654dspkze", // The unique ID for the player associated with a live stream that you want to update.
restreams: [ // Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations.
{
streamKey: "dw-dew8-q6w9-k67w-1ws8",
serverUrl: "rtmp://my.broadcast.example.com/app",
name: "My RTMP server",
},
],
};
const liveStream = await client.liveStreams.update(liveStreamId, liveStreamUpdatePayload);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#update
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique ID for the live stream that you want to update information for such as player details.
= # LiveStreamUpdatePayload |
# example passing only required values which don't have defaults set
# Update a live stream
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#update
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#update
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class updateExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var liveStreamId = li400mYKSgQ6xs7taUeSaEKr; // string | The unique ID for the live stream that you want to update information for such as player details.
var liveStreamUpdatePayload = new LiveStreamUpdatePayload(); // LiveStreamUpdatePayload |
var apiLiveStreamsInstance = apiInstance.LiveStreams();
try
{
// Update a live stream
LiveStream result = apiLiveStreamsInstance.update(liveStreamId, liveStreamUpdatePayload);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LiveStreamsApi.update: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/LiveStreamsAPI.md#update
ApiVideoClient.apiKey =
let liveStreamId = // String | The unique ID for the live stream that you want to update information for such as player details.
let liveStreamUpdatePayload = LiveStreamUpdatePayload(
name: ,
_public: true,
playerId: ,
restreams: [RestreamsRequestObject(
name: ,
serverUrl: ,
streamKey:
)]
)
LiveStreamsAPI.update(liveStreamId: liveStreamId, liveStreamUpdatePayload: liveStreamUpdatePayload) { liveStream, error in
if let liveStream = liveStream {
// Do something with the livestream
}
if let error = error {
// Manage update error here
}
}
Response
Success
Bad Request
This error occurs when a field is empty in the restreams
array in your request.
This error occurs when the rtmp app name is missing from serverURL
in the restreams
array.
This error occurs when the URL you set in serverURL
is not rtmp
.
This error occurs when you set more than 5 restream destinations.
This error occurs when a field is sent as null
in the restreams
array in your request.
assets
object (assets)
hls
string
uri
The http live streaming (HLS) link for your live video stream.
- Example
- "https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8"
iframe
string
The embed code for the iframe containing your live video stream.
- Example
- "<iframe src=\\\"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5\\\" width=\\\"100%\\\" height=\\\"100%\\\" frameborder=\\\"0\\\" scrolling=\\\"no\\\" allowfullscreen=\\\"\\\"></iframe>"
player
string
uri
A link to the video player that is playing your live stream.
- Example
- "https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr"
thumbnail
string
uri
A link to the thumbnail for your video.
- Example
- "https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg"
broadcasting
boolean
Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not.
- Example
- true
createdAt
string
date-time
When the player was created, presented in ISO-8601 format.
- Example
- "2020-01-31T10:17:47+00:00"
liveStreamId
string
required
The unique identifier for the live stream. Live stream IDs begin with "li."
- Example
- "li400mYKSgQ6xs7taUeSaEKr"
name
string
The name of your live stream.
- Example
- "My Live Stream"
playerId
string
The unique identifier for the player.
- Example
- "pl45d5vFFGrfdsdsd156dGhh"
public
boolean
Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature here.
- Example
- true
restreams
array[object (Restreams response object)]
required
Returns the list of RTMP restream destinations.
Restreams response object
object (Restreams response object)
name
string
Returns the name of a restream destination.
- Example
- "My RTMP server"
serverUrl
string
Returns the RTMP URL of a restream destination.
- Example
- "rtmp://my.broadcast.example.com/app"
streamKey
string
Returns the unique key of the live stream that is set up for restreaming.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
streamKey
string
The unique, private stream key that you use to begin streaming.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
updatedAt
string
date-time
When the player was last updated, presented in ISO-8601 format.
- Example
- "2020-01-31T10:18:47+00:00"
name
string
The name of the parameter that caused the error.
problems
array[object (BadRequest)]
Returns any additional problems in the request in an array of objects.
BadRequest
object (BadRequest)
name
string
The name of the parameter that caused the error.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
Upload a thumbnail
Upload the thumbnail for the livestream.
apiKey
liveStreamId
string
required
The unique ID for the live stream you want to upload.
- Example
- "vi4k0jvEUuaTdRAEjQ4Jfrgz"
file
string
binary
required
The image to be added as a thumbnail. The mime type should be image/jpeg, image/png or image/webp. The max allowed size is 8 MiB.
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#uploadThumbnail
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#uploadThumbnail
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const liveStreamId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique ID for the live stream you want to upload.
const file = './thumbnail.jpg'; // The image to be added as a thumbnail.
const livestream = await client.liveStreams.uploadThumbnail(liveStreamId, file);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#uploadThumbnail
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique ID for the live stream you want to upload.
= # file_type | The image to be added as a thumbnail.
# example passing only required values which don't have defaults set
# Upload a thumbnail
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#uploadThumbnail
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#uploadThumbnail
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class uploadThumbnailExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var liveStreamId = vi4k0jvEUuaTdRAEjQ4Jfrgz; // string | The unique ID for the live stream you want to upload.
var file = BINARY_DATA_HERE; // System.IO.Stream | The image to be added as a thumbnail.
var apiLiveStreamsInstance = apiInstance.LiveStreams();
try
{
// Upload a thumbnail
LiveStream result = apiLiveStreamsInstance.uploadThumbnail(liveStreamId, file);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LiveStreamsApi.uploadThumbnail: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/LiveStreamsAPI.md#uploadThumbnail
Response
Created
Bad Request
Not Found
assets
object (assets)
hls
string
uri
The http live streaming (HLS) link for your live video stream.
- Example
- "https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8"
iframe
string
The embed code for the iframe containing your live video stream.
- Example
- "<iframe src=\\\"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5\\\" width=\\\"100%\\\" height=\\\"100%\\\" frameborder=\\\"0\\\" scrolling=\\\"no\\\" allowfullscreen=\\\"\\\"></iframe>"
player
string
uri
A link to the video player that is playing your live stream.
- Example
- "https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr"
thumbnail
string
uri
A link to the thumbnail for your video.
- Example
- "https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg"
broadcasting
boolean
Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not.
- Example
- true
createdAt
string
date-time
When the player was created, presented in ISO-8601 format.
- Example
- "2020-01-31T10:17:47+00:00"
liveStreamId
string
required
The unique identifier for the live stream. Live stream IDs begin with "li."
- Example
- "li400mYKSgQ6xs7taUeSaEKr"
name
string
The name of your live stream.
- Example
- "My Live Stream"
playerId
string
The unique identifier for the player.
- Example
- "pl45d5vFFGrfdsdsd156dGhh"
public
boolean
Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature here.
- Example
- true
restreams
array[object (Restreams response object)]
required
Returns the list of RTMP restream destinations.
Restreams response object
object (Restreams response object)
name
string
Returns the name of a restream destination.
- Example
- "My RTMP server"
serverUrl
string
Returns the RTMP URL of a restream destination.
- Example
- "rtmp://my.broadcast.example.com/app"
streamKey
string
Returns the unique key of the live stream that is set up for restreaming.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
streamKey
string
The unique, private stream key that you use to begin streaming.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
updatedAt
string
date-time
When the player was last updated, presented in ISO-8601 format.
- Example
- "2020-01-31T10:18:47+00:00"
name
string
The name of the parameter that caused the error.
problems
array[object (BadRequest)]
Returns any additional problems in the request in an array of objects.
BadRequest
object (BadRequest)
name
string
The name of the parameter that caused the error.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
name
string
status
int
title
string
type
string
Delete a thumbnail
Send the unique identifier for a live stream to delete its thumbnail.
apiKey
liveStreamId
string
required
The unique identifier of the live stream whose thumbnail you want to delete.
- Example
- "li400mYKSgQ6xs7taUeSaEKr"
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#deleteThumbnail
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#deleteThumbnail
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream whose thumbnail you want to delete.
const liveStream = await client.liveStreams.deleteThumbnail(liveStreamId);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#deleteThumbnail
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the live stream you want to delete.
# example passing only required values which don't have defaults set
# Delete a thumbnail
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#deleteThumbnail
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#deleteThumbnail
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class deleteThumbnailExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var liveStreamId = li400mYKSgQ6xs7taUeSaEKr; // string | The unique identifier for the live stream you want to delete.
var apiLiveStreamsInstance = apiInstance.LiveStreams();
try
{
// Delete a thumbnail
LiveStream result = apiLiveStreamsInstance.deleteThumbnail(liveStreamId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LiveStreamsApi.deleteThumbnail: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/LiveStreamsAPI.md#deleteThumbnail
Response
Success
Not Found
assets
object (assets)
hls
string
uri
The http live streaming (HLS) link for your live video stream.
- Example
- "https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8"
iframe
string
The embed code for the iframe containing your live video stream.
- Example
- "<iframe src=\\\"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5\\\" width=\\\"100%\\\" height=\\\"100%\\\" frameborder=\\\"0\\\" scrolling=\\\"no\\\" allowfullscreen=\\\"\\\"></iframe>"
player
string
uri
A link to the video player that is playing your live stream.
- Example
- "https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr"
thumbnail
string
uri
A link to the thumbnail for your video.
- Example
- "https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg"
broadcasting
boolean
Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not.
- Example
- true
createdAt
string
date-time
When the player was created, presented in ISO-8601 format.
- Example
- "2020-01-31T10:17:47+00:00"
liveStreamId
string
required
The unique identifier for the live stream. Live stream IDs begin with "li."
- Example
- "li400mYKSgQ6xs7taUeSaEKr"
name
string
The name of your live stream.
- Example
- "My Live Stream"
playerId
string
The unique identifier for the player.
- Example
- "pl45d5vFFGrfdsdsd156dGhh"
public
boolean
Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature here.
- Example
- true
restreams
array[object (Restreams response object)]
required
Returns the list of RTMP restream destinations.
Restreams response object
object (Restreams response object)
name
string
Returns the name of a restream destination.
- Example
- "My RTMP server"
serverUrl
string
Returns the RTMP URL of a restream destination.
- Example
- "rtmp://my.broadcast.example.com/app"
streamKey
string
Returns the unique key of the live stream that is set up for restreaming.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
streamKey
string
The unique, private stream key that you use to begin streaming.
- Example
- "dw-dew8-q6w9-k67w-1ws8"
updatedAt
string
date-time
When the player was last updated, presented in ISO-8601 format.
- Example
- "2020-01-31T10:18:47+00:00"
name
string
status
int
title
string
type
string
Was this page helpful?