Retrieve a list of all webhooks configured for the current workspace.
/webhooks
Retrieve a list of all webhooks configured for the current workspace.
events
string
The webhook event that you wish to filter on.
currentPage
int
Choose the number of search results to return per page. Minimum value: 1
pageSize
int
Results per page. Allowed values 1-100, default is 25.
Success
data
array
required
pagination
object (Pagination)
required
itemsTotal
int
Total number of items that exist.
pagesTotal
int
Number of items listed in the current page.
pageSize
int
Maximum number of item per page.
currentPage
int
The current page index.
currentPageItems
int
The number of items on the current page.
links
array
required
X-RateLimit-Limit
int
The request limit per minute.
X-RateLimit-Remaining
int
The number of available requests left for the current time window.
X-RateLimit-Retry-After
int
The number of seconds left until the current rate limit window resets.
Too Many Requests
type
string
A link to the error documentation.
title
string
A description of the error that occurred.
status
int
The HTTP status code.
X-RateLimit-Limit
int
The request limit per minute.
X-RateLimit-Remaining
int
The number of available requests left for the current time window.
X-RateLimit-Retry-After
int
The number of seconds left until the current rate limit window resets.
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WebhooksApi.md#list
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class listExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var events = video.encoding.quality.completed; // string | The webhook event that you wish to filter on. (optional)
var currentPage = 2; // int? | Choose the number of search results to return per page. Minimum value: 1 (optional) (default to 1)
var pageSize = 30; // int? | Results per page. Allowed values 1-100, default is 25. (optional) (default to 25)
var apiWebhooksInstance = apiInstance.Webhooks();
try
{
// List all webhooks
WebhooksListResponse result = apiWebhooksInstance.list(events, currentPage, pageSize);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhooksApi.list: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// 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/WebhooksApi.md#list
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main() {
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
// if you rather like to use the sandbox environment:
// client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
req := apivideosdk.WebhooksApiListRequest{}
req.Events("video.encoding.quality.completed") // string | The webhook event that you wish to filter on.
req.CurrentPage(int32(2)) // int32 | Choose the number of search results to return per page. Minimum value: 1 (default to 1)
req.PageSize(int32(30)) // int32 | Results per page. Allowed values 1-100, default is 25. (default to 25)
res, err := client.Webhooks.List(req)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Webhooks.List``: %v\
", err)
}
// response from `List`: WebhooksListResponse
fmt.Fprintf(os.Stdout, "Response from `Webhooks.List`: %v\
", res)
}
// 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/WebhooksApi.md#list
import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.WebhooksApi;
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);
WebhooksApi apiInstance = client.webhooks();
String events = "video.encoding.quality.completed"; // The webhook event that you wish to filter on.
Integer currentPage = 1; // Choose the number of search results to return per page. Minimum value: 1
Integer pageSize = 25; // Results per page. Allowed values 1-100, default is 25.
try {
Page<Webhook> result = apiInstance.list()
.events(events)
.currentPage(currentPage)
.pageSize(pageSize)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#list");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getMessage());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#list
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const events = 'video.encoding.quality.completed'; // The webhook event that you wish to filter on.
const currentPage = 2; // Choose the number of search results to return per page. Minimum value: 1
const pageSize = 30; // Results per page. Allowed values 1-100, default is 25.
const webhooks = await client.webhooks.list({ events, currentPage, pageSize });
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#list
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const events = 'video.encoding.quality.completed'; // The webhook event that you wish to filter on.
const currentPage = 2; // Choose the number of search results to return per page. Minimum value: 1
const pageSize = 30; // Results per page. Allowed values 1-100, default is 25.
// WebhooksListResponse
const webhooks = await client.webhooks.list({ events, currentPage, pageSize });
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WebhooksApi.md#list
import apivideo
from apivideo.api import webhooks_api
from apivideo.model.webhooks_list_response import WebhooksListResponse
from pprint import pprint
# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
# Create an instance of the API class
api_instance = webhooks_api.WebhooksApi(api_client)
events = "video.encoding.quality.completed" # str | The webhook event that you wish to filter on. (optional)
current_page = 2 # int | Choose the number of search results to return per page. Minimum value: 1 (optional) if omitted the server will use the default value of 1
page_size = 30 # int | Results per page. Allowed values 1-100, default is 25. (optional) if omitted the server will use the default value of 25
# example passing only required values which don't have defaults set
# and optional values
try:
# List all webhooks
api_response = api_instance.list(events=events, current_page=current_page, page_size=page_size)
pprint(api_response)
except apivideo.ApiException as e:
print("Exception when calling WebhooksApi->list: %s\n" % e)
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WebhooksAPI.md#list
Success
{
"data": [
{
"webhookId": "webhook_XXXXXXXXXXXXXXX",
"createdAt": "2021-01-08T14:12:18+00:00",
"events": [
"video.encoding.quality.completed"
],
"url": "http://clientnotificationserver.com/notif?myquery=query",
"signatureSecret": "sig_sec_Abcd12348RLP7VPLi7nYVh"
},
{
"webhookId": "webhook_XXXXXXXXXYYYYYY",
"createdAt": "2021-01-12T12:12:12+00:00",
"events": [
"video.encoding.quality.completed"
],
"url": "http://clientnotificationserver.com/notif?myquery=query2",
"signatureSecret": "sig_sec_Abcd12358RLP7VPLi7nYVy"
}
],
"pagination": {
"currentPage": 1,
"pageSize": 25,
"pagesTotal": 1,
"itemsTotal": 2,
"currentPageItems": 2,
"links": [
{
"rel": "self",
"uri": "https://ws.api.video/webhooks?currentPage=1"
},
{
"rel": "first",
"uri": "https://ws.api.video/webhooks?currentPage=1"
},
{
"rel": "last",
"uri": "https://ws.api.video/webhooks?currentPage=1"
}
]
}
}
Too Many Requests
{
"type": "https://docs.api.video/reference/too-many-requests",
"title": "Too many requests.",
"status": 429
}
/webhooks
Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events:
video.encoding.quality.completed
Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification. It will look like
{ "type": "video.encoding.quality.completed", "emittedAt": "2021-01-29T16:46:25.217+01:00", "videoId": "viXXXXXXXX", "encoding": "hls", "quality": "720p"}
. This request says that the 720p HLS encoding was completed.
live-stream.broadcast.started
When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires.
live-stream.broadcast.ended
This event fires when a live stream has finished broadcasting.
video.source.recorded
This event occurs when a live stream is recorded and submitted for encoding.
video.caption.generated
This event occurs when an automatic caption has been generated.
video.summary.generated
This event occurs when an automatic summary has been generated.
events
array
required
An array of webhook events that you want to subscribe to.
url
string
required
The the url to which HTTP notifications are sent. It could be any http or https URL.
Created
webhookId
string
A unique identifier of the webhook you subscribed to.
createdAt
string
The time and date when you created this webhook subscription, in ATOM UTC format.
events
array
A list of events that you subscribed to. When these events occur, the API triggers a webhook call to the URL you provided.
url
string
The URL where the API sends the webhook.
signatureSecret
string
A secret key for the webhook you subscribed to. You can use it to verify the origin of the webhook call that you receive.
X-RateLimit-Limit
int
The request limit per minute.
X-RateLimit-Remaining
int
The number of available requests left for the current time window.
X-RateLimit-Retry-After
int
The number of seconds left until the current rate limit window resets.
Bad Request
type
string
A link to the error documentation.
title
string
A description of the error that occurred.
name
string
The name of the parameter that caused the error.
status
int
The HTTP status code.
problems
array
Returns any additional problems in the request in an array of objects.
X-RateLimit-Limit
int
The request limit per minute.
X-RateLimit-Remaining
int
The number of available requests left for the current time window.
X-RateLimit-Retry-After
int
The number of seconds left until the current rate limit window resets.
Too Many Requests
type
string
A link to the error documentation.
title
string
A description of the error that occurred.
status
int
The HTTP status code.
X-RateLimit-Limit
int
The request limit per minute.
X-RateLimit-Remaining
int
The number of available requests left for the current time window.
X-RateLimit-Retry-After
int
The number of seconds left until the current rate limit window resets.
{
"events": [
"video.encoding.quality.completed"
],
"url": "http://clientnotificationserver.com/notif?myquery=query"
}
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WebhooksApi.md#create
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class createExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var webhooksCreationPayload = new WebhooksCreationPayload(); // WebhooksCreationPayload |
var apiWebhooksInstance = apiInstance.Webhooks();
try
{
// Create Webhook
Webhook result = apiWebhooksInstance.create(webhooksCreationPayload);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhooksApi.create: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// 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/WebhooksApi.md#create
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main() {
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
// if you rather like to use the sandbox environment:
// client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
webhooksCreationPayload := *apivideosdk.NewWebhooksCreationPayload([]string{"Events_example"}, "https://example.com/webhooks") // WebhooksCreationPayload |
res, err := client.Webhooks.Create(webhooksCreationPayload)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Webhooks.Create``: %v\
", err)
}
// response from `Create`: Webhook
fmt.Fprintf(os.Stdout, "Response from `Webhooks.Create`: %v\
", res)
}
// 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/WebhooksApi.md#create
import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.WebhooksApi;
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);
WebhooksApi apiInstance = client.webhooks();
WebhooksCreationPayload webhooksCreationPayload = new WebhooksCreationPayload(); //
webhooksCreationPayload.setEvents(Arrays.asList("video.encoding.quality.completed"));
webhooksCreationPayload.setUrl("https://example.com/webhooks"); // The the url to which HTTP notifications are sent. It could be any http or https URL.
try {
Webhook result = apiInstance.create(webhooksCreationPayload);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#create");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getMessage());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#create
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const webhooksCreationPayload = {
events: ["video.encoding.quality.completed"], // A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```video.encoding.quality.completed``` Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification. It will look like ```{ "type": "video.encoding.quality.completed", "emittedAt": "2021-01-29T16:46:25.217+01:00", "videoId": "viXXXXXXXX", "encoding": "hls", "quality": "720p"} ```. This request says that the 720p HLS encoding was completed. * ```live-stream.broadcast.started``` When a lives tream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended``` This event fires when the live stream has finished broadcasting, and the broadcasting parameter flips from false to true. * ```video.source.recorded``` Occurs when a live stream is recorded and submitted for encoding.
url: "https://example.com/webhooks", // The url to which HTTP notifications are sent. It could be any http or https URL.
};
const webhook = await client.webhooks.create(webhooksCreationPayload);
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/WebhooksApi.md#create
require __DIR__ . '/vendor/autoload.php';
$webhooksCreationPayload = (new \ApiVideo\Client\Model\WebhooksCreationPayload())
->setEvents(['video.encoding.quality.completed']) // A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```video.encoding.quality.completed``` Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification. It will look like ```{ "type": "video.encoding.quality.completed", "emittedAt": "2021-01-29T16:46:25.217+01:00", "videoId": "viXXXXXXXX", "encoding": "hls", "quality": "720p"} ```. This request says that the 720p HLS encoding was completed. * ```live-stream.broadcast.started``` When a lives tream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended``` This event fires when the live stream has finished broadcasting, and the broadcasting parameter flips from false to true. * ```video.source.recorded``` Occurs when a live stream is recorded and submitted for encoding.)
->setUrl("https://example.com/webhooks"); // The url to which HTTP notifications are sent. It could be any http or https URL.)
$webhook = $client->webhooks()->create($webhooksCreationPayload);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WebhooksApi.md#create
import apivideo
from apivideo.api import webhooks_api
from apivideo.model.bad_request import BadRequest
from apivideo.model.webhook import Webhook
from apivideo.model.webhooks_creation_payload import WebhooksCreationPayload
from pprint import pprint
# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
# Create an instance of the API class
api_instance = webhooks_api.WebhooksApi(api_client)
webhooks_creation_payload = WebhooksCreationPayload(
events=["video.encoding.quality.completed"],
url="https://example.com/webhooks",
) # WebhooksCreationPayload |
# example passing only required values which don't have defaults set
try:
# Create Webhook
api_response = api_instance.create(webhooks_creation_payload)
pprint(api_response)
except apivideo.ApiException as e:
print("Exception when calling WebhooksApi->create: %s\
" % e)
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WebhooksAPI.md#create
ApiVideoClient.apiKey = "YOUR_API_KEY"
let webhooksCreationPayload = webhooks-creation-payload(events: ["events_example"], url: "url_example")
WebhooksAPI.create(webhooksCreationPayload: webhooksCreationPayload) { (response, error) in
}
Created
{
"webhookId": "webhook_XXXXXXXXXXXXXXX",
"createdAt": "2021-01-08T14:12:18+00:00",
"events": [
"video.encoding.quality.completed"
],
"url": "http://clientnotificationserver.com/notif?myquery=query"
}
Bad Request
{
"type": "https://docs.api.video/reference/attribute-required",
"events": "This attribute is required.",
"name": "events",
"status": 400,
"problems": [
{
"type": "https://docs.api.video/reference/attribute-required",
"title": "This attribute is required.",
"name": "events"
},
{
"type": "https://docs.api.video/reference/attribute-required",
"title": "This attribute is required.",
"name": "url"
},
{
"type": "https://docs.api.video/reference/invalid-attribute",
"title": "This attribute must be an array.",
"name": "events"
}
]
}
Too Many Requests
{
"type": "https://docs.api.video/reference/too-many-requests",
"title": "Too many requests.",
"status": 429
}
/webhooks/{webhookId}
Retrieve webhook details by id.
webhookId
string
required
The unique webhook you wish to retreive details on.
Success
webhookId
string
A unique identifier of the webhook you subscribed to.
createdAt
string
The time and date when you created this webhook subscription, in ATOM UTC format.
events
array
A list of events that you subscribed to. When these events occur, the API triggers a webhook call to the URL you provided.
url
string
The URL where the API sends the webhook.
signatureSecret
string
A secret key for the webhook you subscribed to. You can use it to verify the origin of the webhook call that you receive.
X-RateLimit-Limit
int
The request limit per minute.
X-RateLimit-Remaining
int
The number of available requests left for the current time window.
X-RateLimit-Retry-After
int
The number of seconds left until the current rate limit window resets.
Too Many Requests
type
string
A link to the error documentation.
title
string
A description of the error that occurred.
status
int
The HTTP status code.
X-RateLimit-Limit
int
The request limit per minute.
X-RateLimit-Remaining
int
The number of available requests left for the current time window.
X-RateLimit-Retry-After
int
The number of seconds left until the current rate limit window resets.
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WebhooksApi.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 webhookId = webhookId_example; // string | The unique webhook you wish to retreive details on.
var apiWebhooksInstance = apiInstance.Webhooks();
try
{
// Show Webhook details
Webhook result = apiWebhooksInstance.get(webhookId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhooksApi.get: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// 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/WebhooksApi.md#get
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main() {
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
// if you rather like to use the sandbox environment:
// client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
webhookId := "webhookId_example" // string | The unique webhook you wish to retreive details on.
res, err := client.Webhooks.Get(webhookId)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Webhooks.Get``: %v\
", err)
}
// response from `Get`: Webhook
fmt.Fprintf(os.Stdout, "Response from `Webhooks.Get`: %v\
", res)
}
// 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/WebhooksApi.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.WebhooksApi;
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);
WebhooksApi apiInstance = client.webhooks();
String webhookId = "webhookId_example"; // The unique webhook you wish to retreive details on.
try {
Webhook result = apiInstance.get(webhookId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#get");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getMessage());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#get
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const webhookId = 'webhookId_example'; // The unique webhook you wish to retreive details on.
const webhook = await client.webhooks.get(webhookId);
<?php // First install the api client: "composer require api-video/php-api-client" // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/WebhooksApi.md#get require __DIR__ . '/vendor/autoload.php'; $webhookId = 'webhookId_example'; // The unique webhook you wish to retreive details on. $webhook = $client->webhooks()->get($webhookId);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WebhooksApi.md#get
import apivideo
from apivideo.api import webhooks_api
from apivideo.model.webhook import Webhook
from pprint import pprint
# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
# Create an instance of the API class
api_instance = webhooks_api.WebhooksApi(api_client)
webhook_id = "webhookId_example" # str | The unique webhook you wish to retreive details on.
# example passing only required values which don't have defaults set
try:
# Show Webhook details
api_response = api_instance.get(webhook_id)
pprint(api_response)
except apivideo.ApiException as e:
print("Exception when calling WebhooksApi->get: %s\n" % e)
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WebhooksAPI.md#get
Success
{
"webhookId": "webhook_XXXXXXXXXXXXXXX",
"createdAt": "2021-01-08T14:12:18+00:00",
"events": [
"video.encoding.quality.completed"
],
"url": "http://clientnotificationserver.com/notif?myquery=query"
}
Too Many Requests
{
"type": "https://docs.api.video/reference/too-many-requests",
"title": "Too many requests.",
"status": 429
}
/webhooks/{webhookId}
This endpoint will delete the indicated webhook.
webhookId
string
required
The webhook you wish to delete.
No Content
This response is empty
X-RateLimit-Limit
int
The request limit per minute.
X-RateLimit-Remaining
int
The number of available requests left for the current time window.
X-RateLimit-Retry-After
int
The number of seconds left until the current rate limit window resets.
Not Found
type
string
A link to the error documentation.
title
string
A description of the error that occurred.
name
string
The name of the parameter that caused the error.
status
int
The HTTP status code.
X-RateLimit-Limit
int
The request limit per minute.
X-RateLimit-Remaining
int
The number of available requests left for the current time window.
X-RateLimit-Retry-After
int
The number of seconds left until the current rate limit window resets.
Too Many Requests
type
string
A link to the error documentation.
title
string
A description of the error that occurred.
status
int
The HTTP status code.
X-RateLimit-Limit
int
The request limit per minute.
X-RateLimit-Remaining
int
The number of available requests left for the current time window.
X-RateLimit-Retry-After
int
The number of seconds left until the current rate limit window resets.
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WebhooksApi.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 webhookId = webhookId_example; // string | The webhook you wish to delete.
var apiWebhooksInstance = apiInstance.Webhooks();
try
{
// Delete a Webhook
apiWebhooksInstance.delete(webhookId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhooksApi.delete: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// 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/WebhooksApi.md#delete
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main() {
client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
// if you rather like to use the sandbox environment:
// client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
webhookId := "webhookId_example" // string | The webhook you wish to delete.
err := client.Webhooks.Delete(webhookId)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Webhooks.Delete``: %v\
", err)
}
}
// 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/WebhooksApi.md#delete
import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.WebhooksApi;
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);
WebhooksApi apiInstance = client.webhooks();
String webhookId = "webhookId_example"; // The webhook you wish to delete.
try {
apiInstance.delete(webhookId);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#delete");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getMessage());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#delete
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const webhookId = 'webhookId_example'; // The webhook you wish to delete.
await client.webhooks.delete(webhookId);
<?php // First install the api client: "composer require api-video/php-api-client" // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/WebhooksApi.md#delete require __DIR__ . '/vendor/autoload.php'; $webhookId = 'webhookId_example'; // The webhook you wish to delete. $client->webhooks()->delete($webhookId);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WebhooksApi.md#delete
import apivideo
from apivideo.api import webhooks_api
from apivideo.model.not_found import NotFound
from pprint import pprint
# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
# Create an instance of the API class
api_instance = webhooks_api.WebhooksApi(api_client)
webhook_id = "webhookId_example" # str | The webhook you wish to delete.
# example passing only required values which don't have defaults set
try:
# Delete a Webhook
api_instance.delete(webhook_id)
except apivideo.ApiException as e:
print("Exception when calling WebhooksApi->delete: %s\n" % e)
// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WebhooksAPI.md#delete
Not Found
{
"type": "https://docs.api.video/reference/resource-not-found",
"title": "The requested resource was not found.",
"name": "webhookId",
"status": 404
}
Too Many Requests
{
"type": "https://docs.api.video/reference/too-many-requests",
"title": "Too many requests.",
"status": 429
}
type
string
The name of the webhook event that occurred.
emittedAt
string
Returns the date-time when the webhook event occurred.
liveStreamId
string
The ID of the live stream that started broadcasting.
X-Api-Video-WebhookID
string
required
The unique ID of your webhook.
X-Api-Video-Signature
string
required
The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.
Your webhook server may return this response to api.video to signal that the webhook is accepted.
This response is empty
This response does not contain any headers
{
"type": "live-stream.broadcast.started",
"emittedAt": "2024-08-151T10:18:47+00:00",
"liveStreamId": "li400mYKSgQ6xs7taUeSaEap"
}
type
string
The name of the webhook event that occurred.
emittedAt
string
Returns the date-time when the webhook event occurred.
liveStreamId
string
The ID of the live stream that ended broadcasting.
X-Api-Video-WebhookID
string
required
The unique ID of your webhook.
X-Api-Video-Signature
string
required
The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.
Your webhook server may return this response to api.video to signal that the webhook is accepted.
This response is empty
This response does not contain any headers
{
"type": "live-stream.broadcast.ended",
"emittedAt": "2024-08-151T10:18:47+00:00",
"liveStreamId": "li400mYKSgQ6xs7taUeSaEap"
}
type
string
The name of the webhook event that occurred.
emittedAt
string
Returns the date-time when the webhook event occurred.
liveStreamId
string
The ID of the live stream that ended broadcasting.
videoId
string
The video ID of the live stream recording.
X-Api-Video-WebhookID
string
required
The unique ID of your webhook.
X-Api-Video-Signature
string
required
The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.
Your webhook server may return this response to api.video to signal that the webhook is accepted.
This response is empty
This response does not contain any headers
{
"type": "video.source.recorded",
"emittedAt": "2024-08-151T10:18:47+00:00",
"liveStreamId": "li400mYKSgQ6xs7taUeSaEap",
"videoId": "vi4blUQJFrYWbaG44NChkH11"
}
type
string
The name of the webhook event that occurred.
emittedAt
string
Returns the date-time when the webhook event occurred.
videoId
string
The ID of the video where a certain quality version's encoding is finished.
encoding
string
The type of encoding that is finished.
quality
string
The quality version of encoding that is finished.
X-Api-Video-WebhookID
string
required
The unique ID of your webhook.
X-Api-Video-Signature
string
required
The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.
Your webhook server may return this response to api.video to signal that the webhook is accepted.
This response is empty
This response does not contain any headers
{
"type": "video.encoding.quality.completed",
"emittedAt": "2024-08-151T10:18:47+00:00",
"videoId": "vi4blUQJFrYWbaG44NChkH11",
"encoding": "hls",
"quality": "1080p"
}
type
string
The name of the webhook event that occurred.
emittedAt
string
Returns the date-time when the webhook event occurred.
videoId
string
The ID of the video for which the caption was generated.
captionId
string
The ID of the caption that was generated.
generationMode
string
Returns the method used to generate the caption.
transcript
means that the caption was generated based on the transcription of the video. Learn more about transcripts
here
.
language
string
Returns the language of the captions in IETF language tag format.
X-Api-Video-WebhookID
string
required
The unique ID of your webhook.
X-Api-Video-Signature
string
required
The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.
Your webhook server may return this response to api.video to signal that the webhook is accepted.
This response is empty
This response does not contain any headers
{
"type": "video.caption.generated",
"emittedAt": "2024-08-151T10:18:47+00:00",
"videoId": "vi4blUQJFrYWbaG44NCh1234",
"captionId": "caption_1CHAfLFHT5B5EV4vzT1234",
"generationMode": "transcript",
"language": "en"
}
type
string
The name of the webhook event that occurred.
emittedAt
string
Returns the date-time when the webhook event occurred.
videoId
string
The ID of the video for which the summary was generated.
summaryId
string
The ID of the summary that was generated.
X-Api-Video-WebhookID
string
required
The unique ID of your webhook.
X-Api-Video-Signature
string
required
The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.
Your webhook server may return this response to api.video to signal that the webhook is accepted.
This response is empty
This response does not contain any headers
{
"type": "video.summary.generated",
"emittedAt": "2024-08-151T10:18:47+00:00",
"videoId": "vi4blUQJFrYWbaG44NCh1234",
"summaryId": "summary_1CGyYoB9XCgBk4iQna8ocT"
}