You can get a list of all the dashboard Widgets of a campaign by using the following endpoint.
{warning} Remember that all endpoints documented here need to be prefixed with
1.0/campaigns/{campaign.id}/.
| Method | URI | Headers |
|---|---|---|
| GET/HEAD | campaign_dashboard_widgets |
Default |
{
"data": [
{
"id": 1,
"campaign_id": 1,
"entity_id": 6,
"widget": "preview",
"config": {
"full": "1"
},
"width": 6,
"position": 2,
"tags": [],
"created_at": "2020-06-03T11:04:31.000000Z",
"updated_at": "2020-09-06T08:59:07.000000Z",
"created_by": 420,
"updated_by": 422
}
]
}
To get the details of a single dashboard Widget, use the following endpoint.
| Method | URI | Headers |
|---|---|---|
| GET/HEAD | campaign_dashboard_widgets/{campaign-dashboard-widget.id} |
Default |
{
"data": {
"id": 1,
"campaign_id": 1,
"entity_id": 6,
"widget": "preview",
"config": {
"full": "1"
},
"width": 6,
"position": 2,
"tags": [],
"created_at": "2020-06-03T11:04:31.000000Z",
"updated_at": "2020-09-06T08:59:07.000000Z",
"created_by": 420,
"updated_by": 422
}
}
To create a dashboard Widget, use the following endpoint.
| Method | URI | Headers |
|---|---|---|
| POST | campaign_dashboard_widgets |
Default |
| Parameter | Type | Detail |
|---|---|---|
widget |
string (Required) |
The widget type: preview, recent, random, calendar, header or campaign' |
entity_id |
int |
The related entity ID (required for preview and calendar) |
config |
object |
Config of the widget: boolean singular, boolean full, boolean entity-header |
position |
int |
Position of the widget. If empty, placed at end |
tags |
array |
Array of tag ids |
save_tags |
boolean |
Required to save tags |
| Widget |
{success} Code 200 with JSON body of the new dashboard Widget.
To update a dashboard widget, use the following endpoint.
| Method | URI | Headers |
|---|---|---|
| PUT/PATCH | campaign_dashboard_widgets/{campaign-dashboard-widget.id} |
Default |
The same body parameters are available as for when creating a dashboard Widget.
{success} Code 200 with JSON body of the updated dashboard Widget.
To delete a dashboard widget, use the following endpoint.
| Method | URI | Headers |
|---|---|---|
| DELETE | campaign_dashboard_widgets/{campaign-dashboard-widget.id} |
Default |
{success} Code 200 with JSON.