beastmode
beastmode ¶
BeastMode_CRUD_Error ¶
BeastMode_CRUD_Error(
operation: str,
entity_id: str | None = None,
res: ResponseGetData | None = None,
message: str | None = None,
**kwargs
)
Bases: RouteError
Raised when BeastMode create, update, or delete operations fail.
This exception is used for failures during lock/unlock operations or other modification operations on BeastModes.
Source code in src/crew_dcs/routes/beastmode.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | |
BeastMode_GET_Error ¶
BeastMode_GET_Error(
entity_id: str | None = None,
res: ResponseGetData | None = None,
message: str | None = None,
**kwargs
)
Bases: RouteError
Raised when BeastMode retrieval operations fail.
This exception is used for failures during GET operations on BeastModes, including API errors and unexpected response formats.
Source code in src/crew_dcs/routes/beastmode.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
SearchBeastModeNotFoundError ¶
SearchBeastModeNotFoundError(
search_criteria: str,
res: ResponseGetData | None = None,
**kwargs
)
Bases: RouteError
Raised when BeastMode search operations return no results.
This exception is used when searching for specific BeastModes that don't exist or when search criteria match no BeastModes.
Source code in src/crew_dcs/routes/beastmode.py
129 130 131 132 133 134 135 136 137 138 139 140 141 | |
create_beastmode
async
¶
create_beastmode(
auth: DomoAuth,
name: str,
expression: str,
dataset_id: str,
data_type: str = "STRING",
aggregated: bool = False,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Create a new BeastMode (calculated field) template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing instance and credentials |
required |
name
|
str
|
Display name for the BeastMode |
required |
expression
|
str
|
SQL-like formula expression |
required |
dataset_id
|
str
|
ID of the dataset to associate the BeastMode with |
required |
data_type
|
str
|
Data type of the result (default: "STRING") |
'STRING'
|
aggregated
|
bool
|
Whether the formula is aggregated (default: False) |
False
|
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData containing the created BeastMode data |
Raises:
| Type | Description |
|---|---|
BeastMode_CRUD_Error
|
If creation fails |
Source code in src/crew_dcs/routes/beastmode.py
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 657 658 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 | |
delete_beastmode
async
¶
delete_beastmode(
auth: DomoAuth,
beastmode_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Delete a BeastMode template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing instance and credentials |
required |
beastmode_id
|
str
|
Unique identifier of the BeastMode to delete |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData confirming deletion |
Raises:
| Type | Description |
|---|---|
BeastMode_CRUD_Error
|
If deletion fails |
Source code in src/crew_dcs/routes/beastmode.py
784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 | |
generate_beastmode_body ¶
generate_beastmode_body(
name: str | None = None,
filters: list[dict] | None = None,
is_unlocked: bool | None = None,
is_not_variable: bool | None = True,
link: Search_BeastModeLink = None,
)
Build the POST body for /query/v1/functions/search.
The Functions API backs both beast modes and variables. The is_not_variable
flag selects which:
True(default): exclude variables — beast modes only (addsnotvariable).False: only variables (addsvariable).None: no variable filter — return both.
Source code in src/crew_dcs/routes/beastmode.py
149 150 151 152 153 154 155 156 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 | |
get_beastmode_by_id
async
¶
get_beastmode_by_id(
auth: DomoAuth,
beastmode_id: str,
include_hidden: bool = False,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Retrieve a specific BeastMode by its ID.
Fetches details for a single BeastMode identified by its unique ID. Returns information about the BeastMode including its formula, name, and associated resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing instance and credentials |
required |
beastmode_id
|
str
|
Unique identifier for the BeastMode to retrieve |
required |
include_hidden
|
bool
|
Include hidden/internal calculations in the response |
False
|
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing the specific BeastMode data |
Raises:
| Type | Description |
|---|---|
BeastMode_GET_Error
|
If BeastMode retrieval fails |
SearchBeastModeNotFoundError: If no BeastMode with the specified ID exists
Example
beastmode_res = await get_beastmode_by_id(auth, "1165", include_hidden=True) bm_data = beastmode_res.response print(f"BeastMode: {bm_data['name']}")
Source code in src/crew_dcs/routes/beastmode.py
389 390 391 392 393 394 395 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 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | |
get_card_beastmodes
async
¶
get_card_beastmodes(
auth: DomoAuth,
card_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[dict]
Get BeastModes associated with a specific card.
Retrieves all BeastModes that are linked to the specified card. This function searches all BeastModes and filters for those with links to the given card ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing instance and credentials |
required |
card_id
|
str
|
Unique identifier for the card |
required |
return_raw
|
bool
|
Return raw API response without filtering |
False
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
list[dict]
|
list of BeastMode dictionaries containing id, name, locked status, |
list[dict]
|
legacyId, status, and links |
Example
card_beastmodes = await get_card_beastmodes(auth, "card-123") for bm in card_beastmodes: ... print(f"BeastMode: {bm['name']}")
Source code in src/crew_dcs/routes/beastmode.py
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 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | |
lock_beastmode
async
¶
lock_beastmode(
auth: DomoAuth,
beastmode_id: str,
is_locked: bool,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Lock or unlock a BeastMode.
Sets the lock status of a BeastMode to prevent or allow modifications. Locked BeastModes cannot be edited or deleted.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing instance and credentials |
required |
beastmode_id
|
str
|
Unique identifier for the BeastMode |
required |
is_locked
|
bool
|
True to lock the BeastMode, False to unlock it |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing the updated BeastMode data |
Raises:
| Type | Description |
|---|---|
BeastMode_CRUD_Error
|
If lock/unlock operation fails |
Example
result = await lock_beastmode(auth, "beastmode-123", is_locked=True) print(f"BeastMode locked: {result.is_success}")
Source code in src/crew_dcs/routes/beastmode.py
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 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 | |
search_beastmodes
async
¶
search_beastmodes(
auth: DomoAuth,
filters: list[dict] | None = None,
debug_loop: bool = False,
name: str | None = None,
is_unlocked: bool | None = None,
is_not_variable: bool | None = True,
link: Search_BeastModeLink | None = None,
*,
context: RouteContext | None = None,
return_raw: bool = False,
**context_kwargs
) -> ResponseGetData
Search for BeastModes with optional filters.
Searches for BeastModes (calculated fields) in the Domo instance using optional filter criteria. Returns a paginated list of matching BeastModes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing instance and credentials |
required |
filters
|
list[dict] | None
|
Optional list of filter dictionaries to apply to the search |
None
|
debug_loop
|
bool
|
Enable detailed loop iteration logging |
False
|
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing list of BeastModes |
Raises:
| Type | Description |
|---|---|
BeastMode_GET_Error
|
If search operation fails |
Example
beastmodes_res = await search_beastmodes(auth) for bm in beastmodes_res.response: ... print(f"BeastMode: {bm['name']}, ID: {bm['id']}")
Source code in src/crew_dcs/routes/beastmode.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 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 | |
search_variables
async
¶
search_variables(
auth: DomoAuth,
filters: list[dict] | None = None,
name: str | None = None,
debug_loop: bool = False,
*,
context: RouteContext | None = None,
return_raw: bool = False,
**context_kwargs
) -> ResponseGetData
Search for Domo variables.
Variables share the Functions API with beast modes; this is
search_beastmodes with the variable filter instead of notvariable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing instance and credentials. |
required |
filters
|
list[dict] | None
|
Optional extra filter dictionaries. |
None
|
name
|
str | None
|
Optional name to filter by. |
None
|
debug_loop
|
bool
|
Enable detailed loop iteration logging. |
False
|
return_raw
|
bool
|
Return raw API response without processing. |
False
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration. |
None
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData whose |
Source code in src/crew_dcs/routes/beastmode.py
274 275 276 277 278 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 | |
update_beastmode
async
¶
update_beastmode(
auth: DomoAuth,
beastmode_id: str,
name: str | None = None,
expression: str | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Update an existing BeastMode template.
Only fields that are not None are included in the update body.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing instance and credentials |
required |
beastmode_id
|
str
|
Unique identifier of the BeastMode to update |
required |
name
|
str | None
|
New display name (omitted if None) |
None
|
expression
|
str | None
|
New formula expression (omitted if None) |
None
|
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData containing the updated BeastMode data |
Raises:
| Type | Description |
|---|---|
BeastMode_CRUD_Error
|
If update fails |
Source code in src/crew_dcs/routes/beastmode.py
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 776 777 778 779 780 781 | |