Dashboard Widgets


All Dashboard Widgets

You can get a list of all the dashboard Widgets of a campaign by using the following endpoint.

{warning} Don't forget that all endpoints documented here need to be prefixed with api/1.0/campaigns/{campaign.id}/.

Method Endpoint Headers
GET/HEAD campaign_dashboard_widgets Default

Results

{
    "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"
        }
    ]
}

Dashboard Widget

To get the details of a single dashboard Widget, use the following endpoint.

Method Endpoint Headers
GET/HEAD campaign_dashboard_widgets/{campaign-dashboard-widget.id} Default

Results

{
    "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"
    }

}

Create a Dashboard Widget

To create a dashboard Widget, use the following endpoint.

Method Endpoint Headers
POST campaign_dashboard_widgets Default

Body

Parameter Type Detail
widget string (Required) The widget type: preview, recent, random, calendar or unmentioned'
entity_id int The related entity ID (required for and calendar)
config array 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

Results

{success} Code 200 with JSON body of the new dashboard Widget.

Update a Dashboard Widget

To update a dashboard widget, use the following endpoint.

Method Endpoint Headers
PUT/PATCH campaign_dashboard_widgets/{campaign-dashboard-widget.id} Default

Body

The same body parameters are available as for when creating a dashboard Widget.

Results

{success} Code 200 with JSON body of the updated dashboard Widget.

Delete a Dashboard Widget

To delete a dashboard widget, use the following endpoint.

Method Endpoint Headers
DELETE campaign_dashboard_widgets/{campaign-dashboard-widget.id} Default

Results

{success} Code 200 with JSON.