Favorite Facets API Reference
Favorite facets are managed through the GraphQL endpoint at /query.
All operations use POST with a JSON body containing a query key (for reads) or mutation key (for writes).
Replace <your-instance> with your Kloudfuse hostname and <sa-token> with a valid Service Account token.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{"query": "..."}'
For Service Account token setup, see Authentication.
List Favorite Facets
Returns facets matching an optional search string, with optional group filter and pagination.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{
"query": "query { getFavoriteFacets(contains: \"\", limit: 100) { name dataType group displayName source folderUid } }"
}'
Parameters (all optional):
| Parameter | Type | Description |
|---|---|---|
|
string |
Filter by display name substring. Default: |
|
string |
Filter to a specific facet group. |
|
string |
Pagination cursor from a previous response. |
|
int |
Maximum results to return. |
{
"data": {
"getFavoriteFacets": [
{
"name": "resource_name",
"dataType": "STRING",
"group": "Infrastructure",
"displayName": "resource_name",
"source": "",
"folderUid": "ffec62bbr7v28d"
}
]
}
}
List Favorite Facet Groups
Returns all group names that contain at least one favorite facet.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{"query": "query { getFavoriteFacetGroups(limit: 1000) }"}'
{
"data": {
"getFavoriteFacetGroups": [
"Infrastructure",
"Application",
"Recents"
]
}
}
Add a Favorite Facet
Creates a new favorite facet, optionally assigning it to a folder.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{
"query": "mutation($datatype: String!, $displayName: String!, $facet: String!, $facetGroup: String!, $source: String, $folderUid: String) { addFavoriteFacet(source: $source, facet: $facet, facetGroup: $facetGroup, displayName: $displayName, datatype: $datatype, folderUid: $folderUid) }",
"variables": {
"datatype": "STRING",
"displayName": "service_name",
"facet": "service_name",
"facetGroup": "Infrastructure",
"source": "",
"folderUid": "ffec62bbr7v28d"
}
}'
Variables:
| Variable | Type | Required | Description |
|---|---|---|---|
|
string |
Yes |
The raw field name in the telemetry data. |
|
string |
Yes |
Human-readable label shown in the UI. |
|
string |
Yes |
Data type: |
|
string |
Yes |
Group the facet appears under in the UI. |
|
string |
No |
Source identifier (leave empty for log facets). |
|
string |
No |
Folder to assign the facet to. Omit for root. |
{
"data": {
"addFavoriteFacet": true
}
}
Edit a Favorite Facet
Renames a facet, moves it to a different group, or reassigns it to a different folder.
Identify the facet by its current displayName and facetGroup.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{
"query": "mutation($displayName: String!, $facetGroup: String!, $newFacetGroup: String!, $newDisplayName: String!, $folderUid: String) { editFavoriteFacet(display_name: $displayName, facetGroup: $facetGroup, editInfo: {newGroup: $newFacetGroup, newDisplayName: $newDisplayName, newFolderUid: $folderUid}) }",
"variables": {
"displayName": "service_name",
"facetGroup": "Infrastructure",
"newFacetGroup": "Application",
"newDisplayName": "app_service_name",
"folderUid": "bfec62n4wfpq8e"
}
}'
{
"data": {
"editFavoriteFacet": true
}
}
Remove a Favorite Facet
Deletes a specific facet identified by its display name and group.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{
"query": "mutation { removeFavoriteFacet(display_name: \"app_service_name\", facetGroup: \"Application\") }"
}'
{
"data": {
"removeFavoriteFacet": true
}
}
Remove a Favorite Facet Group
Deletes an entire facet group and all facets within it.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{
"query": "mutation { removeFacetGroup(facetGroup: \"Application\") }"
}'
{
"data": {
"removeFacetGroup": true
}
}
Error Handling
GraphQL errors are returned with HTTP 200 in an errors array:
{
"errors": [
{
"message": "facet group not found",
"path": ["removeFacetGroup"]
}
]
}
See Also
-
Folders API Reference — Folder CRUD and permission management APIs