SetFilters
[POST] .../v1/widget/setfilters
Sets widget filters. Override the dashboard-level firm and stock filters for one widget. The method loads the widget and dashboard, checks creator ownership or the dashboard all-edit permission, rejects system or fixed dashboards, validates non-zero firm_id and stock_id, verifies stock belongs to firm when both are provided, stores the widget filters and returns an empty ok result. The request body is required, id must be positive and firm_id or stock_id can be 0 to clear the corresponding widget-level filter. Errors such as missing body, invalid id, missing widget or dashboard, denied access, system or fixed dashboard restrictions, unknown company or stock, stock-company mismatch, storage errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| firm_id | Int64 | Optional | Optional company filter stored on the widget. 0 clears the widget-level company filter. |
| id | Int64 | Required | Widget ID. |
| stock_id | Int64 | Optional | Optional stock filter stored on the widget. 0 clears the widget-level stock filter. |
Request Example
{
"id": 15,
"firm_id": 10,
"stock_id": 4
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
Response Example
{
"ok": true,
"result": {}
}