All URIs are relative to https://ws.api.video
Method | HTTP request | Description |
---|---|---|
upload | POST /watermarks | Upload a watermark |
delete | DELETE /watermarks/{watermarkId} | Delete a watermark |
list | GET /watermarks | List all watermarks |
Watermark upload(file) okhttp3.Call uploadAsync(file, callback) ApiResponse uploadWithHttpInfo(file)
Upload a watermark
Create a new watermark by uploading a JPG
or a PNG
image.
// Import classes:
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", Environment.SANDBOX);
WatermarksApi apiInstance = client.watermarks();
File file = new File("/path/to/file"); // The `.jpg` or `.png` image to be added as a watermark.
try {
Watermark result = apiInstance.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();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
file | File | The `.jpg` or `.png` image to be added as a watermark. |
- Content-Type: multipart/form-data
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | * X-RateLimit-Limit - The request limit per minute. * X-RateLimit-Remaining - The number of available requests left for the current time window. * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets. |
400 | Bad Request | * X-RateLimit-Limit - The request limit per minute. * X-RateLimit-Remaining - The number of available requests left for the current time window. * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets. |
429 | Too Many Requests | * X-RateLimit-Limit - The request limit per minute. * X-RateLimit-Remaining - The number of available requests left for the current time window. * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets. |
delete(watermarkId) okhttp3.Call deleteAsync(watermarkId, callback) ApiResponse deleteWithHttpInfo(watermarkId)
Delete a watermark
Delete a watermark.
// Import classes:
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", Environment.SANDBOX);
WatermarksApi apiInstance = client.watermarks();
String watermarkId = "watermark_1BWr2L5MTQwxGkuxKjzh6i"; // The watermark ID for the watermark you want to delete.
try {
apiInstance.delete(watermarkId);
} catch (ApiException e) {
System.err.println("Exception when calling WatermarksApi#delete");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getMessage());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
watermarkId | String | The watermark ID for the watermark you want to delete. |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | * X-RateLimit-Limit - The request limit per minute. * X-RateLimit-Remaining - The number of available requests left for the current time window. * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets. |
404 | Not Found | * X-RateLimit-Limit - The request limit per minute. * X-RateLimit-Remaining - The number of available requests left for the current time window. * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets. |
429 | Too Many Requests | * X-RateLimit-Limit - The request limit per minute. * X-RateLimit-Remaining - The number of available requests left for the current time window. * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets. |
WatermarksListResponse list().sortBy(sortBy).sortOrder(sortOrder).currentPage(currentPage).pageSize(pageSize).execute() okhttp3.Call executeAsync(callback) ApiResponse executeWithHttpInfo()
List all watermarks
List all watermarks associated with your workspace.
// Import classes:
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", Environment.SANDBOX);
WatermarksApi apiInstance = client.watermarks();
String sortBy = "createdAt"; // Allowed: createdAt. You can search by the time watermark were created at.
String sortOrder = "asc"; // Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A.
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<Watermark> result = apiInstance.list()
.sortBy(sortBy)
.sortOrder(sortOrder)
.currentPage(currentPage)
.pageSize(pageSize)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WatermarksApi#list");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getMessage());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
sortBy | String | Allowed: createdAt. You can search by the time watermark were created at. | [optional] |
sortOrder | String | Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A. | [optional] |
currentPage | Integer | Choose the number of search results to return per page. Minimum value: 1 | [optional] [default to 1] |
pageSize | Integer | Results per page. Allowed values 1-100, default is 25. | [optional] [default to 25] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | * X-RateLimit-Limit - The request limit per minute. * X-RateLimit-Remaining - The number of available requests left for the current time window. * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets. |
400 | Bad Request | * X-RateLimit-Limit - The request limit per minute. * X-RateLimit-Remaining - The number of available requests left for the current time window. * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets. |
429 | Too Many Requests | * X-RateLimit-Limit - The request limit per minute. * X-RateLimit-Remaining - The number of available requests left for the current time window. * X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets. |