Skip to main content

watermarks

Creates, updates, deletes, gets or lists a watermarks resource.

Overview

Namewatermarks
TypeResource
Idcloudflare.streams.watermarks

Fields

The following fields are returned by SELECT queries:

Watermark profile details response.

NameDatatypeDescription
namestringA short description of the watermark profile. (default: , example: Marketing Videos)
createdstring (date-time)The date and a time a watermark profile was created. (example: 2014-01-02T02:20:00Z)
downloadedFromstringThe 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)
heightintegerThe height of the image in pixels.
opacitynumberThe 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.
paddingnumberThe 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.
positionstringThe location of the image. Valid positions are: upperRight, upperLeft, lowerLeft, lowerRight, and center. Note that center ignores the padding parameter. (default: upperRight, example: center)
scalenumberThe 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.
sizenumberThe size of the image in bytes.
uidstringThe unique identifier for a watermark profile. (example: ea95132c15732412d22c1476fa83f27a)
widthintegerThe width of the image in pixels.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectidentifier, account_idRetrieves details for a single watermark profile.
listselectaccount_idLists all watermark profiles for an account.
createinsertaccount_idCreates watermark profiles using a single HTTP POST multipart/form-data request.
deletedeleteidentifier, account_idDeletes 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
identifierstringResource identifier.

SELECT examples

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
;

INSERT examples

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
;

DELETE examples

Deletes a watermark profile.

DELETE FROM cloudflare.streams.watermarks
WHERE identifier = '{{ identifier }}' --required
AND account_id = '{{ account_id }}' --required
;