Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

sylphx events realtime_channels

Every sylphx events realtime_channels command: its argument, its flags and a run line.

The realtime_channels commands of Sylphx Events, as the CLI spells them: the same calls as the realtime_channels API page, typed for the shell. Install, sign in and the grammar are on the CLI index.

#get

Gets a realtime channel.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx events realtime-channels get orgs/acme/projects/shop/envs/production/realtime_channels/realtime-channel

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/realtime_channels/realtime-channel · scope events:read · effect read · Request, response and examples

#list

Lists realtime channels.

PARENT — optional: the CLI fills it from the linked project or the key's scope when it is left out.

CLI

Shell
sylphx events realtime-channels list orgs/acme/projects/shop/envs/production

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/realtime_channels · scope events:read · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--page-sizeintAt most this many; default 50, clamped to 1000.
--page-tokenstringnext_page_token of the previous page.
--filterstringAIP-160 filter over labels and filterable fields.
--order-bystringAIP-132 ordering over filterable fields.

#create

Creates a realtime channel.

ID — The id segment of the new Resource's name; the server assigns one when omitted.

CLI

Shell
sylphx events realtime-channels create --parent orgs/acme/projects/shop/envs/production

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/realtime_channels · scope events:write · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--parentstringThe parent to create in; defaults to the linked project or the key's scope.
--meta.labelskey=valueCaller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value.
--meta.annotationskey=valueCaller-writable, unindexed annotations. Repeat the flag for each value.
--meta.display-namestringCaller-writable human-readable name.
--spec.publishable-okboolAllow clients holding a publishable key (events:realtime:subscribe) to connect.
--spec.history-retentiondurationHow far back a cursor may resume; default 24h, at most 7d.
--dry-runboolValidate and print the result without writing (validate_only).

#update

Updates a realtime channel.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx events realtime-channels update orgs/acme/projects/shop/envs/production/realtime_channels/realtime-channel

PATCH https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/realtime_channels/realtime-channel · scope events:write · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--meta.labelskey=valueCaller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value.
--meta.annotationskey=valueCaller-writable, unindexed annotations. Repeat the flag for each value.
--meta.display-namestringCaller-writable human-readable name.
--spec.publishable-okboolAllow clients holding a publishable key (events:realtime:subscribe) to connect.
--spec.history-retentiondurationHow far back a cursor may resume; default 24h, at most 7d.
--allow-missingboolCreate the realtime channel when it does not exist (declarative upsert).
--dry-runboolValidate and print the result without writing (validate_only).

#publish

Publishes one message to the channel: it is appended to the channel's history and pushed to every connected client. A retry with the same Idempotency-Key returns the first message.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx events realtime-channels publish orgs/acme/projects/shop/envs/production/realtime_channels/realtime-channel

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/realtime_channels/realtime-channel:publish · scope events:publish · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--message-typestringThe message name, 1 to 255 of [A-Za-z0-9._:-]. Required.
--datajsonThe payload; at most 64 KiB as JSON.
--client-idstringThe publisher's client id, shown to subscribers.

#issue-token

Mints a subscribe token (rtt_…) for this channel alone, at most an hour long, for a browser or device that holds no key. A token that names a client id enters the channel's presence while it is connected.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx events realtime-channels issue-token orgs/acme/projects/shop/envs/production/realtime_channels/realtime-channel

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/realtime_channels/realtime-channel:issueToken · scope events:publish · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--ttldurationHow long the token lives; default and at most 1 hour, at least 1 minute.
--client-idstringThe client this token is for; with it, the connection enters presence.
--client-datajsonThe client's presence data, at most 4 KiB as JSON.

#delete

Deletes a realtime channel.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx events realtime-channels delete orgs/acme/projects/shop/envs/production/realtime_channels/realtime-channel --yes

DELETE https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/realtime_channels/realtime-channel · scope events:write · effect destructive · Request, response and examples

Flags

FlagTypeWhat it does
--etagstringDelete only if the current etag matches.
--allow-missingboolSucceed when the realtime channel does not exist.
--dry-runboolValidate and print the result without writing (validate_only).
--forceboolAlso delete the channel's history. Without it, a channel with retained messages is still deleted and its history stops being readable.
--yesboolDo not ask before this destructive call.