---
title: space fields
description: Space のフィールド定義と値を管理する。
canonical_url: https://orchestor.io/docs/space/cli/fields
markdown_url: https://orchestor.io/docs/space/cli/fields.md
contentType: reference
---

# space fields

`orc space fields` は、Space のアイテムに付けるフィールドの定義を一覧・作成・更新・アーカイブするコマンドです。`orc space items fields` で、ドキュメント・シート・ファイル・フォルダごとのフィールドの値を読み書きします。

実行には認証とWorkspaceの選択が必要です。フィールド定義の作成・更新・アーカイブには `workspace:settings` が必要です。値の書き込みには、ファイルとフォルダは `files:write`、ドキュメントとシートは `doc:update` が必要です。

## 使い方

```bash title="terminal"
orc space fields list --workspace YOUR_WORKSPACE_ID --format json
```

*Workspace のフィールド定義を一覧にします。*

## サブコマンド

### `list`

`--project-id` を省略するとWorkspaceのフィールドだけを返します。指定するとそのプロジェクトのフィールドも含め、Workspaceのフィールドを先に、それぞれ位置の順に返します。保存されない読み取り専用のシステムフィールドも含みます。

```bash title="terminal"
orc space fields list [options]
```

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

##### `--project-id`

value

型: `string`。任意。

```bash title="terminal"
orc space fields list --project-id <value>
```

### `create`

`type`、`slug`、`title` と、型ごとの `config` を指定してフィールドを作成します。`slug` は同じWorkspaceとプロジェクトの範囲で重複できません。

```bash title="terminal"
orc space fields create [options]
```

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

##### `--config`

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

型: `string`。任意。

```bash title="terminal"
orc space fields create --config <value>
```

##### `--is-required`

Body field: is_required

型: `string`。任意。

```bash title="terminal"
orc space fields create --is-required <value>
```

##### `--position`

Body field: position

型: `number`。任意。

```bash title="terminal"
orc space fields create --position <value>
```

##### `--project-id`

Body field: project_id; (use "null" or "reset" to clear)

型: `string`。任意。

```bash title="terminal"
orc space fields create --project-id <value>
```

##### `--slug`

(required) Body field: slug; max 128 chars

型: `string`。任意。

```bash title="terminal"
orc space fields create --slug <value>
```

##### `--title`

(required) Body field: title; max 256 chars

型: `string`。任意。

```bash title="terminal"
orc space fields create --title <value>
```

##### `--type`

(required) Body field: type; enum: text|long_text|number|checkbox|select|multi_select|date|member|url|timecode|time_range|segment_list|object

型: `string`。任意。

```bash title="terminal"
orc space fields create --type <value>
```

### `update`

フィールド定義を更新します。型・`slug`・範囲は変更できません。`config` は保存済みの型に対して検証し、既存の値は保持します。

```bash title="terminal"
orc space fields update <id> [options]
```

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

##### `--config`

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

型: `string`。任意。

```bash title="terminal"
orc space fields update <id> --config <value>
```

##### `--is-required`

Body field: is_required

型: `string`。任意。

```bash title="terminal"
orc space fields update <id> --is-required <value>
```

##### `--position`

Body field: position

型: `number`。任意。

```bash title="terminal"
orc space fields update <id> --position <value>
```

##### `--title`

Body field: title; max 256 chars

型: `string`。任意。

```bash title="terminal"
orc space fields update <id> --title <value>
```

### `archive`

フィールド定義をアーカイブします。アーカイブした定義は使われなくなりますが、値は保持します。

```bash title="terminal"
orc space fields archive <id> [options]
```

### `space items fields get`

アイテムに有効なフィールドと値を返します。Workspaceのフィールドと、フォルダをたどって最も近いプロジェクトのフィールドを含みます。値がない場合は `null` です。

```bash title="terminal"
orc space items fields get <kind> <id> [options]
```

### `space items fields set`

アイテムのフィールドに値を設定します。値はフィールドの型と `config` で検証し、不正な値は書き込まずに400を返します。`null` を渡すと、必須のフィールドでも保存済みの値を削除します。

```bash title="terminal"
orc space items fields set <kind> <id> <field-id> [options]
```

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

##### `--source`

Body field: source; enum: user|ai|system

型: `string`。任意。

```bash title="terminal"
orc space items fields set <kind> <id> <field-id> --source <value>
```

## グローバルオプション

`orc space fields` では、次の[グローバルオプション](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)
