---
title: dashboards
description: ダッシュボードを JSON ファイルとして取得・検証・保存します。
canonical_url: https://orchestor.io/docs/cli/dashboards
markdown_url: https://orchestor.io/docs/cli/dashboards.md
contentType: reference
---

# 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 入力には対応していません。

## 使い方

```bash title="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

```bash title="terminal"
orc dashboards list [options]
```

### `schema`

Get dashboard Spec v2 JSON Schema

```bash title="terminal"
orc dashboards schema [options]
```

### `validate`

Validate a dashboard without saving

```bash title="terminal"
orc dashboards validate [options]
```

#### 固有のオプション

##### `--spec`

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

型: `string`。任意。

```bash title="terminal"
orc dashboards validate --spec <value>
```

### `get`

Get a dashboard

```bash title="terminal"
orc dashboards get <slug> [options]
```

#### 固有のオプション

##### `--state`

enum: published|draft

型: `string`。任意。

```bash title="terminal"
orc dashboards get <slug> --state <value>
```

### `push`

Create or update a dashboard draft by slug

```bash title="terminal"
orc dashboards push <slug> [options]
```

#### 固有のオプション

##### `--spec`

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

型: `string`。任意。

```bash title="terminal"
orc dashboards push <slug> --spec <value>
```

##### `--title`

(required) Body field: title; max 120 chars

型: `string`。任意。

```bash title="terminal"
orc dashboards push <slug> --title <value>
```

##### `--version`

Body field: version

型: `number`。任意。

```bash title="terminal"
orc dashboards push <slug> --version <value>
```

### `discard`

Discard a dashboard draft

```bash title="terminal"
orc dashboards discard <slug> [options]
```

#### 固有のオプション

##### `--version`

Body field: version

型: `number`。任意。

```bash title="terminal"
orc dashboards discard <slug> --version <value>
```

### `publish`

Publish a dashboard draft

```bash title="terminal"
orc dashboards publish <slug> [options]
```

#### 固有のオプション

##### `--version`

Body field: version

型: `number`。任意。

```bash title="terminal"
orc dashboards publish <slug> --version <value>
```

### `create-from-template`

Create a published dashboard from a template

```bash title="terminal"
orc dashboards create-from-template [options]
```

#### 固有のオプション

##### `--slug`

Body field: slug

型: `string`。任意。

```bash title="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`。任意。

```bash title="terminal"
orc dashboards create-from-template --template-id <value>
```

##### `--title`

Body field: title; max 120 chars

型: `string`。任意。

```bash title="terminal"
orc dashboards create-from-template --title <value>
```

### `templates`

List dashboard templates

```bash title="terminal"
orc dashboards templates [options]
```

### `render`

Render dashboard element data

```bash title="terminal"
orc dashboards render <slug> [options]
```

#### 固有のオプション

##### `--state`

enum: published|draft

型: `string`。任意。

```bash title="terminal"
orc dashboards render <slug> --state <value>
```

##### `--rows`

value

型: `number`。任意。

```bash title="terminal"
orc dashboards render <slug> --rows <value>
```

##### `--elements`

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

型: `string`。任意。

```bash title="terminal"
orc dashboards render <slug> --elements <value>
```

### `pull`

Get a dashboard

```bash title="terminal"
orc dashboards pull <slug> [options]
```

#### 固有のオプション

##### `--state`

enum: published|draft

型: `string`。任意。

```bash title="terminal"
orc dashboards pull <slug> --state <value>
```

## 使用例

### ファイルを編集して保存

```bash title="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` では、次の[グローバルオプション](https://orchestor.io/docs/cli/global-flags.md)を使用できます。

- [`--help`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%98%E3%83%AB%E3%83%97)
- [`--workspace`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%AF%E3%83%BC%E3%82%AF%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9)
- [`--json`](https://orchestor.io/docs/cli/global-flags.md#json-%E5%87%BA%E5%8A%9B)
- [`--pretty`](https://orchestor.io/docs/cli/global-flags.md#json-%E5%87%BA%E5%8A%9B)
- [`--format`](https://orchestor.io/docs/cli/global-flags.md#%E5%87%BA%E5%8A%9B%E5%BD%A2%E5%BC%8F)
- [`--field`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%95%E3%82%A3%E3%83%BC%E3%83%AB%E3%83%89%E3%81%AE%E6%8A%BD%E5%87%BA)
- [`--fields`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%95%E3%82%A3%E3%83%BC%E3%83%AB%E3%83%89%E3%81%AE%E6%8A%BD%E5%87%BA)
- [`--raw`](https://orchestor.io/docs/cli/global-flags.md#%E5%80%A4%E3%81%A0%E3%81%91%E3%82%92%E5%87%BA%E5%8A%9B)
- [`--output`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%B8%E3%81%AE%E5%87%BA%E5%8A%9B)
- [`--no-pager`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%9A%E3%83%BC%E3%82%B8%E9%80%81%E3%82%8A)
- [`--dry-run`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%81%AE%E4%BA%8B%E5%89%8D%E7%A2%BA%E8%AA%8D)
- [`--yes`](https://orchestor.io/docs/cli/global-flags.md#%E7%A2%BA%E8%AA%8D%E3%81%AE%E7%9C%81%E7%95%A5)
- [`--stdin`](https://orchestor.io/docs/cli/global-flags.md#%E6%A8%99%E6%BA%96%E5%85%A5%E5%8A%9B)
- [`--from-stdin`](https://orchestor.io/docs/cli/global-flags.md#%E6%A8%99%E6%BA%96%E5%85%A5%E5%8A%9B)
- [`--page-all`](https://orchestor.io/docs/cli/global-flags.md#%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E3%83%9A%E3%83%BC%E3%82%B8%E3%82%92%E5%8F%96%E5%BE%97)
- [`--timing`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E6%99%82%E9%96%93)
- [`--readonly`](https://orchestor.io/docs/cli/global-flags.md#%E8%AA%AD%E3%81%BF%E5%8F%96%E3%82%8A%E5%B0%82%E7%94%A8%E3%83%A2%E3%83%BC%E3%83%89)
- [`--wrap-untrusted`](https://orchestor.io/docs/cli/global-flags.md#%E5%A4%96%E9%83%A8%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E7%9B%AE%E5%8D%B0%E4%BB%98%E3%81%91)

各オプションの詳細と使用例は、[グローバルオプション](https://orchestor.io/docs/cli/global-flags.md)を参照してください。

---

[Documentation index](https://orchestor.io/docs/llms.txt)
