Webhooks
Download SpecList all webhooks
Retrieve a list of all webhooks configured for the current workspace.
events
string
The webhook event that you wish to filter on.
- Example
- "video.encoding.quality.completed"
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
apiKey
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/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 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 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 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 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 "@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: 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
Response
Success
{
"data": [
{
"webhookId": "webhook_XXXXXXXXXXXXXXX",
"createdAt": "2021-01-08T14:12:18.000Z",
"events": [
"video.encoding.quality.completed"
],
"url": "http://clientnotificationserver.com/notif?myquery=query"
},
{
"webhookId": "webhook_XXXXXXXXXYYYYYY",
"createdAt": "2021-01-12T12:12:12.000Z",
"events": [
"video.encoding.quality.completed"
],
"url": "http://clientnotificationserver.com/notif?myquery=query2"
}
],
"pagination": {
"currentPage": 1,
"pageSize": 25,
"pagesTotal": 1,
"itemsTotal": 11,
"currentPageItems": 11,
"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"
}
]
}
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Too Many Requests
{
"type": "https://docs.api.video/reference/too-many-requests",
"title": "Too many requests.",
"status": 429
}
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.
data
array[object (Webhook)]
required
Webhook
object (Webhook)
webhookId
string
Unique identifier of the webhook
- Example
- "webhook_XXXXXXXXXXXXXXX"
createdAt
string
date-time
When an webhook was created, presented in ISO-8601 format.
- Example
- "2019-06-24T11:45:01.109Z"
events
array[string]
A list of events that will trigger the webhook.
- Example
- "[\"video.encoding.quality.completed\"]"
string
url
string
URL of the webhook
- Example
- "http://clientnotificationserver.com/notif?myquery=query"
pagination
object (pagination)
required
- Example
- { "itemsTotal": 123, "pagesTotal": 7, "pageSize": 20, "currentPage": 3, "currentPageItems": 20, "links": { "first": { "rel": "first", "uri": "/videos/search?currentPage=1&pageSize=20" }, "previous": { "rel": "previous", "uri": "/videos/search?currentPage=2&pageSize=20" }, "next": { "rel": "next", "uri": "/videos/search?currentPage=4&pageSize=20" }, "last": { "rel": "last", "uri": "/videos/search?currentPage=6&pageSize=20" } } }
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[object (PaginationLink)]
required
PaginationLink
object (PaginationLink)
rel
string
uri
string
uri
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.
Create Webhook
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.
events
array[string]
required
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 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
Occurs when a live stream is recorded and submitted for encoding.
- Example
- [ "video.encoding.quality.completed" ]
string
url
string
required
The the url to which HTTP notifications are sent. It could be any http or https URL.
- Example
- "https://example.com/webhooks"
apiKey
Request
{
"events": [
"video.encoding.quality.completed"
],
"url": "http://clientnotificationserver.com/notif?myquery=query"
}
// 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 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);
# 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 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 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);
}
}
}
}
<?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: 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
}
Response
Created
{
"webhookId": "webhook_XXXXXXXXXXXXXXX",
"createdAt": "2021-01-08T14:12:18.000Z",
"events": [
"video.encoding.quality.completed"
],
"url": "http://clientnotificationserver.com/notif?myquery=query"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Bad Request
{
"type": "https://docs.api.video/docs/attributerequired",
"events": "This attribute is required.",
"name": "events",
"status": 400,
"problems": [
{
"type": "https://docs.api.video/docs/attributerequired",
"title": "This attribute is required.",
"name": "events"
},
{
"type": "https://docs.api.video/docs/attributerequired",
"title": "This attribute is required.",
"name": "url"
},
{
"type": "https://docs.api.video/docs/attributeinvalid",
"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
}
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.
webhookId
string
Unique identifier of the webhook
- Example
- "webhook_XXXXXXXXXXXXXXX"
createdAt
string
date-time
When an webhook was created, presented in ISO-8601 format.
- Example
- "2019-06-24T11:45:01.109Z"
events
array[string]
A list of events that will trigger the webhook.
- Example
- "[\"video.encoding.quality.completed\"]"
string
url
string
URL of the webhook
- Example
- "http://clientnotificationserver.com/notif?myquery=query"
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.
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[object (BadRequest)]
Returns any additional problems in the request in an array of objects.
BadRequest
object (BadRequest)
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.
webhookId
string
required
The unique webhook you wish to retreive details on.
apiKey
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/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 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);
# 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 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 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);
}
}
}
}
<?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: 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
Response
Success
{
"webhookId": "webhook_XXXXXXXXXXXXXXX",
"createdAt": "2021-01-08T14:12:18.000Z",
"events": [
"video.encoding.quality.completed"
],
"url": "http://clientnotificationserver.com/notif?myquery=query"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Too Many Requests
{
"type": "https://docs.api.video/reference/too-many-requests",
"title": "Too many requests.",
"status": 429
}
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.
webhookId
string
Unique identifier of the webhook
- Example
- "webhook_XXXXXXXXXXXXXXX"
createdAt
string
date-time
When an webhook was created, presented in ISO-8601 format.
- Example
- "2019-06-24T11:45:01.109Z"
events
array[string]
A list of events that will trigger the webhook.
- Example
- "[\"video.encoding.quality.completed\"]"
string
url
string
URL of the webhook
- Example
- "http://clientnotificationserver.com/notif?myquery=query"
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.
webhookId
string
required
The webhook you wish to delete.
apiKey
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/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 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);
# 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 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 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);
}
}
}
}
<?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: 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
Response
No Content
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Not Found
{
"type": "https://docs.api.video/docs/resourcenot_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
}
No schema
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.
type
string
title
string
name
string
status
int
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.
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.
Was this page helpful?