dashboards

Patch a single element (RFC 6902, optimistic concurrency).

Applies an RFC 6902 JSON Patch to one element. Paths target the element fields /type, /title, /data/..., /spec/..., /overrides/... and the grid coordinates /x, /y, /w, /h, /zIndex. This lets an agent make a surgical edit — e.g. one series color — without re-sending the entire spec.

The body is a pure patch document, so the current element version is supplied out-of-band: pass it via the version query parameter or an If-Match header. A stale version returns 409. The result is re-validated against the dashboard JSON Schema and a new dashboard revision is written so GET /v1/dashboards/{id} stays consistent.

Provenance (DVT-1658, required by DVT-1792): pass a reason query parameter (or the X-Dvt-Change-Reason header) explaining why the change was made — it is stored on the new element revision and propagated into the dashboard revision's change summary so the Versions tab shows why the change was made. Required; an empty reason is rejected with 400. Kept out of the body so it stays a pure RFC 6902 patch document.

patch/v1/dashboards/{id}/pages/{pageId}/elements/{elementId}

Request

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

Query parameters

versioninteger

The element's current version (optimistic concurrency). Required unless supplied via If-Match.

reasonstring required

Required provenance note (the "why") recorded on the new revision (DVT-1658) and propagated into the dashboard revision's change summary (DVT-1792). 1–280 characters; an empty or over-long value is rejected with 400. May also be supplied via the X-Dvt-Change-Reason header instead of this query parameter.

Headers

If-Matchstring

Alternative to the version query parameter — the element's current version.

Response

Element updated; 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.