CLI を使い始める

dashboards

orc dashboards list で一覧を確認し、get SLUG で Spec v2 を読みます。pull は get の別名です。ファイルへの取得は pull SLUG --raw --output dashboard.json を使います。JSON の title や spec を編集し、validate --stdin < dashboard.json で構造と指標カタログへの適合を検証してから、push SLUG --stdin < dashboard.json で下書きを保存します。公開中の内容は変わりません。pull SLUG --state draft --raw --output draft.json で下書きを確認し、publish SLUG --version VERSION で公開、または discard SLUG --version VERSION で破棄します。VERSION には取得した下書きの version を指定してください。get/pull の既定は公開版です。新規 slug は空の公開版と下書きを作成します。下書きがなければ pull --state draft は 404、publish/discard は 409 を返します。pull で取得したファイルには競合検出用の version が含まれます。編集の競合で 409 が返ったら再取得してください。取得後に削除されたダッシュボードを push すると 409 が返ります。再作成するには、ファイルから version を削除して再度 push してください。新規作成では version を省略してください。同じ内容の保存では version は変わりません。schema --raw は Spec v2 の JSON Schema を返します。schema は JSON Schema 取得用の予約 slug です。標準入力は JSON のみです。YAML 入力には対応していません。

使い方

terminal
orc dashboards list --workspace YOUR_WORKSPACE_ID --json

ダッシュボード一覧

Render

orc dashboards render SLUG は公開版の各要素をレイアウト順に実行し、コンパイル済みの MetricQuery と結果を返します。--state draft は下書きを使い、下書きがなければ 404 を返します。各要素は既定で20行、--rows は1から10000行です。row_count はエンジンが返した切り詰め前の行数、has_more は切り詰めまたは上流の続きがあることを示します。要素の失敗は error に入り、他の要素は実行されます。コンパイルに失敗した要素では query を省略します。--elements brands,visibility で要素名を指定でき、結果の順序はレイアウト順です。不明な名前は 400 を返します。詳しいデータは orc dashboards render SLUG --elements brands --rows 10000 --workspace YOUR_WORKSPACE_ID --json で取得してください。単一クエリは返された query を query.json に保存し、orc metrics query --workspace YOUR_WORKSPACE_ID --stdin < query.json でも実行できます。長い文字列や行数によって MCP の結果上限を超える場合は、要素や行数を絞ってください。画像や PDF は生成しません。

Templates

orc dashboards templates --workspace YOUR_WORKSPACE_ID --json は5つのテンプレートの id、title、description、Spec v2 を返します。既存の単階層コマンドに合わせて dashboards templates を使います。orc dashboards create-from-template --template-id visibility-overview --workspace YOUR_WORKSPACE_ID --json はエディターと同じ変換で公開済みのダッシュボードを作成します。--title の既定はテンプレートのタイトルです。--slug overview は指定した slug を使い、使用済みなら 409 を返します。省略するとタイトルから未使用の slug を生成します。schema、templates、from-template は予約 slug です。MCP は render_dashboard、list_dashboard_templates、create_dashboard_from_template を使います。

サブコマンド

list

List dashboards

terminal
orc dashboards list [options]

schema

Get dashboard Spec v2 JSON Schema

terminal
orc dashboards schema [options]

validate

Validate a dashboard without saving

terminal
orc dashboards validate [options]

固有のオプション

--spec

(required) Body field: spec; (JSON object, e.g. '{"custom_id":"x"}')

型: string。任意。

terminal
orc dashboards validate --spec <value>

get

Get a dashboard

terminal
orc dashboards get <slug> [options]

固有のオプション

--state

enum: published|draft

型: string。任意。

terminal
orc dashboards get <slug> --state <value>

push

Create or update a dashboard draft by slug

terminal
orc dashboards push <slug> [options]

固有のオプション

--spec

(required) Body field: spec; (JSON object, e.g. '{"custom_id":"x"}')

型: string。任意。

terminal
orc dashboards push <slug> --spec <value>
--title

(required) Body field: title; max 120 chars

型: string。任意。

terminal
orc dashboards push <slug> --title <value>
--version

Body field: version

型: number。任意。

terminal
orc dashboards push <slug> --version <value>

discard

Discard a dashboard draft

terminal
orc dashboards discard <slug> [options]

固有のオプション

--version

Body field: version

型: number。任意。

terminal
orc dashboards discard <slug> --version <value>

publish

Publish a dashboard draft

terminal
orc dashboards publish <slug> [options]

固有のオプション

--version

Body field: version

型: number。任意。

terminal
orc dashboards publish <slug> --version <value>

create-from-template

Create a published dashboard from a template

terminal
orc dashboards create-from-template [options]

固有のオプション

--slug

Body field: slug

型: string。任意。

terminal
orc dashboards create-from-template --slug <value>
--template-id

(required) Body field: template_id; enum: visibility-overview|citation-overview|competitive-proposal|content-opportunities|brand-perception

型: string。任意。

terminal
orc dashboards create-from-template --template-id <value>
--title

Body field: title; max 120 chars

型: string。任意。

terminal
orc dashboards create-from-template --title <value>

templates

List dashboard templates

terminal
orc dashboards templates [options]

render

Render dashboard element data

terminal
orc dashboards render <slug> [options]

固有のオプション

--state

enum: published|draft

型: string。任意。

terminal
orc dashboards render <slug> --state <value>
--rows

value

型: number。任意。

terminal
orc dashboards render <slug> --rows <value>
--elements

Comma-separated element names; results remain in layout order; max 5049 chars

型: string。任意。

terminal
orc dashboards render <slug> --elements <value>

pull

Get a dashboard

terminal
orc dashboards pull <slug> [options]

固有のオプション

--state

enum: published|draft

型: string。任意。

terminal
orc dashboards pull <slug> --state <value>

使用例

ファイルを編集して保存

terminal
orc dashboards pull overview --workspace YOUR_WORKSPACE_ID --raw --output dashboard.json
# dashboard.json の title や spec を編集
orc dashboards validate --workspace YOUR_WORKSPACE_ID --stdin < dashboard.json
orc dashboards push overview --workspace YOUR_WORKSPACE_ID --stdin < dashboard.json
orc dashboards pull overview --state draft --workspace YOUR_WORKSPACE_ID --raw --output draft.json
orc dashboards publish overview --version VERSION --workspace YOUR_WORKSPACE_ID
# orc dashboards discard overview --version VERSION --workspace YOUR_WORKSPACE_ID

ファイルを編集して保存

必要な権限

ログインと Workspace へのアクセスが必要です。API キーは取得・検証に read、下書きの保存・公開・破棄とテンプレートからの作成に write スコープが必要です。

グローバルオプション

orc dashboards では、次のグローバルオプションを使用できます。

各オプションの詳細と使用例は、グローバルオプションを参照してください。