CLI を使い始める

workspaces

orc workspaces は、Workspaceを作成・参照し、設定やメンバーへのアクセス付与、計測の休止・再開を管理するコマンドです。初回セットアップの進捗、対象地域と言語、モデルを含む計測設定や変更履歴も確認できます。

実行には認証が必要です。現在のWorkspaceを扱う設定操作ではCLIのWorkspace選択を使用し、特定のWorkspaceを扱う操作ではIDを指定します。組織の利用枠や作成・アクセス付与を扱う認証と、個々のWorkspaceの計測データを読む認証は、権限範囲が異なります。

使い方

terminal
orc workspaces list --json

アクセスできるWorkspaceを一覧にします。

サブコマンド

setup get

保存された初回セットアップのチェックポイントを取得します。--wait でセットアップと初回観測が終端するまで待機し、--timeout と --poll-interval で待機時間と再取得間隔を指定できます。再取得間隔の既定は 5s です。

terminal
orc workspaces setup get [options]

measurement-targets get

保存済みの対象地域・言語、既定値、選択可能なコードと追加枠を含む契約上限を取得します。

terminal
orc workspaces measurement-targets get [options]

measurement-targets update

地域・言語の配列を更新します。配列は全体を置き換え、先頭の値が既定になります。追加時は既存の値も含めてください。上限は有効なプロンプトの地域・言語も含めて検証し、この操作では追加枠を購入しません。

terminal
orc workspaces measurement-targets update [options]

固有のオプション

--measurement-country-codes

Configured measurement countries. The first entry is the default. Limited by the workspace contract and add-ons.; csv

型: string。任意。

terminal
orc workspaces measurement-targets update --measurement-country-codes <value>
--measurement-language-codes

Configured measurement languages. The first entry is the default. Base languages count toward the workspace allowance.; csv

型: string。任意。

terminal
orc workspaces measurement-targets update --measurement-language-codes <value>
--default-country-code

Workspace measurement target country; browser runs use managed proxy geolocation.

型: string。任意。

terminal
orc workspaces measurement-targets update --default-country-code <value>
--default-language-code

Workspace measurement language applied to subsequent measurements.

型: string。任意。

terminal
orc workspaces measurement-targets update --default-language-code <value>

list

アクセスできるWorkspaceを一覧にします。--include-archived でアーカイブ済みを含め、--include-management でブランド・計測設定・本番プロンプト利用枠の要約を含められます。

terminal
orc workspaces list [options]

固有のオプション

--include-archived

Include archived workspaces in the response.; enum: true|false

型: string。任意。

terminal
orc workspaces list --include-archived <value>
--include-management

Include brand, monitoring configuration, and production prompt entitlement summaries for accessible workspaces.; enum: true|false

型: string。任意。

terminal
orc workspaces list --include-management <value>

create

名前などの情報からWorkspaceを作成します。brand を指定すると管理対象ブランドは有効な状態で登録され、別途有効化は不要です。setup_mode は empty で候補生成と計測を省略し、suggestions で候補生成まで、measure で生成と計測まで進めます。手動作成の下書きプロンプトは有効化してから計測します。

terminal
orc workspaces create [options]

固有のオプション

--idempotency-key

Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.

型: string。任意。

terminal
orc workspaces create --idempotency-key <value>
--name

(required) Workspace display name after trimming surrounding whitespace. Must contain 1 to 120 characters.; max 120 chars

型: string。任意。

terminal
orc workspaces create --name <value>
--slug

Preferred workspace URL slug. Omit or send an empty string to derive it from name. The server normalizes to lowercase letters, digits and hyphens and resolves conflicts within the organization.

型: string。任意。

terminal
orc workspaces create --slug <value>
--workspace-type

Workspace type. Omission creates a team workspace.; enum: personal|team

型: string。任意。

terminal
orc workspaces create --workspace-type <value>
--client-label

Optional client-facing label. Surrounding whitespace is removed; omitted, null or empty values store no label.; (use "null" or "reset" to clear)

型: string。任意。

terminal
orc workspaces create --client-label <value>
--purpose

Commercial workspace purpose, defaulting to client in the extended flow. Supplying this field selects extended creation. pitch requires an agency organization and consumes monthly and active pitch quotas.; enum: client|pitch

型: string。任意。

terminal
orc workspaces create --purpose <value>
--setup-mode

Creation stopping point. A supplied owned brand is initialized active in every mode; no separate brand activation is required. Brand readiness does not start measurement. empty skips setup generation and measurement; brand is optional. suggestions generates review candidates without starting measurement. measure generates and measures. Omission uses measure if any extended setup field is present; otherwise creation is empty. Pitch quotas and seven-day expiry begin at creation in every mode.; enum: empty|suggestions|measure

型: string。任意。

terminal
orc workspaces create --setup-mode <value>
--brand

Managed brand to initialize. Required for suggestions and measure. Optional for empty; when provided, both name and domain are required. Supplying brand without setup_mode starts the measure flow.; (JSON object, e.g. '{"custom_id":"x"}')

型: string。任意。

terminal
orc workspaces create --brand <value>
--default-country-code

Two-letter default observation country code. Trimmed and uppercased. Defaults to JP in the extended flow. Supplying this field selects extended creation even without setup_mode.

型: string。任意。

terminal
orc workspaces create --default-country-code <value>
--default-language-code

Default observation language code, optionally with a regional suffix. Trimmed and lowercased, for example ja or en-us. Defaults to ja in the extended flow. Supplying this field selects extended creation even without setup_mode.

型: string。任意。

terminal
orc workspaces create --default-language-code <value>

quotas get

組織のWorkspace利用枠を取得します。Workspaceスコープのキーでは 403 insufficient_scope となり、空の利用枠を意味しません。

terminal
orc workspaces quotas get [options]

get

Workspace IDを指定して情報を取得します。

terminal
orc workspaces get <id> [options]

update

Workspace IDを指定し、名前・URL用slug・表示設定などを更新します。アーカイブされていないpitch Workspaceを purpose: client へ変換する操作にも対応します。

terminal
orc workspaces update <id> [options]

固有のオプション

--idempotency-key

Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.

型: string。任意。

terminal
orc workspaces update <id> --idempotency-key <value>
--is-default

Set this workspace as the organization default. Must be true and the only field in the body. Requires a human organization owner or admin; machine credentials cannot perform this change.; enum: true

型: string。任意。

terminal
orc workspaces update <id> --is-default <value>
--name

Replacement workspace display name. Omit to retain the current value.; max 120 chars

型: string。任意。

terminal
orc workspaces update <id> --name <value>
--slug

Replacement preferred slug. Normalized and made unique within the organization. Omit to retain the current slug.

型: string。任意。

terminal
orc workspaces update <id> --slug <value>
--client-label

Replacement client-facing label. Omit to retain it; null or an empty string clears it. Nonempty strings are trimmed.; (use "null" or "reset" to clear)

型: string。任意。

terminal
orc workspaces update <id> --client-label <value>
--color-token

Workspace visual identity color. Omit to retain the current token.; enum: default|gray|brown|orange|yellow|green|blue|purple|pink|red

型: string。任意。

terminal
orc workspaces update <id> --color-token <value>
--identity-kind

Workspace visual identity rendering mode. Omit to retain the current mode. Set the corresponding icon, emoji or image value separately when needed.; enum: color|initial|icon|emoji|image

型: string。任意。

terminal
orc workspaces update <id> --identity-kind <value>
--icon-token

Icon identifier used by icon identity mode. Omit to retain it; null or an empty string clears it. Does not change identity_kind.; (use "null" or "reset" to clear); max 64 chars

型: string。任意。

terminal
orc workspaces update <id> --icon-token <value>
--emoji

Emoji value used by emoji identity mode. Omit to retain it; null or an empty string clears it. Does not change identity_kind.; (use "null" or "reset" to clear); max 32 chars

型: string。任意。

terminal
orc workspaces update <id> --emoji <value>
--image-file-id

File ID used by image identity mode. Omit to retain it; null or an empty string clears it. Does not change identity_kind.; (use "null" or "reset" to clear)

型: string。任意。

terminal
orc workspaces update <id> --image-file-id <value>
--purpose

Set client to convert an unarchived pitch workspace. Submit only purpose and optional dry_run. The conversion is irreversible. A request to convert to pitch is rejected.; enum: client|pitch

型: string。任意。

terminal
orc workspaces update <id> --purpose <value>

archive

Workspace IDを指定してアーカイブします。復元には restore を使用します。

terminal
orc workspaces archive <id> [options]

固有のオプション

--idempotency-key

Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.

型: string。任意。

terminal
orc workspaces archive <id> --idempotency-key <value>

restore

アーカイブ済みWorkspaceをIDで指定して復元します。

terminal
orc workspaces restore <id> [options]

固有のオプション

--idempotency-key

Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.

型: string。任意。

terminal
orc workspaces restore <id> --idempotency-key <value>

pause

指定したWorkspaceの計測を休止します。--dry-run は変更後の応答を返し、変更を永続化しません。

terminal
orc workspaces pause <id> [options]

固有のオプション

--idempotency-key

Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.

型: string。任意。

terminal
orc workspaces pause <id> --idempotency-key <value>

resume

休止中のWorkspaceの計測を再開します。

terminal
orc workspaces resume <id> [options]

固有のオプション

--idempotency-key

Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.

型: string。任意。

terminal
orc workspaces resume <id> --idempotency-key <value>

members list

Workspace IDを指定してメンバーを一覧にします。

terminal
orc workspaces members list <id> [options]

members create

対象Workspace IDと --user-id に同じ組織の有効な人のユーザーIDを指定してアクセスを付与します。APIキーの合成IDは使用できません。

terminal
orc workspaces members create <id> [options]

固有のオプション

--idempotency-key

Retry identity for operations that support idempotency. Use a unique key for each new operation, and reuse it only when retrying the same HTTP method, path, query values and exact request body. JSON whitespace changes can count as a different body. Keys contain 1–255 characters after trimming and expire after 24 hours. A completed JSON response is replayed without repeating the operation. A different request using the same key returns 409 idempotency_error. An in-progress request returns 409 idempotency_in_progress with Retry-After: 2. Whether this header is required depends on the operation.

型: string。任意。

terminal
orc workspaces members create <id> --idempotency-key <value>
--user-id

(required) User ID of an active member of the workspace organization. This is not a workspace-member assignment ID. The user must already belong to the organization.

型: string。任意。

terminal
orc workspaces members create <id> --user-id <value>
--workspace-role

Workspace role to assign, defaulting to member. If the assignment already exists, this role replaces its current role and the assignment becomes active.; enum: owner|member

型: string。任意。

terminal
orc workspaces members create <id> --workspace-role <value>

members delete

Workspace IDとユーザーIDを指定してメンバーのアクセスを除外します。

terminal
orc workspaces members delete <id> <user-id> [options]

measurement-configurations get

現在のWorkspaceの計測設定を取得します。対象地域・言語・モデルを含む設定リソースを確認します。

terminal
orc workspaces measurement-configurations get [options]

measurement-configurations update

JSONオブジェクトの default_location と platform_selection、言語コードの default_language を指定して設定を更新します。完全なJSONを --stdin に渡すと、3つの設定を1つのリソースとして送信できます。

terminal
orc workspaces measurement-configurations update [options]

固有のオプション

--default-location

(required) Execution location. Choose global without code, or country with an uppercase two-letter code. Region and city locations are not accepted for execution.

型: string。任意。

terminal
orc workspaces measurement-configurations update --default-location <value>
--default-language

(required) Default execution language tag, such as ja-JP. Used when a measurement inherits the workspace language.

型: string。任意。

terminal
orc workspaces measurement-configurations update --default-language <value>
--platform-selection

(required) Choose all eligible observation channels, or provide a non-empty explicit set. Direct provider API channels are not supported for saved measurement configuration.

型: string。任意。

terminal
orc workspaces measurement-configurations update --platform-selection <value>
--cadence

Preferred cadence; weekly billing entitlements remain weekly.; enum: daily|weekly

型: string。任意。

terminal
orc workspaces measurement-configurations update --cadence <value>

measurement-configurations revisions list

追記型の計測設定変更履歴を一覧にします。--limit と --cursor でページを指定します。

terminal
orc workspaces measurement-configurations revisions list [options]

使用例

セットアップと初回観測の終了まで待機します。

terminal
orc workspaces setup get --wait --timeout 5m --json

セットアップと初回観測の終了まで待機します。

保存済みの対象地域と言語を取得します。

terminal
orc workspaces measurement-targets get --workspace wks_example --json

保存済みの対象地域と言語を取得します。

既存の値も含めて地域と言語を置き換えます。

terminal
printf '%s' '{"measurement_country_codes":["JP","US"],"measurement_language_codes":["ja","en"]}' | orc workspaces measurement-targets update --workspace wks_example --stdin --json

既存の値も含めて地域と言語を置き換えます。

完全なJSONで計測設定を更新します。

terminal
orc workspaces measurement-configurations update --stdin < measurement-configuration.json --json

完全なJSONで計測設定を更新します。

作成後のWorkspaceに人のアクセスを付与します。

terminal
orc workspaces members create WORKSPACE_ID --user-id USER_ID --workspace-role member --json

作成後のWorkspaceに人のアクセスを付与します。

アクセス付与と組織の利用枠

アクセスを付与する対象は同じ組織に所属する有効な人のOrganization user IDです。組織スコープのwrite APIキー、またはWorkspaceのowner/adminが操作できます。APIキーの apikey:... 合成IDを人のIDとして指定しないでください。

組織キーで作成したWorkspaceには人の workspace_members が自動作成されないため、作成後に members create を実行します。組織境界が一致しない対象は 404、read-onlyキーや権限のない人は 403 になります。付与後は人のプロファイルで orc workspace use <id> またはデータコマンドの --workspace <id> を使用します。

組織の利用枠、Workspace作成、アクセス付与には組織キーを使い、setup・brands・prompts・reportsはアクセスを付与した人、またはWorkspaceスコープの認証情報で読みます。

対象地域・言語のAPIとMCP

対象地域・言語のAPIは GET /v1/workspaces/current/measurement-targets と PATCH /v1/workspaces/current/measurement-targets です。APIでは Authorization: Bearer <APIキー> と X-Workspace-ID を指定し、取得にはread、更新にはwriteスコープが必要です。

MCPでは workspace_measurement_targets_get と workspace_measurement_targets_update を使用します。更新ではwriteプロファイルを有効にし、idempotency_key と変更対象の配列を指定します。初回応答の approval_required にある approval_id を、利用者の承認後に approval_receipt として同一入力に添えて再送します。承認前に保存は実行されません。

グローバルオプション

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

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