UiPath Documentation
uipath-cli
latest
false
UiPath CLI user guide

uip tm objectlabel

Syntax and options for `uip tm objectlabel`, which manages labels attached to Test Manager objects such as test cases and requirements.

uip tm objectlabel manages labels attached to Test Manager objects (requirements, test cases, test sets, test executions, and test case logs). Labels are free-form strings used to tag and group objects for filtering and search.

Important:

--project-key and --object-type are required on every verb in this group, including get. --object-ids and --labels are plural and space-separated throughout; the singular forms --object-id and --label do not exist.

Synopsis

uip tm objectlabel list --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-key <key> --object-type <type> --label-id <uuid>
uip tm objectlabel add --project-key <key> --object-type <type> --object-ids <uuid...> --labels <name...> [--label-type <type>] [--remove-other-labels]
uip tm objectlabel remove --project-key <key> --object-type <type> --object-ids <uuid...> (--labels <name...> | --remove-all-labels) [-y]
uip tm objectlabel list --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-key <key> --object-type <type> --label-id <uuid>
uip tm objectlabel add --project-key <key> --object-type <type> --object-ids <uuid...> --labels <name...> [--label-type <type>] [--remove-other-labels]
uip tm objectlabel remove --project-key <key> --object-type <type> --object-ids <uuid...> (--labels <name...> | --remove-all-labels) [-y]

All verbs honor the global options and the standard exit codes. Every verb accepts --log-level <level> (default Information) and -t, --tenant <name> (defaults to the authenticated tenant).

--object-type accepts Requirement, TestCase, TestSet, TestExecution, or TestCaseLog. --label-type/--label-types accept the wire-form values userLabel, systemLabel, internalLabel — not the PascalCase forms used elsewhere in this CLI.

uip tm objectlabel list

List distinct label names in use for one object type (paginated). This does not return label assignment rows — use get for a single row's detail.

Arguments

None.

Options

  • --project-key <key> (required) — owning project.
  • --object-type <type> (required) — object type to list labels for.
  • --object-ids <uuid...> — restrict to labels assigned to these objects (space-separated). Omit to search across the whole object type.
  • --label-types <type...> — filter by label types (userLabel, systemLabel, internalLabel, space-separated). Defaults to userLabel + systemLabel.
  • --filter <text> — prefix to match label names against (server-side StartsWith, not a general substring search).
  • --sort-by <expr> — sort expression, for example name asc.
  • --limit <n> — page size. Defaults to 50.
  • --offset <n> — results to skip. Defaults to 0.

Example

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

Data shape

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

Each row is just { "Name": "<label>" } — no Id, ObjectId, or LabelType is returned by list. To get a specific assignment row's full detail (including its Id), use objectlabel get.

uip tm objectlabel get

Get a single label assignment row by its assignment UUID.

Arguments

None.

Options

  • --project-key <key> (required) — owning project.
  • --object-type <type> (required) — object type the label belongs to.
  • --label-id <uuid> (required) — UUID of the label assignment row. This is the assignment record UUID, not a label name.

Example

uip tm objectlabel get \
  --project-key DEMO \
  --object-type TestCase \
  --label-id a1b2c3d4-0000-0000-0000-000000000001
uip tm objectlabel get \
  --project-key DEMO \
  --object-type TestCase \
  --label-id a1b2c3d4-0000-0000-0000-000000000001

Data shape

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

LabelType in this response is PascalCase (UserLabel, SystemLabel, InternalLabel) even though the --label-type/--label-types input flags take the camelCase wire form.

uip tm objectlabel add

Add labels to one or more objects. Two distinct behaviors depending on whether --label-type is passed:

  • Without --label-type (default): a single bulk-add call across all objects and labels. Pass --remove-other-labels to make this an authoritative set — after adding, any non-system labels on these objects that are not in --labels are deleted.
  • With --label-type: each label is assigned individually (looping every object × label pair), so a specific label type can be recorded. --remove-other-labels is ignored in this mode.

Arguments

None.

Options

  • --project-key <key> (required) — owning project.
  • --object-type <type> (required) — object type.
  • --object-ids <uuid...> (required) — space-separated object UUIDs to apply the labels to.
  • --labels <name...> (required) — space-separated label names to add.
  • --label-type <type> — label type (userLabel, systemLabel, internalLabel). When set, switches to the per-pair assign path described above.
  • --remove-other-labels — after adding, delete any non-system labels on these objects not present in --labels. Ignored when --label-type is set.

Examples

# Bulk add — multiple labels to multiple objects in one call
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --labels smoke regression

# With a specific label type — assigns each label individually
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --labels smoke \
  --label-type systemLabel
# Bulk add — multiple labels to multiple objects in one call
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --labels smoke regression

# With a specific label type — assigns each label individually
uip tm objectlabel add \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --labels smoke \
  --label-type systemLabel

Data shape

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

When --label-type is passed, the response includes it:

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

uip tm objectlabel remove

Remove labels from one or more objects. This is a destructive operation — it requires -y, --yes; the CLI never prompts. Supply either --labels to remove specific labels, or --remove-all-labels to clear every non-system label from the specified objects — the two are mutually exclusive.

Arguments

None.

Options

  • --project-key <key> (required) — owning project.
  • --object-type <type> (required) — object type.
  • --object-ids <uuid...> (required) — space-separated object UUIDs.
  • --labels <name...> — space-separated label names to remove. Required unless --remove-all-labels is set.
  • --remove-all-labels — clear every non-system label on the listed objects. Mutually exclusive with --labels.
  • -y, --yes — confirm this irreversible operation. Required — the CLI never prompts.

Examples

# remove specific labels
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --labels regression \
  --yes

# clear every non-system label
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --remove-all-labels \
  --yes
# remove specific labels
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --labels regression \
  --yes

# clear every non-system label
uip tm objectlabel remove \
  --project-key DEMO \
  --object-type TestCase \
  --object-ids id1 id2 \
  --remove-all-labels \
  --yes

Data shape

{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 1,
    "Result": "Removed"
  }
}
{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "LabelCount": 1,
    "Result": "Removed"
  }
}

With --remove-all-labels, the response reports RemoveAllLabels instead of LabelCount, and Result is AllRemoved:

{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "RemoveAllLabels": true,
    "Result": "AllRemoved"
  }
}
{
  "Code": "ObjectLabelsRemove",
  "Data": {
    "ObjectCount": 2,
    "RemoveAllLabels": true,
    "Result": "AllRemoved"
  }
}
  • requirements — requirements can carry object labels.
  • customfield — a separate label mechanism (customfield label) for Label-type custom field values; distinct from objectlabel's free-form tags.

See also

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated