Overview

Patch dashboard element

PATCH/v2/dashboards/uid/{uid}/charts/{chartId}
Features

Send the token in the Authorization: Bearer API_TOKEN header. See Tokens for which token types this endpoint accepts.

Input6
Authorizationheaderrequired
Sent from your browser straight to the API — never to Docsbook, never stored.
uidstring · pathrequired
(path)
chartIdstring · pathrequired
(path)
chartobject · bodyrequired
JSON merge patch applied to the existing chart. If id is present, it must match the chartId path parameter.
messagestring · body
overwriteboolean · body
versioninteger · body
Required when overwrite is false.
Output3
dashboardobject
overwrittenboolean
statusstring
One of: created, updated.
Responses
200Updated dashboard
400Invalid dashboard chart patch
404Dashboard or chart not found
412Version conflict
Example input
curl -X PATCH 'https://api.axiom.co/v2/dashboards/uid/{uid}/charts/{chartId}' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"chart":{}}'
Example output
{
  "dashboard": {
    "createdAt": "2024-01-01T00:00:00Z",
    "createdBy": "string",
    "dashboard": {
      "name": "string",
      "owner": "string",
      "description": "string",
      "charts": [
        {
          "id": null,
          "type": "TimeSeries",
          "name": null,
          "query": null
        }
      ],
      "layout": [
        {
          "i": null,
          "x": null,
          "y": null,
          "w": null,
          "h": null,
          "minW": null,
          "minH": null,
          "maxW": null,
          "maxH": null,
          "static": null
        }
      ],
      "refreshTime": 15,
      "schemaVersion": 2,
      "against": "-1h",
      "againstTimestamp": "string",
      "timeWindowStart": "string",
      "timeWindowEnd": "string",
      "uid": "string"
    },
    "id": "string",
    "uid": "string",
    "updatedAt": "2024-01-01T00:00:00Z",
    "updatedBy": "string",
    "version": 0
  },
  "overwritten": false,
  "status": "created"
}

Updated

Was this page helpful?