Skip to main content

admin

Manage a running registry server from the command line. All subcommands connect to the server configured in event-spec.yaml (registry.mode: server).

Prerequisites

Your workspace must be configured for server mode:

event-spec.yaml
registry:
mode: server
url: https://registry.example.com
api_key: "${REGISTRY_API_KEY}"

Synopsis

event-spec admin <subcommand> [flags]

Subcommands

SubcommandDescription
statusPrint server status and uptime
keysCreate, list, and revoke API keys
auditQuery the server audit log
webhooksAdd, list, and remove webhook endpoints
configGet and set server configuration
appsManage app (source) registrations
destinationsManage destination (provider) configurations

status

Print the server's current status and uptime.

event-spec admin status

keys

Manage API keys for server access.

keys create

event-spec admin keys create --role <role> [--name <name>] [--expires <duration>]
FlagRequiredDescription
--roleYesKey role: viewer, publisher, or admin
--nameNoHuman-readable label for the key
--expiresNoExpiry duration, e.g. 24h, 7d, 90d
# Read-only key for a dashboard
event-spec admin keys create --role viewer --name "grafana-dashboard"

# Publisher key that expires in 90 days
event-spec admin keys create --role publisher --name "web-app" --expires 90d

# Long-lived admin key
event-spec admin keys create --role admin --name "ci-pipeline"

The created key value is printed once — store it immediately.

keys list

event-spec admin keys list [--format <format>]
FlagDefaultDescription
--formattextOutput format: text or json

keys revoke

event-spec admin keys revoke <key-id>

Immediately revokes the key. Any request using the revoked key will receive 401 Unauthorized.


audit

Query the server audit log.

event-spec admin audit [flags]
FlagDefaultDescription
--sinceStart time (RFC3339), e.g. 2024-01-01T00:00:00Z
--untilEnd time (RFC3339)
--entityFilter by entity type: event, source, or destination
--userFilter by user/key that performed the action
--formattextOutput format: text or json
--limitMaximum number of entries to return
# All entries from the past day
event-spec admin audit --since 2024-01-01T00:00:00Z

# Recent event publishes in JSON
event-spec admin audit --entity event --format json --limit 50

webhooks

Manage webhook endpoints that receive server-side event notifications.

webhooks add

event-spec admin webhooks add <url>
event-spec admin webhooks add https://hooks.example.com/event-spec

webhooks list

event-spec admin webhooks list [--format <format>]

webhooks remove

event-spec admin webhooks remove <id>

config

Get and set server runtime configuration.

config get

event-spec admin config get [--format <format>]

Prints the current server configuration. Use --format json for machine-readable output.

config set

event-spec admin config set <key> <value>
KeyValuesDescription
hooks_enabledtrue | falseEnable or disable server-side hook execution
event-spec admin config set hooks_enabled false

apps

Manage app registrations. Apps are named clients that group API keys and event subscriptions.

App definitions are YAML files:

apps/web-app.yaml
name: web-app
platform: web
language: typescript
events:
- ecommerce/**

apps list

event-spec admin apps list

apps get

event-spec admin apps get <name>

apps create

event-spec admin apps create <file.yaml>
event-spec admin apps create apps/web-app.yaml

apps update

event-spec admin apps update <file.yaml>

apps delete

event-spec admin apps delete <name> [--yes]

Pass --yes to skip the confirmation prompt.


destinations

Manage destination configurations. Destinations define analytics provider credentials and settings.

Destination definitions are YAML files:

destinations/amplitude.yaml
name: amplitude
provider: amplitude
config:
api_key: "${AMPLITUDE_API_KEY}"

destinations list

event-spec admin destinations list

destinations get

event-spec admin destinations get <name>

destinations create

event-spec admin destinations create <file.yaml>
event-spec admin destinations create destinations/amplitude.yaml

destinations update

event-spec admin destinations update <file.yaml>

destinations delete

event-spec admin destinations delete <name> [--yes]

Pass --yes to skip the confirmation prompt.


See also