API Documentation

API Endpoint

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
Requestsreturns widgets

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
Responses200
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 widgets
GET/api/v2/widgets


GET /api/v2/widgets/4
Requestsreturns widget

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

Get a widget
GET/api/v2/widgets/{id}

URI Parameters
HideShow
id
number (required) Example: 4

POST /api/v2/widgets
Requestscreates a widgetcreates a widgetcreates a widgetcreates a widgetreturns error

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"
        }
      }
    }
  }
}
Responses201
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"
        }
      }
    }
  }
}
Responses201
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"
        }
      }
    }
  }
}
Responses422
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"
        }
      }
    }
  }
}
Responses201
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": ""
  }
}
Responses422
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 widget
POST/api/v2/widgets

URI Parameters
HideShow
column
number (required) Example: 1

column

row
number (required) Example: 1

row

height
number (required) Example: 1

height

width
number (required) Example: 1

width

widget_type_id
number (required) Example: 1

widget type id

dashboard_id
number (required) Example: 1

dashboard id

filter_id
number (optional) Example: 1

filter id


PATCH /api/v2/widgets/1
Requestsupdates widgetreturns error

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
    }
  }
}
Responses200
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": ""
    }
  }
}
Responses422
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"
      }
    }
  ]
}

Update a widget
PATCH/api/v2/widgets/{id}

URI Parameters
HideShow
id
number (required) Example: 1

widget id


DELETE /api/v2/widgets/1
Requestsdeletes widget

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
Responses204
This response has no content.

Deletes a widget
DELETE/api/v2/widgets/{id}

URI Parameters
HideShow
id
number (required) Example: 1

widget id


Generated by aglio on 24 Jul 2025