Getting tags of a device

Hi, im trying to retrieve all the tags of a device, im not finding a way to do this.

Either by getting them in the provisioning or via API consultation are valide for me.

I have tried with provisioning but getting the tags returns their value which are true or false and not their name.

Any help is welcomed

From the API, tags will be in the _tags element. You can also use a project to get just the tags.

$ curl -i 'https://some-host-name.com:7557/devices/?query=%7B%22_id%22%3A%22404A03-VMG4927%252DB50A-AABBCCDD10290%22%7D&projection=_tags'
HTTP/1.1 200 OK
GenieACS-Version: 1.2.12+2403280f66
Content-Type: application/json
total: 1
Date: Fri, 12 Jul 2024 16:35:38 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked

[
{"_id":"404A03-VMG4927%2DB50A-AABBCCDD10290","_tags":["Managed","Provisioned","HasACLs","BaseConfig"]}

Thanks, that would work for me tank you!!