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": "..."}'
bash

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

limit

int

No

Maximum number of views to return. Omit to return all views.

List scheduled 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 } } }"}'
bash
Response
{
  "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
        }
      }
    ]
  }
}
json

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

viewName

string

Yes

Must start with a letter; letters, numbers, $, and _ only — no spaces.

fuseQlQuery

string

Yes

The aggregation the view evaluates on each interval.

folderUid

string

No

Folder to create the view in. Omit for the root folder.

startTime

Time

No

When the view begins processing. Set in the past to backfill; omit to start from now. Cannot be in the future.

Create a scheduled view
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\") }"}'
bash
Response
{
  "data": {
    "createScheduledView": true
  }
}
json

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

newFolderUid

string

Folder UID to move the view to.

Move a scheduled view to a different folder
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\" }) }"}'
bash
Response
{
  "data": {
    "editScheduledView": true
  }
}
json

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.

Pause a scheduled view
curl -H "Authorization: Bearer <sa-token>" \
     -H "Content-Type: application/json" \
     -X POST "https://<your-instance>/query" \
     -d '{"query": "mutation { pauseScheduledView(viewName: \"logVolumeBySource\") }"}'
bash
Response
{
  "data": {
    "pauseScheduledView": true
  }
}
json

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.

Resume a scheduled view
curl -H "Authorization: Bearer <sa-token>" \
     -H "Content-Type: application/json" \
     -X POST "https://<your-instance>/query" \
     -d '{"query": "mutation { resumeScheduledView(viewName: \"logVolumeBySource\") }"}'
bash
Response
{
  "data": {
    "resumeScheduledView": true
  }
}
json

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.

Stop a scheduled view
curl -H "Authorization: Bearer <sa-token>" \
     -H "Content-Type: application/json" \
     -X POST "https://<your-instance>/query" \
     -d '{"query": "mutation { stopScheduledView(viewName: \"logVolumeBySource\") }"}'
bash
Response
{
  "data": {
    "stopScheduledView": true
  }
}
json

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.
Delete a scheduled view
curl -H "Authorization: Bearer <sa-token>" \
     -H "Content-Type: application/json" \
     -X POST "https://<your-instance>/query" \
     -d '{"query": "mutation { deleteScheduledView(viewName: \"logVolumeBySource\") }"}'
bash
Response
{
  "data": {
    "deleteScheduledView": true
  }
}
json

Response types

ScheduledView

Field Type Description

Name

string

Unique name identifier for the scheduled view.

FuseQlQuery

string

The FuseQL query the view evaluates on each interval.

StartTime

Time

When the view begins processing data.

IntervalSeconds

int

Seconds between evaluations.

RetentionTime

int

How long computed data is retained, in RetentionUnit units.

RetentionUnit

RetentionUnit

days, weeks, or months.

Created

Time

When the view was created.

Active

boolean

Whether the view is currently processing.

FolderUid

string

Folder the view is organized under, or null for the root folder.

Status

ScheduledViewStatus

Current runtime status — see below.

ScheduledViewStatus

Field Type Description

State

ViewState

running, catchingUp, paused, or stopped.

EvalTime

Time

Timestamp of the most recent evaluation.

NextEvalTime

Time

Timestamp of the next scheduled evaluation.

LagTime

int

How far behind current time the view is, in seconds.

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