SetPosition

[POST] .../v1/widget/setposition

Sets widget positions. Use this batch method to update the grid position and size of widgets after loading a dashboard layout with Widget/Get. The request body is a required array; every item identifies a widget and can set row, column, width and height and all widgets in the batch must belong to the same dashboard. The method validates row >= 0, column between 0 and 11, width between 1 and 12, height >= 1, checks current request user dashboard ownership or dashboard all-edit permission, rejects fixed dashboards, updates provided fields in one transaction, clears widget cache and returns an empty ok result. Business errors such as missing or empty array body, invalid coordinates, missing widgets or dashboard, widgets from different dashboards, denied access, fixed dashboard restrictions, no editable fields, database errors and transaction failures are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
column Int32 Optional Column in the row where the widget is located. null means unchanged.
height Int32 Optional Widget height in rows. null means unchanged.
id Int64 Required Widget ID.
row Int32 Optional Row where the widget is located. null means unchanged.
width Int32 Optional Widget width in columns. null means unchanged.

Request Example

[
  {
    "id": 15,
    "row": 0,
    "column": 0,
    "width": 4,
    "height": 2
  },
  {
    "id": 16,
    "row": 0,
    "column": 4,
    "width": 4,
    "height": 2
  }
]

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.

Response Example

{
  "ok": true,
  "result": {}
}