基本操作

space fields

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

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

使い方

terminal
orc space fields list --workspace YOUR_WORKSPACE_ID --format json

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

サブコマンド

list

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

terminal
orc space fields list [options]

固有のオプション

--project-id

value

型: string。任意。

terminal
orc space fields list --project-id <value>

create

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

terminal
orc space fields create [options]

固有のオプション

--config

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

型: string。任意。

terminal
orc space fields create --config <value>
--is-required

Body field: is_required

型: string。任意。

terminal
orc space fields create --is-required <value>
--position

Body field: position

型: number。任意。

terminal
orc space fields create --position <value>
--project-id

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

型: string。任意。

terminal
orc space fields create --project-id <value>
--slug

(required) Body field: slug; max 128 chars

型: string。任意。

terminal
orc space fields create --slug <value>
--title

(required) Body field: title; max 256 chars

型: string。任意。

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。任意。

terminal
orc space fields create --type <value>

update

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

terminal
orc space fields update <id> [options]

固有のオプション

--config

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

型: string。任意。

terminal
orc space fields update <id> --config <value>
--is-required

Body field: is_required

型: string。任意。

terminal
orc space fields update <id> --is-required <value>
--position

Body field: position

型: number。任意。

terminal
orc space fields update <id> --position <value>
--title

Body field: title; max 256 chars

型: string。任意。

terminal
orc space fields update <id> --title <value>

archive

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

terminal
orc space fields archive <id> [options]

space items fields get

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

terminal
orc space items fields get <kind> <id> [options]

space items fields set

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

terminal
orc space items fields set <kind> <id> <field-id> [options]

固有のオプション

--source

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

型: string。任意。

terminal
orc space items fields set <kind> <id> <field-id> --source <value>

グローバルオプション

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

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