SetFilters

[POST] .../v1/dashboard/setfilters

Sets dashboard filters. Use this method to update the dashboard-level firm, stock and period filters that period-aware widgets use when their own widget filter is not more specific. The method loads the dashboard, checks creator ownership or the dashboard all-edit permission, normalizes unsupported period values to None, validates non-zero firm_id and stock_id, verifies stock belongs to firm when both are provided, updates the dashboard filters, clears dashboard cache and returns an empty ok result. The request body is required, id must be positive, firm_id and stock_id may be 0 to clear those filters and period may be None, Yesterday, Today, Week or Month. Business errors such as missing body, invalid id, missing dashboard, denied access, unknown company or stock, stock-company mismatch, database errors and transaction failures are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
firm_id Int64 Optional Company ID. 0 means company is not specified.
id Int64 Required Dashboard ID.
period String Optional Dashboard period. None means widgets use their default period; Yesterday, Today, Week and Month limit period-aware widget data. Allowed values: None, Yesterday, Today, Week, Month.
stock_id Int64 Optional Stock ID. 0 means stock is not specified.

Request Example

{
  "id": 3,
  "firm_id": 10,
  "stock_id": 4,
  "period": "Week"
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.

Response Example

{
  "ok": true
}