Get list of all tags from rest api

Hello,
I would like to retrieve a list of all the tags available, for example this call


curl -G \
        --request GET \
        --header "Authorization: Bearer $USERNAME $PASSWORD" \
        --header "Accept: application/json" \
        "$API_URL/domain-types/host_tag_group/collections/all"

returns something like

{
  "links": [
    {
      "domainType": "link",
      "rel": "self",
      "href": "http://xxxxxxxxxxx/api/1.0/domain-types/host_tag_group/collections/all",
      "method": "GET",
      "type": "application/json"
    }
  ],
  "id": "host_tag",
  "domainType": "host_tag_group",
  "value": [
    {
      "domainType": "dict",
      "title": "Criticality"
    },
    {
      "domainType": "dict",
      "title": "Networking Segment"
    },
    {
      "domainType": "dict",
      "title": "Tag Group for my check"
    },
    {
      "domainType": "dict",
      "title": "Data Quality Check"
    },
    {
      "domainType": "dict",
      "title": "my check"
    },
    {
      "domainType": "dict",
      "title": "Checkmk agent / API integrations"
    },
    {
      "domainType": "dict",
      "title": "Piggyback"
    },
    {
      "domainType": "dict",
      "title": "SNMP"
    },
    {
      "domainType": "dict",
      "title": "IP address family"
    }
  ]
}

I would like the details for ‘my check’ and all the other tags inside a topic, is this possible?

This is a bug in the REST API as it should return the name of the tag group and not its title.

You cannot do anything reasonable with just the title of the tag group in the REST API, you always need the name to get more info for a single tag group.

cc @LaMi

ok, is there any plan to improve this endpoint soon? thanks!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.