UiPath Documentation
uipath-cli
2026.10
false
UiPath CLI ユーザー ガイド

uip tm objectlabel

「uip tm objectlabel」の構文とオプション - テスト ケースや要件など、Test Manager オブジェクトに付加されたラベルを管理します。

uip tm objectlabel は、Test Manager オブジェクト (要件、テスト ケース、テスト セット、テスト実行、テスト ケースのログ) に添付されるラベルを管理します。ラベルは自由形式の文字列で、フィルター処理や検索のためにオブジェクトにタグを付けたりグループ化したりするために使用します。

重要:

このグループ内のすべての動詞には、プロジェクト (--project-id または --project-key) と --object-type( getを含む) が必要です。list、 add、および remove は、スペースで区切られた複数形の --object-idsを取ります。 get には 1 つの --object-idが必要です。--labels は複数形です。 --label フラグはありません。

概要​

uip tm objectlabel list (--project-id <id> | --project-key <key>) --object-type <type> [--object-ids <uuid...>] [--label-types <types...>] [--filter <text>] [--sort-by <expr>] [--limit <n>] [--offset <n>]
uip tm objectlabel get (--project-id <id> | --project-key <key>) --object-type <type> --object-id <uuid>
uip tm objectlabel add (--project-id <id> | --project-key <key>) --object-type <type> --object-ids <uuid...> --labels <name...> [--label-type <type>] [--remove-other-labels]
uip tm objectlabel remove (--project-id <id> | --project-key <key>) --object-type <type> --object-ids <uuid...> (--labels <name...> | --remove-all-labels) --yes
uip tm objectlabel list (--project-id <id> | --project-key <key>) --object-type <type> [--object-ids <uuid...>] [--label-types <types...>] [--filter <text>] [--sort-by <expr>] [--limit <n>] [--offset <n>]
uip tm objectlabel get (--project-id <id> | --project-key <key>) --object-type <type> --object-id <uuid>
uip tm objectlabel add (--project-id <id> | --project-key <key>) --object-type <type> --object-ids <uuid...> --labels <name...> [--label-type <type>] [--remove-other-labels]
uip tm objectlabel remove (--project-id <id> | --project-key <key>) --object-type <type> --object-ids <uuid...> (--labels <name...> | --remove-all-labels) --yes

All verbs honor the global options and the standard exit codes. Every verb also accepts -t, --tenant <name> to run against a tenant other than the one your uip login session selected. It defaults to the session's tenant.

--project-idと--project-keyの両方に合格すると、--project-idが勝ちです。どちらも渡さない場合、コマンドは で失敗します ErrorCode: invalid_argument。

--object-type accepts Requirement, TestCase, TestSet, TestExecution, or TestCaseLog. --label-types on list accepts the wire-form values userLabel, systemLabel, internalLabel, and generatedLabel; --label-type on add accepts only userLabel. The values match in any letter case, so UserLabel, as the output prints it, is also accepted.

uip tm objectlabel list​

1 つのオブジェクトの種類に対して使用されている一意のラベル名を一覧表示します (ページ分割)。これにより、ラベルの割り当て行は返されません。1 つのオブジェクトのラベルには get を使用します。

引数​

設定はありません。

オプション​

  • --project-id <id> — Test Manager プロジェクト ID です。--project-keyも与えると勝利します。
  • --project-key <key> — Test Manager プロジェクト キー (例: DEMO)。--project-idも指定されている場合は無視されます。
  • --object-type <type> (必須) — ラベルのリストを取得するオブジェクトの種類です。
  • --object-ids <uuid...> — これらのオブジェクトに割り当てられているラベル (スペース区切り) に制限します。オブジェクトの種類全体を検索する場合は省略します。
  • --label-types <type...> — 含めるラベルの種類です (userLabel、 systemLabel、 internalLabel、 generatedLabel、 スペース区切り)。サーバーは常に systemLabel、 userLabel、 generatedLabel の名前を返し、ここで渡された型を追加します。したがって、このフラグは結果を狭めるのではなく広げます。
  • --filter <text> — ラベル名を照合するためのプレフィックスです (サーバー側の StartsWith、一般的な部分文字列検索ではありません)。
  • --sort-by <expr> — 並べ替え式 (例: name asc)。
  • --limit <n> — ページ サイズ。既定値は [ 50です。
  • --offset <n> — スキップする結果。既定値は [ 0です。
uip tm objectlabel list \
  --project-key DEMO \
  --object-type TestCase \
  --filter smo \
  --limit 50
uip tm objectlabel list \
  --project-key DEMO \
  --object-type TestCase \
  --filter smo \
  --limit 50

データシェイプ​

{
  "Code": "ObjectLabelsList",
  "Data": [
    { "Name": "smoke" },
    { "Name": "smoke-test" }
  ]
}
{
  "Code": "ObjectLabelsList",
  "Data": [
    { "Name": "smoke" },
    { "Name": "smoke-test" }
  ]
}

各行は{ "Name": "<label>" }のみです。list、 ObjectId、LabelTypeIdは返しません。1 つのオブジェクトのラベルを ID およびラベルの種類とともに表示するには、 を使用します objectlabel get。

uip tm objectlabel get​

1 つのオブジェクト (ユーザー、システム、生成されたラベル) に表示されているラベルを取得します。ラベル ID とラベルの種類を含めます。内部ラベルは返されません。list は、オブジェクトの種類に対して一意のラベル名を返します。 get は、1 つのオブジェクトの割り当て行全体を返します。

引数​

設定はありません。

オプション​

  • --project-id <id> — Test Manager プロジェクト ID です。--project-keyも与えると勝利します。
  • --project-key <key> — Test Manager プロジェクト キー (例: DEMO)。--project-idも指定されている場合は無視されます。
  • --object-type <type> (必須) — ラベルが属するオブジェクトの種類です。
  • --object-id <uuid> (必須) — オブジェクト UUID (例: uip tm testcases list の Id (または --object-typeに一致するリスト動詞)。
uip tm objectlabel get \
  --project-key DEMO \
  --object-type TestCase \
  --object-id f9e8d7c6-0000-0000-0000-000000000001
uip tm objectlabel get \
  --project-key DEMO \
  --object-type TestCase \
  --object-id f9e8d7c6-0000-0000-0000-000000000001

データシェイプ​

{
  "Code": "ObjectLabelGet",
  "Data": [
    {
      "Id": "a1b2c3d4-0000-0000-0000-000000000001",
      "ProjectId": "a1b2c3d4-0000-0000-0000-000000000009",
      "ObjectId": "f9e8d7c6-0000-0000-0000-000000000001",
      "ObjectType": "TestCase",
      "Name": "smoke",
      "Description": "",
      "LabelType": "UserLabel"
    }
  ]
}
{
  "Code": "ObjectLabelGet",
  "Data": [
    {
      "Id": "a1b2c3d4-0000-0000-0000-000000000001",
      "ProjectId": "a1b2c3d4-0000-0000-0000-000000000009",
      "ObjectId": "f9e8d7c6-0000-0000-0000-000000000001",
      "ObjectType": "TestCase",
      "Name": "smoke",
      "Description": "",
      "LabelType": "UserLabel"
    }
  ]
}

Data is an array with one row per label on the object, and an empty array when the object has no visible labels. LabelType is PascalCase (UserLabel, SystemLabel, GeneratedLabel); the --label-type and --label-types input flags accept either spelling.

uip tm objectlabel add​

ラベルを 1 つ以上のオブジェクトに追加します。--label-typeが合格するかどうかによって 2 つの異なる動作があります。

  • --label-typeなし (既定): すべてのオブジェクトとラベルに対する 1 回の一括追加呼び出し。これを信頼できるセットにするために --remove-other-labels を渡します。追加後、これらのオブジェクトにない非システム ラベルのうち、 --labels にないものはすべて削除されます。
  • --label-type userLabelの場合: 各ラベルは個別に割り当てられます (オブジェクト×ラベルのペアごとに 1 回の呼び出し)。このモードでは--remove-other-labelsは無視されます。

引数​

設定はありません。

オプション​

  • --project-id <id> — Test Manager プロジェクト ID です。--project-keyも与えると勝利します。
  • --project-key <key> — Test Manager プロジェクト キー (例: DEMO)。--project-idも指定されている場合は無視されます。
  • --object-type <type> (必須) — オブジェクトタイプ。
  • --object-ids <uuid...> (必須) — ラベルを適用するスペースで区切られたオブジェクトUUID。
  • --labels <name...> (必須) — 追加するスペース区切りのラベル名です。
  • --label-type <type> — ラベルの種類です。userLabelのみが受け入れられます。objectlabel remove はシステム ラベルをデタッチできないため、CLI はユーザー ラベルのみを書き込みます。設定すると、上記のペアごとの割り当てパスに切り替わります。
  • --remove-other-labels — 追加後、これらのオブジェクトの に存在しない非システム ラベルをすべて削除 --labels。--label-typeが設定されている場合は無視されます。
# Bulk add — multiple labels to multiple objects in one call
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --labels smoke regression

# With an explicit label type — assigns each label individually
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --labels smoke \
  --label-type userLabel
# Bulk add — multiple labels to multiple objects in one call
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --labels smoke regression

# With an explicit label type — assigns each label individually
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --labels smoke \
  --label-type userLabel

データシェイプ​

{
  "Code": "ObjectLabelsAdd",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 2,
    "Result": "Added"
  }
}
{
  "Code": "ObjectLabelsAdd",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 2,
    "Result": "Added"
  }
}

LabelCount では、大文字と小文字を区別せずに、一意のラベル名がカウントされます。--label-typeが渡されると、応答には以下が含まれます。

{
  "Code": "ObjectLabelsAdd",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 1,
    "LabelType": "userLabel",
    "Result": "Added"
  }
}
{
  "Code": "ObjectLabelsAdd",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 1,
    "LabelType": "userLabel",
    "Result": "Added"
  }
}

uip tm objectlabel remove​

最大 100 個のオブジェクトからユーザー ラベルと生成されたラベルを削除できます。渡す --labels を渡すと、特定のラベルが削除され、一覧表示されているオブジェクトのすべてのユーザーおよび生成されたラベルが削除 --remove-all-labels 。この 2 つは相互に排他的であり、1 つは必須です。名前は大文字と小文字を区別しません。削除は元に戻すことができず、 -y, --yesが必要です。

  • システム ラベルは削除されません。一致するシステム ラベル名は SkippedSystemLabelsで報告されます。
  • 内部ラベル名、および CLI で認識されないラベルの種類の名前は送信されません。--labelsでは、要求された内部名が SkippedInternalLabelsで報告されます。--remove-all-labelsでは、内部ラベルと名前を共有しているユーザー ラベルまたは生成されたラベルが保持され、報告されます。
  • remove は書き込み前にオブジェクトのラベルを読み取るため (オブジェクトごとに少なくとも 2 つの読み取り要求、一度に 5 つのオブジェクト)、リストされたオブジェクトへの読み取りアクセス権が必要です。ラベルが読み取れない場合、またはオブジェクトに 500 以上のラベル名が付いている場合、何も削除されません。
  • 削除リクエストが途中で失敗した場合、エラー メッセージには既に削除済みのラベルが一覧表示されます。

引数​

設定はありません。

オプション​

  • --project-id <id> — Test Manager プロジェクト ID です。--project-keyも与えると勝利します。
  • --project-key <key> — Test Manager プロジェクト キー (例: DEMO)。--project-idも指定されている場合は無視されます。
  • --object-type <type> (必須) — オブジェクトタイプ。
  • --object-ids <uuid...> (必須) — スペースで区切られたオブジェクトの UUID です。呼び出しあたり最大 100 個の個別の ID。重複するものは無視されます。
  • --labels <name...> — 削除するスペース区切りのラベル名です。--remove-all-labelsが設定されていない限り必須です。
  • --remove-all-labels — リストされているオブジェクトから、ユーザーおよび生成されたラベルを削除します。ただし、内部ラベルと名前を共有するオブジェクトは除きます。Test Manager UI の [すべてクリア] とは異なり、システム ラベルと内部ラベルは保持されます。--labelsと相互に排他的です。
  • -y, --yes (必須) — 元に戻せない操作を確認します。CLI ではプロンプトは表示されません。 --yes 指定しない場合、コマンドは Result: "Failure" を返して終了 1。
# remove specific labels
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --labels regression \
  --yes

# remove every user and generated label
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --remove-all-labels \
  --yes
# remove specific labels
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --labels regression \
  --yes

# remove every user and generated label
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002 \
  --remove-all-labels \
  --yes

データシェイプ​

{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 1,
    "RemovedLabels": ["regression"],
    "Result": "Removed"
  }
}
{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 1,
    "RemovedLabels": ["regression"],
    "Result": "Removed"
  }
}

--remove-all-labels:

{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "RemoveAllLabels": true,
    "RemovedLabels": ["regression", "smoke"],
    "SkippedSystemLabels": ["automated"],
    "Result": "AllRemoved"
  }
}
{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "RemoveAllLabels": true,
    "RemovedLabels": ["regression", "smoke"],
    "SkippedSystemLabels": ["automated"],
    "Result": "AllRemoved"
  }
}
フィールド説明
ObjectCount処理された一意のオブジェクト ID の数。
LabelCount--labelsの場合、要求された一意の名前の数です (大文字と小文字は区別されません)。--remove-all-labelsの RemoveAllLabels: true に置き換えられました。
RemovedLabelsラベル名の削除、並べ替え
SkippedSystemLabels一致し、保持されたシステム ラベル名。空の場合は省略されます。
SkippedInternalLabels内部ラベルであるか、内部ラベルと名前を共有しているために名前が保持される。空の場合は省略されます。
ResultRemoved、 AllRemoved ( --remove-all-labelsを使用)、または何も削除されなかった場合は Skipped 。
  • 要件 — 要件にはオブジェクト ラベルを付けることができます。
  • customfield — ラベルの種類のカスタム フィールド値用の別のラベル メカニズム (customfield label) です。 objectlabelの自由形式のタグとは異なります。

参照​

このページは役に立ちましたか?

接続

ヘルプ リソース サポート(opens in new window)

学習する UiPath アカデミー(opens in new window)

質問する UiPath フォーラム(opens in new window)

最新情報を取得