dashboards

Restore an element to a prior version.

Reverts the element's content (type, title, data, spec, overrides) to the chosen revision. Restore is a forward edit — a new revision is written and the element's version increments — so history stays append-only. Grid coordinates are page-owned and are not changed by an element restore. A new dashboard revision is written so GET /v1/dashboards/{id} stays consistent.

Provenance (DVT-1792): a required reason explains why the element was rolled back; it is propagated into the dashboard revision's change summary so the Versions tab shows why.

post/v1/dashboards/{id}/pages/{pageId}/elements/{elementId}/restore

Request

  • Base URL: http://localhost:8080
  • URL: http://localhost:8080/v1/dashboards/{id}/pages/{pageId}/elements/{elementId}/restore
  • Auth: one of:
    • API key in cookie dvt_session
    • HTTP bearer

Request body

versioninteger required

The prior element version to restore (from GET .../revisions).

reasonstring required

Required provenance note (the "why") explaining the rollback; recorded on the new element revision (DVT-1658) and propagated into the dashboard revision's change summary (DVT-1792). 1–280 characters.

Response

Element restored; returns the new element + themeContext.

Example response

{
  "data": {
    "type": "chart:bar"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.