# Hosted Mender showing incorrect Target device(s) name

**URL:** <https://hub.mender.io/t/hosted-mender-showing-incorrect-target-device-s-name/3395>\
**Category:** General Discussions\
**Created:** [March 18, 2021, 10:19pm UTC](https://hub.mender.io/t/hosted-mender-showing-incorrect-target-device-s-name/3395 "2021-03-18T22:19:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![msaenger](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@msaenger](https://hub.mender.io/u/msaenger)\
**Post date:** [March 18, 2021, 10:19pm UTC](https://hub.mender.io/t/hosted-mender-showing-incorrect-target-device-s-name/3395/1 "2021-03-18T22:19:20Z")

</div>

Hi there,

I use a python script I made and the REST API to add deployments targeting specific groups after automated builds. The deployments seem to be created just fine, but in the hosted UI it shows the Target device(s) as `devel` no matter what group name I use. I think behind the scenes it’s actually targeting the right devices judging by the # devices column, but still confusing nonetheless. This isn’t a problem if I create the deployment manually.

I’m using hosted mender.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [March 19, 2021, 1:55pm UTC](https://hub.mender.io/t/hosted-mender-showing-incorrect-target-device-s-name/3395/2 "2021-03-19T13:55:01Z")

</div>

Hi @msaenger can you share your scripting so we can see how the APIs are called?

cc: @mzedel and @peter

---

<div class="post-metadata">

**Author:** ![mzedel](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mzedel/32/261_2.png) [@mzedel](https://hub.mender.io/u/mzedel)\
**Post date:** [March 19, 2021, 3:59pm UTC](https://hub.mender.io/t/hosted-mender-showing-incorrect-target-device-s-name/3395/3 "2021-03-19T15:59:31Z")

</div>

Deployments only use the group information internally to retrieve the matching devices, for that reason the `deployment.name` is used to display the _Target device(s)_ column in the UI.  
Most likely you have the `name` set to `devel` in the call to the API. If that is not the case a look at the script would be very helpful (as @drewmoseley said).

---

<div class="post-metadata">

**Author:** ![msaenger](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@msaenger](https://hub.mender.io/u/msaenger)\
**Post date:** [March 19, 2021, 6:59pm UTC](https://hub.mender.io/t/hosted-mender-showing-incorrect-target-device-s-name/3395/4 "2021-03-19T18:59:21Z")

</div>

Ok I think I found my issue. The API seems to have two places to put the `group` name which is probably where my confusion comes from. I have the `name` parameter right that needs to go in `/deployments/group/{name}` but the API also calls for a `name` in `NewDeploymentForGroup` for the `body` of the POST request which I have set to `devel` by accident. Is that informational only and doesn’t affect which device(s) the deployment targets?
