Skip to main content

keys

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

Overview

Namekeys
TypeResource
Idcloudflare.streams.keys

Fields

The following fields are returned by SELECT queries:

List signing keys response.

NameDatatypeDescription
idstringIdentifier. (example: 023e105f4ecef8ad9ca31a8372d0c353)
key_idstringThe unique identifier for the signing key. (example: e9db990a82666dd571c77f944a5c5c8d)
createdstring (date-time)The date and time a signing key was created. (example: 2014-01-02T02:20:00Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_idLists the video ID and creation date and time when a signing key was created.
createinsertaccount_idCreates an RSA private key in PEM and JWK formats. Key files are only displayed once after creation. Keys are created, used, and deleted independently of videos, and every key can sign any video.
deletedeleteidentifier, account_idDeletes signing keys and revokes all signed URLs generated with the key.

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

Lists the video ID and creation date and time when a signing key was created.

SELECT
id,
key_id,
created
FROM cloudflare.streams.keys
WHERE account_id = '{{ account_id }}' -- required
;

INSERT examples

Creates an RSA private key in PEM and JWK formats. Key files are only displayed once after creation. Keys are created, used, and deleted independently of videos, and every key can sign any video.

INSERT INTO cloudflare.streams.keys (
account_id
)
SELECT
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

DELETE examples

Deletes signing keys and revokes all signed URLs generated with the key.

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