roark calls the Roark Analytics API from the command line. Commands read noun before verb, so the resource is what you type first and the verb is one of list, get, create, update or delete unless the operation is genuinely something else.
roark <resource> [<sub-resource>...] <verb> [arguments] [options]
Global options
Every command accepts these in addition to its own options.Sending a body
Commands that send a request body accept these as well.Configuration
Settings are resolved highest precedence first: command line flag, environment variable, project.roark.json found by walking up from the working directory, then the user config file. The stored credential is written with mode 0600.
Environment
| Variable | Description |
|---|---|
ROARK_API_BEARER_TOKEN | Bearer token used when --token is not given. |
ROARK_BASE_URL | API base URL. |
XDG_CONFIG_HOME | Overrides the location of the user config file. |
ROARK_ALLOW_PROJECT_BASE_URL | Trusts a base URL set by a project .roark.json, like --allow-project-base-url. |
NO_COLOR | Disables colour when set to any value. |
Exit codes
Distinct per failure mode, so a CI job can tell a rejected request from a missing credential without reading stderr.| Code | Meaning |
|---|---|
0 | The command succeeded. |
1 | The API rejected the request. |
2 | The command line was wrong. |
3 | No credential, or the credential was refused. |
4 | The addressed resource does not exist. |
5 | The request never completed: connection, timeout, or abort. |
Commands
roark <command> --help prints the same options any of these pages lists.
agent
| Command | Description |
|---|---|
roark agent build | Build a Roark-hosted agent |
roark agent conversation create | Start a conversation with an agent |
roark agent create | Create an agent |
roark agent draft create | Start a draft |
roark agent draft delete | Discard the draft |
roark agent draft get | Get an agent’s draft |
roark agent draft publish | Publish the draft |
roark agent draft update | Edit the draft |
roark agent endpoint create | Create an agent endpoint |
roark agent endpoint get | Get an agent endpoint |
roark agent endpoint list | List agent endpoints |
roark agent endpoint update | Update an agent endpoint |
roark agent get | Get an agent |
roark agent list | List agents |
roark agent prompt list | List an agent’s prompts |
roark agent prompt update | Set an agent’s prompt |
roark agent prompt version list | List a prompt’s versions |
roark agent update | Update an agent |
roark agent version get | Get an agent version |
roark agent version list | List an agent’s versions |
roark agent version rollback | Roll an agent back to a version |
agent-config
| Command | Description |
|---|---|
roark agent-config get | Get a managed config |
roark agent-config list | List managed configs |
roark agent-config promote | Promote staging to production |
roark agent-config resolve | Resolve config for a session |
roark agent-config staging delete | Discard the staging revision |
roark agent-config update | Write a config revision |
analytics
| Command | Description |
|---|---|
roark analytics query | Run an analytics query |
roark analytics schema get | Get the analytics schema |
autoimprove
| Command | Description |
|---|---|
roark autoimprove job answer | Answer Roark’s question |
roark autoimprove job cancel | Cancel an Autoimprove job |
roark autoimprove job create | Start an Autoimprove job |
roark autoimprove job dismiss | Dismiss an Autoimprove job |
roark autoimprove job get | Get an Autoimprove job |
roark autoimprove job guidance send | Guide a running Autoimprove job |
roark autoimprove job list | List Autoimprove jobs |
roark autoimprove job promote | Promote an Autoimprove job to production |
benchmark
| Command | Description |
|---|---|
roark benchmark leaderboard get | Get the benchmark leaderboard |
roark benchmark metric list | List benchmark metrics |
roark benchmark suite list | List benchmark suites |
roark benchmark target get | Get a benchmark target |
roark benchmark target history list | List a benchmark target’s published generations |
roark benchmark target score-sample list | List score samples for a target |
call
| Command | Description |
|---|---|
roark call batch delete | Delete calls in batch |
roark call cost get | Get call cost |
roark call create | Create a call |
roark call delete | Delete a call |
roark call get | Get a call |
roark call list | List calls |
roark call metric list | List call metrics |
roark call property update | Update the properties of a call |
roark call sentiment-run list | List call sentiment runs |
roark call tool-invocation append | Append tool invocations to a call |
roark call transcript get | Get call transcript |
config
| Command | Description |
|---|---|
roark config apply | Reconcile the project to a config directory (or bundle). Previews and confirms first. |
roark config diff | Preview the changes a config directory (or bundle) would make. No writes. |
connections
conversation
| Command | Description |
|---|---|
roark conversation get | Get a conversation |
credential
| Command | Description |
|---|---|
roark credential create | Create a personal API key |
roark credential list | List personal API keys |
roark credential revoke | Revoke a personal API key |
customer
| Command | Description |
|---|---|
roark customer attribute delete | Clear a field on a customer |
roark customer attribute unlock | Unlock a field on a customer |
roark customer attribute update | Set a field on a customer |
roark customer conversation list | List a customer’s conversations |
roark customer delete | Erase a customer |
roark customer field create | Create a customer field |
roark customer field delete | Delete a customer field |
roark customer field list | List customer fields |
roark customer field update | Update a customer field |
roark customer get | Get a customer |
roark customer list | List customers |
roark customer notes update | Update the notes on a customer |
customer-flow
| Command | Description |
|---|---|
roark customer-flow create | Create a customer flow |
roark customer-flow delete | Delete a customer flow |
roark customer-flow duplicate | Duplicate a customer flow |
roark customer-flow edge-case create | Add an edge case |
roark customer-flow edge-case delete | Remove an edge case |
roark customer-flow edge-case promote | Promote an edge case to the happy path |
roark customer-flow edge-case update | Update an edge case |
roark customer-flow folder create | Create a customer flow folder |
roark customer-flow folder delete | Delete a customer flow folder |
roark customer-flow folder list | List customer flow folders |
roark customer-flow folder update | Update a customer flow folder |
roark customer-flow get | Get a customer flow |
roark customer-flow graph replace | Replace a scripted flow’s steps |
roark customer-flow happy-path update | Update a flow’s happy path |
roark customer-flow list | List customer flows |
roark customer-flow update | Update a customer flow |
dashboard
| Command | Description |
|---|---|
roark dashboard create | Create a dashboard |
roark dashboard data get | Get dashboard data |
roark dashboard delete | Delete a dashboard |
roark dashboard get | Get a dashboard |
roark dashboard list | List dashboards |
roark dashboard update | Update a dashboard |
roark dashboard widget create | Add a widget |
roark dashboard widget delete | Remove a widget |
roark dashboard widget update | Replace a widget |
roark dashboard widget-data get | Get widget data |
health
| Command | Description |
|---|---|
roark health | Get API health status |
http-request-definition
| Command | Description |
|---|---|
roark http-request-definition create | Create an HTTP request definition |
roark http-request-definition get | Get an HTTP request definition |
roark http-request-definition list | List HTTP request definitions |
roark http-request-definition update | Update an HTTP request definition |
live-report
| Command | Description |
|---|---|
roark live-report create | Create a live report |
roark live-report delete | Delete a live report |
roark live-report document get | Get a report document |
roark live-report document list | List report documents |
roark live-report get | Get a live report |
roark live-report list | List live reports |
roark live-report run | Generate a live report document |
roark live-report update | Update a live report |
metric
| Command | Description |
|---|---|
roark metric collection-job cancel | Cancel a metric collection job |
roark metric collection-job create | Create and run a metric collection job |
roark metric collection-job get | Get a metric collection job |
roark metric collection-job list | List metric collection jobs |
roark metric definition create | Create a metric definition |
roark metric definition list | List metric definitions |
roark metric definition update | Update a metric definition |
roark metric policy create | Create a metric policy |
roark metric policy delete | Delete a metric policy |
roark metric policy get | Get a metric policy |
roark metric policy list | List metric policies |
roark metric policy update | Update a metric policy |
roark metric variant create | Create a metric variant |
roark metric variant delete | Delete a metric variant |
roark metric variant get | Get a metric variant |
roark metric variant list | List a metric’s variants |
roark metric variant update | Update a metric variant |
phone-number
| Command | Description |
|---|---|
roark phone-number allowance get | Get the phone number allowance |
roark phone-number available list | Search available phone numbers |
roark phone-number create | Buy a phone number |
roark phone-number delete | Release a phone number |
roark phone-number list | List phone numbers |
roark phone-number update | Update a phone number |
project
| Command | Description |
|---|---|
roark project list | List accessible projects |
simulation
tool
| Command | Description |
|---|---|
roark tool create | Create a tool |
roark tool delete | Delete a tool |
roark tool get | Get a tool |
roark tool list | List tools |
roark tool update | Update a tool |
usage
| Command | Description |
|---|---|
roark usage get | Get usage and cost |
webhook
| Command | Description |
|---|---|
roark webhook create | Create a webhook |
roark webhook delete | Delete a webhook |
roark webhook get | Get a webhook |
roark webhook list | List webhooks |
whoami
| Command | Description |
|---|---|
roark whoami | Get the current credential |