# Labels in command line not working as expected

**URL:** <https://discourse.sensu.io/t/labels-in-command-line-not-working-as-expected/3148>\
**Category:** Sensu Go\
**Tags:** sensu-go\
**Created:** [August 10, 2023, 9:11am UTC](https://discourse.sensu.io/t/labels-in-command-line-not-working-as-expected/3148 "2023-08-10T09:11:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sachalere](https://avatars.discourse-cdn.com/v4/letter/s/71c47a/32.png) [@sachalere](https://discourse.sensu.io/u/sachalere)\
**Post date:** [August 10, 2023, 9:11am UTC](https://discourse.sensu.io/t/labels-in-command-line-not-working-as-expected/3148/1 "2023-08-10T09:11:00Z")

</div>

Hi Everyone,

I hope this message finds you well.

I have passed a couple of labels while installing sensu agent using --labels argument, but after fetching using GET API It is returning only one label.

### Operating system information

- Windows

### Package versions

- Sensu Go: 6.7.3
- Etcd: 3.5.4

## Installation command

```auto
.\sensu-agent.exe service install --backend-url ws://localhost:8081 --name asset14 --subscriptions system --namespace dev --labels category="1" subcategory="7" --keepalive-handlers email

```

## GET command response metadata

```auto
{
  "name": "asset14",
  "namespace": "dev",
  "labels": {
    "category": "1"
  }
}

```

In the above response, you can see there is only one label which is category.

Thank you in advance for considering my request. I truly appreciate your time and effort. Looking forward to hearing from you guys.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/sensu/original/1X/ad88ecc0d60777fbbb8dad05fe976fca2a4d87b2.jpeg) [@system](https://discourse.sensu.io/u/system)\
**Post date:** [September 9, 2023, 9:11am UTC](https://discourse.sensu.io/t/labels-in-command-line-not-working-as-expected/3148/2 "2023-09-09T09:11:40Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
