Server, API and tokens
Status
Check the server and your sign-in:
relic auth status
It reports the server's version, the round trip and who you are. For
administrators it also runs the database and object storage health checks and
exits with 1 when one fails. When the server cannot reach its database, it
shows a failed database check for any user and exits with 1. For a service
on this machine, see
relic server status.
Storage check
Queue a check of stored content against the database (administrators):
relic storage check
Wait for the check and print its report:
relic storage check --wait
It reports missing or damaged content (exit status 1 with --wait) and hands
unused content to garbage collection. The worker also runs it daily
(Operations).
--wait gives up when no worker has started the check within 5 minutes, or
when the check has not finished within --timeout (3 hours). Wait at most one
hour:
relic storage check --wait --timeout 1h
Audit log
List the last day's audit events (viewers and administrators):
relic audit list --since 24h
--actor, --action, --target and --outcome (success, denied,
failure) narrow the list (Audit log).
Usage
Print storage, growth, downloads and deploys by repository, project and user for the last 90 days (viewers and administrators):
relic usage --days 90
The period defaults to 30 days, at most 730 (Usage reports).
Webhooks
List a webhook's latest deliveries (viewers and administrators); without a name, all webhooks':
relic webhook deliveries ci-notify
Queue a webhook.ping event (administrators):
relic webhook ping ci-notify
Project members
Administrators and a project's admins add and remove members one at a time (Projects).
Add a group to a project as viewers:
relic project member-add acme qa --group --role viewer
Remove a user from a project:
relic project member-remove acme alice
MCP server and skill registries
List the entries of an mcp or skills repository you may read. Administrators
and viewers also see unapproved entries:
relic registry list mcp-servers
Approve an entry's current content so the registry serves it (administrators):
relic registry approve mcp-servers/weather/1.1.0/server.json
Withdraw the approval:
relic registry revoke mcp-servers/weather/1.1.0/server.json
See AI agents.
Calling the API
relic api sends a request with the current context's credentials and prints
the response. A path without a leading / is under /api/v1/. -d sends a body
(@file, @- for standard input) as POST unless -X says otherwise. An error
response exits with 1.
Send a POST request with a body from a file:
relic api -X POST 'builds/app/runs/7:promote' -d @promote.json
Call a Connect method, with the body on standard input:
echo '{"name": "libs-local"}' | relic api /api/relic.v1.RepositoryService/GetRepository -d @-
API documentation
relic api docs reads the OpenAPI description of the server you use.
List the operations that match a query (all without one):
relic api docs token
Show an operation's parameters, bodies and schemas:
relic api docs describe SecurityService_CreateToken
Access tokens
Create a token that expires in 30 days and export it:
export RELIC_TOKEN=$(relic auth token create --description ci --expires-days 30)
As an administrator, create a refreshable 10-minute token for another user. The access token goes to standard output, the refresh token to standard error:
relic auth token create --user ci-bot --expires-in 10m --refreshable
Create a token that acts with one group's permissions only; the group must exist:
relic auth token create --group deployers -o json
List your tokens; administrators and viewers see everyone's, or one user's with
--user:
relic auth token list
Revoke a token by the id relic auth token list shows:
relic auth token revoke 01a14acc-9a25-73a0-b25c-c7f3bb3ab7a5
Relic prints a token once and keeps no copy; it checks the token's signature.
A token works with the Relic API, relic and every package manager client.