Skip to main content
POST
Preview draft panel

Restrictions

Usage

  • Use this to check a panel while the user is still editing it: the draft panel and its variables are executed inline, and nothing is written and no revision is created.
  • context ties the draft to a stored dashboard (existing with dashboard_id) or to a folder that has no dashboard yet (new with folder_id). The caller needs access to that dashboard’s folder or to that folder.
  • The draft panel and variables are validated like a stored definition (grid, query counts per visualization kind, variable references) and must stay within 1 MiB; a violation fails the call with HTTP 400, or HTTP 413 when a size limit is exceeded. Text panels cannot be previewed.
  • The response has the same shape as a panel run, without dashboard_id and revision. It returns HTTP 200 even when every query failed; read run_state and each ref’s state and error.
  • max_data_points defaults to 100 and is bounded at 2–5000. At most 6 queries run at the same time. A response larger than 8 MiB is rejected with EntityTooLarge (HTTP 413). The call has a 35-second overall deadline; exceeding it returns RuntimeTimeout (HTTP 504).

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json

Execute a draft panel inline, without saving a dashboard revision. The draft panel and variables together must stay within 1 MiB, and the request body within 2 MiB.

context
object
required

Where an unsaved draft panel or variable set belongs. existing targets a stored dashboard, new a folder that does not contain one yet — the two are mutually exclusive.

panel
object
required

A single visualization. datasource_ref is required for every kind except text, where it is forbidden. Panels must not overlap inside the same container; the 24-column grid is validated on save.

variables
object[]
required

Draft variables the panel may reference, at most 20. Required; the panel's queries can only use variables listed here.

Maximum array length: 20

A dashboard variable. Pick the arm with kind.

time
object
required

Absolute evaluation window. Both bounds are Unix timestamps in milliseconds, from_ms must be less than to_ms, and neither may exceed the JavaScript safe integer limit.

selections
object

Selections keyed by variable name, at most 20 entries. Variables without an entry fall back to their draft default.

max_data_points
integer | null

Target maximum number of points per series for range queries; the server derives the query step from it. 2–5000; omit or send null for the default of 100.

Required range: 2 <= x <= 5000

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object

Draft panel execution result. Same shape as a stored panel run, minus dashboard_id and revision. HTTP 200 is returned even when every query failed; a response larger than 8 MiB is rejected with EntityTooLarge (HTTP 413).