Get all tags grouped by category, indicating whether each tag is already applied to a given resource.
Before You Begin
🔗 Use the GraphQL Playground to execute the queries in this guide.
➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.
Prerequisites
- Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
- Permissions: Ensure your token has permissions to manage the resource.
- Resource Type: You must specify the type of resource (pipe or database).
- Resource UUID: You must know the UUID of the resource you want to retrieve tags for.
Step 1: Identify the Resource
1. Via GraphQL Query
-
Resource Type: Accepted values are pipe or database.
-
Resource UUID: To learn how to retrieve the resource UUID, visit our Get resource IDs page.
Step 2: Execute the Query
{
tagsByCategoryOnResource(
resourceType: pipe,
resourceUuid: "pipe-uuid-example"
) {
nodes{
name
uuid
tags{
onResource
tag{
uuid
name
}
}
}
}
}
Response Fields
- nodes: List of tag categories.
- name: Name of the category.
- 👉 If the name is
Uncategorized
, it means the tags listed under this group do not belong to any category.
- 👉 If the name is
- uuid: UUID of the category.
- tags: Tags in the category:
- onResource: Boolean indicating whether the tag is applied to the resource.
- tag:
- uuid: UUID of the tag.
- name: Name of the tag.
- name: Name of the category.
Example Response
{
"data": {
"tagsByCategoryOnResource": {
"nodes": [
{
"name": "Departaments",
"uuid": "departsments-category-uuid",
"tags": [
{
"onResource": true,
"tag": {
"uuid": "tag-1-uuid",
"name": "Tag #1"
}
},
{
"onResource": false,
"tag": {
"uuid": "tag-2-uuid",
"name": "Tag #2"
}
}
]
},
{
"name": "Uncategorized",
"uuid": "uncategorized-uuid",
"tags": [
{
"onResource": false,
"tag": {
"uuid": "tag-3-uuid",
"name": "Tag #3"
}
}
]
}
]
}
}
}
Additional Notes
This query supports pagination and returns up to 10 results per page.
Use the search
argument to filter tags by name and reduce result size.
This query is read-only and does not modify tag associations — to add tags, use the addTagsToResource mutation.
This query provides a quick and effective way to retrieve all tags grouped by category and check which ones are applied to a specific pipe or database.