API Documentation
Widgets ¶
Widgets ¶
The Widget object represents the fundamental dynamic component of the Dashboard system.
These customizable blocks provide various filtering options, allowing you to effortlessly organize all essential information in one place.
You can find out more about widgets in our Help documentation for Dashboards under section: Widgets
Supported filter params
-
dashboard_id (array)
-
report_layout_id
GET /api/v2/widgets
Requests
GET /api/v2/widgets
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": [
{
"id": "1",
"type": "widgets",
"attributes": {
"column_position": 0,
"content": "Content with number 1",
"height": 2,
"row_position": 0,
"title": null,
"widget_type_id": 1,
"width": 2
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2210"
}
},
"dashboard": {
"meta": {
"included": false
}
},
"filter": {
"meta": {
"included": false
}
},
"attachments": {
"meta": {
"included": false
}
}
}
},
{
"id": "2",
"type": "widgets",
"attributes": {
"column_position": 0,
"content": "Content with number 2",
"height": 2,
"row_position": 0,
"title": null,
"widget_type_id": 1,
"width": 2
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2210"
}
},
"dashboard": {
"meta": {
"included": false
}
},
"filter": {
"meta": {
"included": false
}
},
"attachments": {
"meta": {
"included": false
}
}
}
},
{
"id": "3",
"type": "widgets",
"attributes": {
"column_position": 0,
"content": "Content with number 3",
"height": 2,
"row_position": 0,
"title": null,
"widget_type_id": 1,
"width": 2
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2210"
}
},
"dashboard": {
"meta": {
"included": false
}
},
"filter": {
"meta": {
"included": false
}
},
"attachments": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/widgets?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/widgets?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 3,
"page_size": 30,
"max_page_size": 200
}
}
Get all widgetsGET/api/v2/widgets
GET /api/v2/widgets/4
Requests
GET /api/v2/widgets/4
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "4",
"type": "widgets",
"attributes": {
"column_position": 0,
"content": "Content with number 4",
"height": 2,
"row_position": 0,
"title": null,
"widget_type_id": 1,
"width": 2
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2211"
}
},
"dashboard": {
"meta": {
"included": false
}
},
"filter": {
"meta": {
"included": false
}
},
"attachments": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/widgets
Requests
POST /api/v2/widgets
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "widgets",
"attributes": {
"width": 2,
"height": 2,
"row_position": 2,
"column_position": 2,
"widget_type_id": 1
},
"relationships": {
"dashboard": {
"data": {
"type": "dashboards",
"id": "34"
}
}
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "6",
"type": "widgets",
"attributes": {
"column_position": 2,
"content": null,
"height": 2,
"row_position": 2,
"title": null,
"widget_type_id": 1,
"width": 2
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2212"
}
},
"dashboard": {
"meta": {
"included": false
}
},
"filter": {
"meta": {
"included": false
}
},
"attachments": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/widgets
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "widgets",
"attributes": {
"width": 2,
"height": 2,
"row_position": 2,
"column_position": 2,
"widget_type_id": 1
},
"relationships": {
"dashboard": {
"data": {
"type": "dashboards",
"id": "35"
}
},
"filter": {
"data": {
"type": "filters",
"id": "74"
}
}
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "8",
"type": "widgets",
"attributes": {
"column_position": 2,
"content": null,
"height": 2,
"row_position": 2,
"title": null,
"widget_type_id": 1,
"width": 2
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2213"
}
},
"dashboard": {
"meta": {
"included": false
}
},
"filter": {
"meta": {
"included": false
}
},
"attachments": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/widgets
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "widgets",
"attributes": {
"width": 2,
"height": 2,
"row_position": 2,
"column_position": 2,
"widget_type_id": 1
},
"relationships": {
"dashboard": {
"data": {
"type": "dashboards",
"id": "0"
}
}
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "attribute is invalid",
"source": {
"pointer": "data/attributes/dashboard"
}
}
]
}
POST /api/v2/widgets
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "widgets",
"attributes": {
"width": 2,
"height": 2,
"row_position": 2,
"column_position": 2,
"widget_type_id": 17,
"content": "widget content with @[Person:1:John Doe]"
},
"relationships": {
"dashboard": {
"data": {
"type": "dashboards",
"id": "37"
}
}
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "11",
"type": "widgets",
"attributes": {
"column_position": 2,
"content": "widget content with @[{\"type\":\"person\",\"id\":\"1\",\"label\":\"John Doe\",\"avatar_url\":null,\"attachment_url\":null,\"is_done\":true}]",
"height": 2,
"row_position": 2,
"title": null,
"widget_type_id": 17,
"width": 2
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2215"
}
},
"dashboard": {
"meta": {
"included": false
}
},
"filter": {
"meta": {
"included": false
}
},
"attachments": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/widgets
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"type": "widgets",
"attributes": {
"width": "",
"height": ""
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "attribute is invalid",
"source": {
"pointer": "data/attributes/dashboard"
}
}
]
}
Create a widgetPOST/api/v2/widgets
URI Parameters
- column
number
(required) Example: 1column
- row
number
(required) Example: 1row
- height
number
(required) Example: 1height
- width
number
(required) Example: 1width
- widget_type_id
number
(required) Example: 1widget type id
- dashboard_id
number
(required) Example: 1dashboard id
- filter_id
number
(optional) Example: 1filter id
PATCH /api/v2/widgets/1
Requests
PATCH /api/v2/widgets/13
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "widgets",
"attributes": {
"row_position": 5
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "13",
"type": "widgets",
"attributes": {
"column_position": 0,
"content": "Content with number 10",
"height": 2,
"row_position": 5,
"title": null,
"widget_type_id": 1,
"width": 2
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2217"
}
},
"dashboard": {
"meta": {
"included": false
}
},
"filter": {
"meta": {
"included": false
}
},
"attachments": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
PATCH /api/v2/widgets/14
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "widgets",
"attributes": {
"row_position": ""
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/row_position"
}
}
]
}
DELETE /api/v2/widgets/1
Requests
DELETE /api/v2/widgets/15
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
This response has no content.
Generated by aglio on 24 Jul 2025