# 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 (test cases, requirements, and so on). Labels are free-form strings used to tag and group objects for filtering and search.

## Synopsis

```
uip tm objectlabel list --object-id <uuid> --object-type <type>
uip tm objectlabel get --object-id <uuid> --object-type <type> --label <text>
uip tm objectlabel add --object-id <uuid> --object-type <type> --label <text>
uip tm objectlabel remove --object-id <uuid> --object-type <type> --label <text>
```

All verbs honor the [global options](./global-options.md) and the standard [exit codes](./exit-codes.md). Every verb accepts `-t, --tenant <name>` and `--log-level <level>` (default `Information`).

`--object-type <type>` accepted values are tool-version-dependent (for example, `testcase`, `requirement`). Run `uip tm objectlabel list --help` to see the current enum.

## uip tm objectlabel list

List all labels on an object.

### Arguments

None.

### Options

- `--object-id <uuid>` *(required)* — object UUID (for example, a test case's `Id`).
- `--object-type <type>` *(required)* — type of object to query. Accepted values are tool-version-dependent; run `--help` to see the current set.

### Example

```bash
uip tm objectlabel list \
  --object-id a1b2c3d4-0000-0000-0000-000000000001 \
  --object-type testcase
```

### Data shape

```json
{
  "Code": "ObjectLabelList",
  "Data": [
    "smoke",
    "high-priority"
  ]
}
```

## uip tm objectlabel get

Check whether a specific label is present on an object.

### Arguments

None.

### Options

- `--object-id <uuid>` *(required)* — object UUID.
- `--object-type <type>` *(required)* — type of object.
- `--label <text>` *(required)* — label to check.

### Example

```bash
uip tm objectlabel get \
  --object-id a1b2c3d4-0000-0000-0000-000000000001 \
  --object-type testcase \
  --label smoke
```

### Data shape

```json
{
  "Code": "ObjectLabelGet",
  "Data": {
    "Label": "smoke",
    "Present": true
  }
}
```

## uip tm objectlabel add

Attach a label to an object.

### Arguments

None.

### Options

- `--object-id <uuid>` *(required)* — object UUID.
- `--object-type <type>` *(required)* — type of object.
- `--label <text>` *(required)* — label to attach.

### Example

```bash
uip tm objectlabel add \
  --object-id a1b2c3d4-0000-0000-0000-000000000001 \
  --object-type testcase \
  --label smoke
```

### Data shape

```json
{
  "Code": "ObjectLabelAdd",
  "Data": {
    "Label": "smoke",
    "Result": "Added"
  }
}
```

## uip tm objectlabel remove

Remove a label from an object.

### Arguments

None.

### Options

- `--object-id <uuid>` *(required)* — object UUID.
- `--object-type <type>` *(required)* — type of object.
- `--label <text>` *(required)* — label to remove.

### Example

```bash
uip tm objectlabel remove \
  --object-id a1b2c3d4-0000-0000-0000-000000000001 \
  --object-type testcase \
  --label smoke
```

### Data shape

```json
{
  "Code": "ObjectLabelRemove",
  "Data": {
    "Label": "smoke",
    "Result": "Removed"
  }
}
```

## Related

- [requirement](./uip-test-manager-requirement.md) — search requirements by label with `requirement search-by-label`.
- [customfield](./uip-test-manager-customfield.md) — custom field definitions can use labels.

## See also

- [Test Manager overview](./uip-test-manager.md)
