Scheduled Views API Reference
Scheduled Views can be managed the same way you’d manage them from the Scheduled Views page — see Scheduled Views for the UI walkthrough and what a scheduled view is — but programmatically, over the same GraphQL endpoint as every other log query API.
All operations are available at /query. Operations use POST with a JSON body containing a query key.
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. See GraphQL API for general guidance on using the GraphQL client. Failed operations report errors in the standardized format described in API Response Codes.
Query
getScheduledViews
Returns every scheduled view, most-recently-created first.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
|
int |
No |
Maximum number of views to return. Omit to return all views. |
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{"query": "query { getScheduledViews(limit: 10) { Name FuseQlQuery StartTime IntervalSeconds RetentionTime RetentionUnit Created Active FolderUid Status { State EvalTime NextEvalTime LagTime } } }"}'
{
"data": {
"getScheduledViews": [
{
"Name": "logVolumeBySource",
"FuseQlQuery": "* | timeslice 1m | count by _timeslice, source",
"StartTime": "2026-07-26T15:09:31Z",
"IntervalSeconds": 60,
"RetentionTime": 365,
"RetentionUnit": "days",
"Created": "2026-07-26T15:09:31Z",
"Active": true,
"FolderUid": null,
"Status": {
"State": "running",
"EvalTime": "2026-09-16T07:29:00Z",
"NextEvalTime": "2026-09-16T07:30:00Z",
"LagTime": 47
}
}
]
}
}
Mutations
createScheduledView
Creates a new scheduled view. See Rules for query constraints (must aggregate, must use timeslice, cannot reference another view, no subqueries) and the view-naming pattern.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
|
string |
Yes |
Must start with a letter; letters, numbers, |
|
string |
Yes |
The aggregation the view evaluates on each interval. |
|
string |
No |
Folder to create the view in. Omit for the root folder. |
|
Time |
No |
When the view begins processing. Set in the past to backfill; omit to start from now. Cannot be in the future. |
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{"query": "mutation { createScheduledView(viewName: \"logVolumeBySource\", fuseQlQuery: \"* | timeslice 1m | count by _timeslice, source\") }"}'
{
"data": {
"createScheduledView": true
}
}
editScheduledView
Moves a scheduled view to a different folder. This is the only field editInfo currently supports — to change the query itself, delete and recreate the view.
Parameters (editInfo):
| Field | Type | Description |
|---|---|---|
|
string |
Folder UID to move the view to. |
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{"query": "mutation { editScheduledView(viewName: \"logVolumeBySource\", editInfo: { newFolderUid: \"xyz789\" }) }"}'
{
"data": {
"editScheduledView": true
}
}
pauseScheduledView
Stops a view from processing new data without resetting its progress. resumeScheduledView picks up from where it left off, catching up on any interval it missed while paused.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{"query": "mutation { pauseScheduledView(viewName: \"logVolumeBySource\") }"}'
{
"data": {
"pauseScheduledView": true
}
}
resumeScheduledView
Resumes a paused or stopped view. Resuming a paused view continues its existing lifecycle, evaluating any interval it missed. Resuming a stopped view starts a new lifecycle instead — see stopScheduledView.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{"query": "mutation { resumeScheduledView(viewName: \"logVolumeBySource\") }"}'
{
"data": {
"resumeScheduledView": true
}
}
stopScheduledView
Stops a view and resets its progress — unlike pauseScheduledView, this clears its evaluation and next-evaluation timestamps and starts a new lifecycle. Resuming a stopped view does not catch up on the interval it missed; it begins evaluating fresh. The view definition and its already-computed data are not deleted.
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{"query": "mutation { stopScheduledView(viewName: \"logVolumeBySource\") }"}'
{
"data": {
"stopScheduledView": true
}
}
deleteScheduledView
Permanently deletes a scheduled view’s definition. Already-computed data is not deleted by this call and remains queryable until it ages out under the view’s own retention, but no new data will be added.
Any FuseQL query referencing this view with _view=<name> will fail once the view is deleted.
|
curl -H "Authorization: Bearer <sa-token>" \
-H "Content-Type: application/json" \
-X POST "https://<your-instance>/query" \
-d '{"query": "mutation { deleteScheduledView(viewName: \"logVolumeBySource\") }"}'
{
"data": {
"deleteScheduledView": true
}
}
Response types
ScheduledView
| Field | Type | Description |
|---|---|---|
|
string |
Unique name identifier for the scheduled view. |
|
string |
The FuseQL query the view evaluates on each interval. |
|
Time |
When the view begins processing data. |
|
int |
Seconds between evaluations. |
|
int |
How long computed data is retained, in |
|
RetentionUnit |
|
|
Time |
When the view was created. |
|
boolean |
Whether the view is currently processing. |
|
string |
Folder the view is organized under, or |
|
ScheduledViewStatus |
Current runtime status — see below. |
Error handling
GraphQL errors are returned with HTTP 200 in an errors array alongside a null data value — see Error handling for the standard format and common causes. A viewName that doesn’t exist, or a fuseQlQuery that fails the validation rules in Rules, returns a UserError naming the specific problem (for example, "view names can only have (A-Z, a-z, 0-9), $, and _ after the first letter").
See Also
-
Scheduled Views — the Scheduled Views UI and query rules
-
Logs API Reference — FuseQL, LogQL, and lookup table query APIs
-
GraphQL API — general GraphQL client guidance
-
FuseQL — FuseQL language reference