card_gaps
card_gaps ¶
create_kpi_card
async
¶
create_kpi_card(
auth: DomoAuth,
dataset_id: str,
card_title: str,
*,
chart_type: str = "single-value",
value_column: str | None = None,
aggregation: str = "sum",
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Create a KPI card backed by a dataset.
Convenience wrapper around PUT /content/v3/cards/kpi that builds the card body from a dataset id, title, chart type, and value column.
Source code in src/crew_dcs/routes/card_gaps.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
generate_kpi_card_body ¶
generate_kpi_card_body(
dataset_id: str,
card_title: str,
chart_type: str = "single-value",
value_column: str | None = None,
aggregation: str = "sum",
) -> dict[str, Any]
Generate the payload for PUT /content/v3/cards/kpi.
Builds a minimal single-metric KPI card definition backed by dataset_id.
Source code in src/crew_dcs/routes/card_gaps.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |