Get the dashboard layout.
const url = 'https://api.tradr.cloud/api/dashboard/layout';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.tradr.cloud/api/dashboard/layoutAuthed. Returns the user’s widget placements on a 12-column grid, their theme, and when the layout was last saved. A user who has never customised the dashboard gets the default layout, not an empty one. A saved layout is reconciled against the current geometry before it is returned: a widget stored below its type’s minimum size — which only happens when that minimum has been raised since the layout was saved — is given the current default size for its type, and the widgets below it move down so none overlap. The stored row is not rewritten; the next save persists the reconciled placements. The response is therefore always a body this endpoint will accept back on a PUT.
Responses
Section titled “Responses”The layout.
object
One widget on the dashboard grid. The grid is 12 columns wide and rows are a fixed height, so x/w are columns and y/h are rows.
object
Optional per-widget settings. Serialises to at most 2048 bytes.
X + w must not exceed 12.
Example
{ "theme": "light", "widgets": [ { "type": "stats-summary" } ]}No valid session.