Save Analysis Chart Layout
PUT /v1/projects/:project_id/analysis/boards/:board_id/order
Requires analytics:write. Each chart must belong to the board in the authenticated tenant and project. All supplied changes commit in one transaction; a failed update leaves the previous layout intact.
Request
Section titled “Request”There are no query parameters. Send a JSON body with a nonempty order array:
| Field | Required | Description |
|---|---|---|
order[].chart_id |
Yes | Chart to move or resize. IDs must be unique in the request. |
order[].position |
Yes | Nonnegative sort position. Positions must be unique in the request. |
order[].width |
No | Integer from 3 to 8, measured in columns of an eight-column grid. Omitted or zero preserves the custom width unless size changes. |
order[].height |
No | Integer from 4 to 12. Each row is 64 px with a 16 px gap; total chart height is height × 80 − 16 px. Omitted or zero preserves the height. |
order[].size |
No | Legacy width preset: half or full. Changing it without width resets the width to that preset. An explicit width takes precedence. |
{ "order": [ { "chart_id": "chr_tokens", "position": 0, "width": 5, "height": 7 }, { "chart_id": "chr_requests", "position": 1, "width": 3, "height": 4 } ]}Charts omitted from the request remain unchanged. The Portal sends all charts when saving a board layout. It packs them in order into the first available space without overlap, matching the editor preview. Narrow screens stack charts into one column while preserving saved desktop widths.
Response
Section titled “Response”200 OK:
{ "reordered": true }The list boards response includes each chart’s saved position, width, and height. Charts without custom dimensions omit width and height; the Portal uses four columns for half, eight for full, and five rows for the default height. Query configuration remains unchanged when saving a layout.
Errors
Section titled “Errors”| Status | Reason |
|---|---|
| 400 | Empty order, duplicate chart/position, negative position, invalid dimensions or preset, or a chart outside the board. |
| 404 | A chart was removed before its update could commit. |
In the Portal, select a board and choose Edit layout. Drag a chart to reposition it or drag its right edge, bottom edge, or lower-right corner to resize it. Save layout persists the complete layout; Cancel restores the saved layout. Keyboard users can reorder with Space and arrow keys on a move handle, and resize with arrow keys on a resize handle.