watermarks
Creates, updates, deletes, gets or lists a watermarks resource.
Overview
| Name | watermarks |
| Type | Resource |
| Id | cloudflare.streams.watermarks |
Fields
The following fields are returned by SELECT queries:
- get
- list
Watermark profile details response.
| Name | Datatype | Description |
|---|---|---|
name | string | A short description of the watermark profile. (default: , example: Marketing Videos) |
created | string (date-time) | The date and a time a watermark profile was created. (example: 2014-01-02T02:20:00Z) |
downloadedFrom | string | The source URL for a downloaded image. If the watermark profile was created via direct upload, this field is null. (example: https://company.com/logo.png) |
height | integer | The height of the image in pixels. |
opacity | number | The translucency of the image. A value of 0.0 makes the image completely transparent, and 1.0 makes the image completely opaque. Note that if the image is already semi-transparent, setting this to 1.0 will not make the image completely opaque. |
padding | number | The whitespace between the adjacent edges (determined by position) of the video and the image. 0.0 indicates no padding, and 1.0 indicates a fully padded video width or length, as determined by the algorithm. |
position | string | The location of the image. Valid positions are: upperRight, upperLeft, lowerLeft, lowerRight, and center. Note that center ignores the padding parameter. (default: upperRight, example: center) |
scale | number | The size of the image relative to the overall size of the video. This parameter will adapt to horizontal and vertical videos automatically. 0.0 indicates no scaling (use the size of the image as-is), and 1.0 fills the entire video. |
size | number | The size of the image in bytes. |
uid | string | The unique identifier for a watermark profile. (example: ea95132c15732412d22c1476fa83f27a) |
width | integer | The width of the image in pixels. |
List watermark profiles response.
| Name | Datatype | Description |
|---|---|---|
name | string | A short description of the watermark profile. (default: , example: Marketing Videos) |
created | string (date-time) | The date and a time a watermark profile was created. (example: 2014-01-02T02:20:00Z) |
downloadedFrom | string | The source URL for a downloaded image. If the watermark profile was created via direct upload, this field is null. (example: https://company.com/logo.png) |
height | integer | The height of the image in pixels. |
opacity | number | The translucency of the image. A value of 0.0 makes the image completely transparent, and 1.0 makes the image completely opaque. Note that if the image is already semi-transparent, setting this to 1.0 will not make the image completely opaque. |
padding | number | The whitespace between the adjacent edges (determined by position) of the video and the image. 0.0 indicates no padding, and 1.0 indicates a fully padded video width or length, as determined by the algorithm. |
position | string | The location of the image. Valid positions are: upperRight, upperLeft, lowerLeft, lowerRight, and center. Note that center ignores the padding parameter. (default: upperRight, example: center) |
scale | number | The size of the image relative to the overall size of the video. This parameter will adapt to horizontal and vertical videos automatically. 0.0 indicates no scaling (use the size of the image as-is), and 1.0 fills the entire video. |
size | number | The size of the image in bytes. |
uid | string | The unique identifier for a watermark profile. (example: ea95132c15732412d22c1476fa83f27a) |
width | integer | The width of the image in pixels. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | identifier, account_id | Retrieves details for a single watermark profile. | |
list | select | account_id | Lists all watermark profiles for an account. | |
create | insert | account_id | Creates watermark profiles using a single HTTP POST multipart/form-data request. | |
delete | delete | identifier, account_id | Deletes a watermark profile. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
identifier | string | Resource identifier. |
SELECT examples
- get
- list
Retrieves details for a single watermark profile.
SELECT
name,
created,
downloadedFrom,
height,
opacity,
padding,
position,
scale,
size,
uid,
width
FROM cloudflare.streams.watermarks
WHERE identifier = '{{ identifier }}' -- required
AND account_id = '{{ account_id }}' -- required
;
Lists all watermark profiles for an account.
SELECT
name,
created,
downloadedFrom,
height,
opacity,
padding,
position,
scale,
size,
uid,
width
FROM cloudflare.streams.watermarks
WHERE account_id = '{{ account_id }}' -- required
;
INSERT examples
- create
- Manifest
Creates watermark profiles using a single HTTP POST multipart/form-data request.
INSERT INTO cloudflare.streams.watermarks (
name,
opacity,
padding,
position,
scale,
url,
account_id
)
SELECT
'{{ name }}',
{{ opacity }},
{{ padding }},
'{{ position }}',
{{ scale }},
'{{ url }}',
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: watermarks
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the watermarks resource.
- name: name
value: "{{ name }}"
description: |
A short description of the watermark profile.
default:
- name: opacity
value: {{ opacity }}
description: |
The translucency of the image. A value of `0.0` makes the image completely transparent, and `1.0` makes the image completely opaque. Note that if the image is already semi-transparent, setting this to `1.0` will not make the image completely opaque.
default: 1
- name: padding
value: {{ padding }}
description: |
The whitespace between the adjacent edges (determined by position) of the video and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded video width or length, as determined by the algorithm.
default: 0.05
- name: position
value: "{{ position }}"
description: |
The location of the image. Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and `center`. Note that `center` ignores the `padding` parameter.
default: upperRight
- name: scale
value: {{ scale }}
description: |
The size of the image relative to the overall size of the video. This parameter will adapt to horizontal and vertical videos automatically. `0.0` indicates no scaling (use the size of the image as-is), and `1.0 `fills the entire video.
default: 0.15
- name: url
value: "{{ url }}"
description: |
URL of the watermark image to copy.
DELETE examples
- delete
Deletes a watermark profile.
DELETE FROM cloudflare.streams.watermarks
WHERE identifier = '{{ identifier }}' --required
AND account_id = '{{ account_id }}' --required
;