/watermarks
List all watermarks associated with your workspace.
sortBy
string
Allowed: createdAt. You can search by the time watermark were created at.
sortOrder
string
Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A.
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.
apiKey
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.
Success
data
array[object (Watermark)]
required
Watermark
object (Watermark)
watermarkId
string
The unique identifier of the watermark.
createdAt
string
When the watermark was created, presented in ISO-8601 format.
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[object (PaginationLink)]
required
PaginationLink
object (PaginationLink)
rel
string
uri
string
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[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.
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WatermarksApi.md#list
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
// retrieve the first page of all watermarks
const watermarks = await client.watermarks.list({});
// retrieve the 5 first watermarks, ordered by creation date
const watermarks2 = await client.watermarks.list({});
createdAt
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WatermarksApi.md#list
// 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/WatermarksApi.md#list
// 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/WatermarksApi.md#list
<?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/WatermarksApi.md#list
require __DIR__ . '/vendor/autoload.php';
$client = new \ApiVideo\Client\Client(
'https://ws.api.video',
'YOUR_API_KEY',
new \Symfony\Component\HttpClient\Psr18Client()
);
// retrieve the first page of all watermarks
$watermarks = client->watermarks()->list();
// retrieve the 5 first watermarks, ordered by creation date
$watermarks2 = $client->watermarks()->list(array(
'pageSize' => 5,
'sortBy' => 'createdAt',
'sortOrder' => 'asc'
));
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WatermarksApi.md#list
// 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/WatermarksAPI.md#list
Success
{
"data": [
{
"watermarkId": "watermark_1BWr2L5MTQwxGkuxKjzh6i",
"createdAt": "2019-12-16T08:25:51.000Z"
},
{
"watermarkId": "watermark_3BWC2L5MTQwxGkuxKjzh7g",
"createdAt": "2019-12-16T08:25:51.000Z"
}
],
"pagination": {
"currentPage": 1,
"pageSize": 25,
"pagesTotal": 1,
"itemsTotal": 11,
"currentPageItems": 11,
"links": [
{
"rel": "self",
"uri": "https://ws.api.video/watermarks?currentPage=1"
},
{
"rel": "first",
"uri": "https://ws.api.video/watermarks?currentPage=1"
},
{
"rel": "last",
"uri": "https://ws.api.video/watermarks?currentPage=1"
}
]
}
}
Bad Request
{
"title": "This parameter is out of the allowed range of values.",
"name": "page",
"status": 400,
"range": {
"min": 1
},
"problems": [
{
"title": "This parameter is out of the allowed range of values.",
"name": "page",
"range": {
"min": 1
}
},
{
"title": "This parameter is out of the allowed range of values.",
"name": "pageSize",
"range": {
"min": 10,
"max": 100
}
}
]
}
Too Many Requests
{
"type": "https://docs.api.video/reference/too-many-requests",
"title": "Too many requests.",
"status": 429
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
/watermarks
Create a new watermark by uploading a JPG
or a PNG
image.
file
file
required
The .jpg
or .png
image to be added as a watermark.
apiKey
Success
watermarkId
string
The unique identifier of the watermark.
createdAt
string
When the watermark was created, presented in ISO-8601 format.
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.
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[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.
// 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/WatermarksApi.md#upload
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()
file, _ := os.Open("./watermark.jpg")
res, err := client.Watermarks.UploadFile(file)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `Watermarks.UploadFile``: %v", err)
}
// response from `UploadFile`: Watermark
fmt.Fprintf(os.Stdout, "Response from `Watermarks.UploadFile`: %v", res)
}
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WatermarksApi.md#upload
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
// Upload a watermark
const watermark = await client.watermarks.upload('test/data/test.jpg');
// create a video with watermark
const watermarkVideo = await client.videos.create({
title: 'Nodejs - watermark',
watermark: {
id: watermark.watermarkId,
top: '0px',
left: '0px',
width: '100px',
height: '100px',
},
});
<?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/WatermarksApi.md#upload
require __DIR__ . '/vendor/autoload.php';
$client = new \ApiVideo\Client\Client(
'https://ws.api.video',
'YOUR_API_KEY',
new \Symfony\Component\HttpClient\Psr18Client()
);
// upload the watermark
$watermark = $client->watermarks()->upload(new SplFileObject(__DIR__ . '/watermark.png'));
// create a new video with the watermark
$video = $client->videos()->create((new VideoCreationPayload())
->setWatermark((new VideoWatermark())
->setId($watermark->getWatermarkId())
->setTop("0px")
->setLeft("0px")
->setWidth("100px")
->setHeight("100px"))
->setTitle("Test PHP watermark")
);
// upload the video
$client->videos()->upload($video->getVideoId(), new SplFileObject(__DIR__ . '/558k.mp4'));
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WatermarksApi.md#upload
import apivideo
from apivideo.api import videos_api
from apivideo.model.bad_request import BadRequest
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 = videos_api.WatermarksApi(api_client)
file = open('/path/to/file', 'rb') # file_type | The watermark image.
# example passing only required values which don't have defaults set
try:
# Upload a watermark
api_response = api_instance.upload(file)
pprint(api_response)
except apivideo.ApiException as e:
print("Exception when calling WatermarksApi->upload: %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/WatermarksApi.md#upload
import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.WatermarksApi;
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);
WatermarksApi watermarkApi = apiClient.watermarks();
File file = new File("/path/to/file"); // The watermark image.
try {
Watermark result = watermarkApi.upload(file);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WatermarksApi#upload");
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/WatermarksApi.md#upload
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class uploadWatermarkExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var file = File.OpenRead("watermark.jpg"); // The watermark image.
var apiWatermarksInstance = apiInstance.Watermarks();
try
{
// Upload a watermark
Video result = apiWatermarksInstance.upload(videoId, file);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WatermarksApi.upload: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// 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/WatermarksAPI.md#upload
Success
{
"watermarkId": "watermark_1BWr2L5MTQwxGkuxKjzh6i",
"createdAt": "2020-03-03T12:52:03.085Z"
}
Bad Request
{
"status": 400,
"type": "https://docs.api.video/reference/uploaded-file-extension-invalid",
"title": "Only [jpeg, jpg, JPG, JPEG, png, PNG] extensions are supported.",
"name": "file"
}
Too Many Requests
{
"type": "https://docs.api.video/reference/too-many-requests",
"title": "Too many requests.",
"status": 429
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
/watermarks/{watermarkId}
Delete a watermark.
watermarkId
string
required
The watermark ID for the watermark you want to delete.
apiKey
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
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.
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 install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WatermarksApi.md#delete
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const watermarkId = 'watermark_1Bji68oeAAwR44dAb5ZhML'; // The watermark ID for the watermark you want to delete.
client.watermarks.delete(watermarkId);
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WatermarksApi.md#delete
// 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/WatermarksApi.md#delete
// 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/WatermarksApi.md#delete
<?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/WatermarksApi.md#list
require __DIR__ . '/vendor/autoload.php';
$client = new \ApiVideo\Client\Client(
'https://ws.api.video',
'YOUR_API_KEY',
new \Symfony\Component\HttpClient\Psr18Client()
);
$watermarkId = 'watermark_1Bji68oeAAwR44dAb5ZhML'; // The watermark ID for the watermark you want to delete.
$client->watermarks->delete(watermarkId);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WatermarksApi.md#delete
// 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/WatermarksAPI.md#delete
No Content
Empty response
Not Found
{
"type": "https://docs.api.video/reference/resource-not-found",
"title": "The requested resource was not found.",
"name": "watermarkId",
"status": 404
}
Too Many Requests
{
"type": "https://docs.api.video/reference/too-many-requests",
"title": "Too many requests.",
"status": 429
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Was this page helpful?