card
card ¶
CardSearch_UnsupportedFilterError ¶
CardSearch_UnsupportedFilterError(
function_name: str,
message: str,
parent_class: str | None = None,
)
Bases: RouteError
Raised when a caller asks for a search filter that Domo's /content/v2/cards/adminsummary endpoint does not support server-side.
Raising here is deliberate: silently building a request body the API ignores makes every caller believe they got filtered results when they actually got the unfiltered set (see crew-dcs#1488).
Source code in src/crew_dcs/routes/card.py
78 79 80 81 82 83 84 85 86 87 88 | |
create_card
async
¶
create_card(
auth: DomoAuth,
definition: dict,
dataset_id: str,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Create a new KPI card via PUT /content/v3/cards/kpi.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
DomoAuth instance |
required |
definition
|
dict
|
Card definition dict (from KpiCardBuilder.to_dict()["definition"] or KpiDefinition.definition property) |
required |
dataset_id
|
str
|
The dataSourceId to bind the card to |
required |
context
|
RouteContext | None
|
Optional RouteContext |
None
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData with the created card's id and metadata |
Source code in src/crew_dcs/routes/card.py
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | |
delete_card
async
¶
delete_card(
auth: DomoAuth,
card_id: str,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Delete a card via DELETE /content/v1/cards/bulk.
The bulk endpoint takes the card ids as a cardIds query parameter
(comma-separated for multiple); passing a single id deletes just that card.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
DomoAuth instance |
required |
card_id
|
str
|
The id of the card to delete |
required |
context
|
RouteContext | None
|
Optional RouteContext |
None
|
Source code in src/crew_dcs/routes/card.py
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 | |
generate_body_search_cards_admin_summary ¶
generate_body_search_cards_admin_summary(
page_ids: list[str] | None = None,
card_search_text: str | None = None,
page_search_text: str | None = None,
) -> dict
Build the POST body for search_cards_admin_summary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
page_ids
|
list[str] | None
|
Restrict results to cards on these page ids. This is enforced server-side (verified live: a bogus id returns 0 rows, a real id returns only cards on that page). |
None
|
card_search_text
|
str | None
|
Card-title substring filter. Enforced server-side (verified live: a nonsense term returns 0 rows). |
None
|
page_search_text
|
str | None
|
Not supported by this endpoint. Domo's
|
None
|
Raises:
| Type | Description |
|---|---|
CardSearch_UnsupportedFilterError
|
if |
Source code in src/crew_dcs/routes/card.py
604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 | |
get_card_access_list
async
¶
get_card_access_list(
auth: DomoAuth,
card_id: str,
is_expand_users: bool = True,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Retrieve card access list showing which users and groups have access.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
card_id
|
str
|
Unique identifier for the card |
required |
is_expand_users
|
bool
|
Whether to expand group memberships to include individual users |
True
|
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing access list with users and groups |
Raises:
| Type | Description |
|---|---|
CardApiError
|
If access list retrieval fails |
Source code in src/crew_dcs/routes/card.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
get_card_by_id
async
¶
get_card_by_id(
card_id: str,
auth: DomoAuth,
optional_parts: (
list[Card_OptionalParts_Enum] | str
) = "certification,datasources,drillPath,owners,properties,domoapp,pages",
*,
context: RouteContext | None = None,
return_raw: bool = False,
**context_kwargs
)
Retrieve a card by ID with optional parts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
card_id
|
str
|
The card ID to retrieve |
required |
auth
|
DomoAuth
|
Authentication object |
required |
optional_parts
|
list[Card_OptionalParts_Enum] | str
|
List of Card_OptionalParts_Enum values (preferred) or comma-separated string (for backward compatibility). Defaults to "certification,datasources,drillPath,owners,properties,domoapp" Note: Enum values are preferred over strings for type safety and better IDE support. |
'certification,datasources,drillPath,owners,properties,domoapp,pages'
|
return_raw
|
bool
|
Return raw API response |
False
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
Returns:
| Type | Description |
|---|---|
|
ResponseGetData object containing card data |
Source code in src/crew_dcs/routes/card.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | |
get_card_metadata
async
¶
get_card_metadata(
auth: DomoAuth,
card_id: str,
optional_parts: (
list[Card_OptionalParts_Enum] | str
) = "metadata,certification,datasources,owners,problems,domoapp",
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Retrieve card metadata with optional parts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
card_id
|
str
|
The card ID to retrieve metadata for |
required |
optional_parts
|
list[Card_OptionalParts_Enum] | str
|
List of Card_OptionalParts_Enum values (preferred) or comma-separated string (for backward compatibility). Defaults to "metadata,certification,datasources,owners,problems,domoapp" Note: Enum values are preferred over strings for type safety and better IDE support. |
'metadata,certification,datasources,owners,problems,domoapp'
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing card metadata |
Source code in src/crew_dcs/routes/card.py
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 | |
get_cards_by_ids
async
¶
get_cards_by_ids(
card_ids: list[str],
auth: DomoAuth,
optional_parts: (
list[Card_OptionalParts_Enum] | str
) = "metadata,certification,datasources,drillPath,owners,properties,domoapp",
*,
context: RouteContext | None = None,
return_raw: bool = False,
**context_kwargs
)
Retrieve multiple cards by ID in a single batch request.
Uses the same /api/content/v1/cards endpoint with comma-separated urns, allowing efficient batch retrieval of card metadata (including chartType).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
card_ids
|
list[str]
|
List of card IDs to retrieve |
required |
auth
|
DomoAuth
|
Authentication object |
required |
optional_parts
|
list[Card_OptionalParts_Enum] | str
|
Comma-separated metadata parts or list of Card_OptionalParts_Enum. Defaults to include metadata for chartType/badge_type hydration. |
'metadata,certification,datasources,drillPath,owners,properties,domoapp'
|
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
Returns:
| Type | Description |
|---|---|
|
ResponseGetData with response as a list of card dicts |
Source code in src/crew_dcs/routes/card.py
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | |
replace_card_owners
async
¶
replace_card_owners(
auth: DomoAuth,
card_id: str,
owners: list[dict[str, str]],
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
REPLACES the owners of a card. Anyone not in owners loses ownership.
NOT independently proven — this rests on the endpoint shape (PUT of a whole list), not a live before/after. Treat it as a strong lead, not a fact; see AGENTS.md on claims needing a runnable proof.
The 404-for-domoapp-cards behaviour below IS proven: tests/integration/api_semantics/design_access_semantics_tests.py::test_app_cards_have_no_owner_list.
PUT-the-whole-list, not add. Named update_card_owners until it was
renamed; the old name remains as a deprecated alias. To add an owner you must
GET the current owners, append, and pass the merged list — see
DomoCard_OwnerManager.add_owners (classes/DomoCard/manager_owner.py:152),
which does that and reads back afterwards.
Note this route does NOT work for domoapp-type cards: it 404s, because app
cards carry no owner list and inherit from their page and app instance.
See .agents/guides/access-and-sharing.md for the add-vs-replace table and
the read-back recipe — a 200 here does not prove the write landed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
card_id
|
str
|
Card ID to update |
required |
owners
|
list[dict[str, str]]
|
List of owner dicts with keys "id" and "type" (USER/GROUP) |
required |
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing API response |
Source code in src/crew_dcs/routes/card.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
replace_card_pages
async
¶
replace_card_pages(
auth: DomoAuth,
card_id: str,
page_ids: list[str | int],
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
REPLACES the set of pages a card lives on. Omitted pages lose the card.
PUT-the-whole-list, same shape as replace_card_owners. Named
update_card_pages until it was renamed — "update" read as "add" and it is
not. The old name remains as a deprecated alias.
See .agents/guides/access-and-sharing.md.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
card_id
|
str
|
Card ID to update |
required |
page_ids
|
list[str | int]
|
List of page IDs the card should belong to |
required |
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing API response |
Source code in src/crew_dcs/routes/card.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
search_cards_admin_summary
async
¶
search_cards_admin_summary(
auth: DomoAuth,
body: dict,
maximum: int | None = None,
optional_parts: (
list[Card_OptionalParts_Enum] | str
) = "certification,datasources,drillPath,owners,properties,domoapp",
debug_loop: bool = False,
wait_sleep: int = 3,
return_raw: bool = False,
page_search_text: str | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Search cards admin summary with optional parts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
body
|
dict
|
Search body dictionary |
required |
maximum
|
int | None
|
Maximum number of results to return |
None
|
optional_parts
|
list[Card_OptionalParts_Enum] | str
|
List of Card_OptionalParts_Enum values (preferred) or comma-separated string (for backward compatibility). Defaults to "certification,datasources,drillPath,owners,properties,domoapp" Note: Enum values are preferred over strings for type safety and better IDE support. |
'certification,datasources,drillPath,owners,properties,domoapp'
|
debug_loop
|
bool
|
Enable loop debugging |
False
|
wait_sleep
|
int
|
Sleep time between requests |
3
|
return_raw
|
bool
|
Return raw API response |
False
|
page_search_text
|
str | None
|
Filter results to cards whose page hierarchy contains a page (or parent page) title matching this text (case-insensitive substring match). Domo's |
None
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing card admin summaries |
Source code in src/crew_dcs/routes/card.py
659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 | |
update_card_owners
async
¶
update_card_owners(
auth: DomoAuth,
card_id: str,
owners: list[dict[str, str]],
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Deprecated alias for replace_card_owners, which REPLACES.
Source code in src/crew_dcs/routes/card.py
799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 | |
update_card_pages
async
¶
update_card_pages(
auth: DomoAuth,
card_id: str,
page_ids: list[str | int],
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Deprecated alias for replace_card_pages, which REPLACES.
Source code in src/crew_dcs/routes/card.py
778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 | |