/dashboards/static
POST https://tezzela.com/api/v1/dasboards/static
Description
This endpoint is used to create or update a dashboard based on a combination of the provided id and to (recipient).
It follows an upsert behavior:
If a dashboard with the specified
idandto(recipient) already exists, it will be updated with the new data.If no dashboard is found with that combination, a new dashboard will be created.
This makes it easy to maintain and update dashboards programmatically without needing to explicitly manage their lifecycle.
This endpoint is useful for:
Automating the publishing of real-time dashboards.
Keeping dashboards updated.
Request Body
{
"data": {
"title": "Purchases",
"id": "purchases-dashboard",
"to": "[email protected]" // It can be either the user's email or the user code assigned to the user in the app.
"widgets": [
{
"id": "purchases-widget",
"type": "text",
"title": "Compras",
"value": "22.168,44 €",
"sub": "este mes"
}
]
}
}Parameters
data(object, required): Contains the dashboard information.title(string, required): The title of the dashboard.id(string, required): The unique identifier for the dashboard. Used to either update an existing dashboard or create a new one if not found.to(string, required): The user's email address or the user code assigned to the user in the app, which will be the recipient of the dashboard. This should be the email the user registered with in the app or the corresponding user code provided.widgets(array, required): An array of widgets that will be part of the dashboard.
Response
As mentioned earlier, if a dashboard already exists with the provided id + to fields, it will be updated.
Last updated