appdb
appdb ¶
AppDb Route Functions
This module provides functions for managing Domo AppDb datastores, collections, and documents. The functionality is organized into logical submodules.
Submodules
exceptions: Exception classes for AppDb operations datastores: Datastore management functions collections: Collection management functions documents: Document management functions
Exception Classes
AppDb_GET_Error: Raised when AppDb retrieval operations fail SearchAppDbNotFoundError: Raised when AppDb search returns no results AppDb_CRUD_Error: Raised when AppDb create/update/delete operations fail
Datastore Functions
get_datastores: Retrieve all datastores get_datastore_by_id: Retrieve a specific datastore by ID get_collections_from_datastore: Get collections from a specific datastore create_datastore: Create a new datastore
Collection Functions
create_collection: Create a new collection in a datastore get_collections: Retrieve all collections get_collection_by_id: Retrieve a specific collection by ID modify_collection_permissions: Modify collection permissions
Document Functions
get_documents_from_collection: Get documents from a collection get_collection_document_by_id: Get a specific document by ID create_document: Create a new document in a collection update_document: Update an existing document
Enums
Collection_Permission_Enum: Permissions for collection access
AppDb_CRUD_Error ¶
AppDb_CRUD_Error(
operation: str,
appdb_id: str | None = None,
message: str | None = None,
res=None,
**kwargs
)
Bases: RouteError
Raised when AppDb create, update, or delete operations fail.
Source code in src/crew_dcs/routes/appdb/exceptions.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
AppDb_GET_Error ¶
AppDb_GET_Error(
appdb_id: str | None = None,
message: str | None = None,
res=None,
**kwargs
)
Bases: RouteError
Raised when AppDb retrieval operations fail.
Source code in src/crew_dcs/routes/appdb/exceptions.py
26 27 28 29 30 31 32 33 34 35 36 37 38 | |
SearchAppDbNotFoundError ¶
SearchAppDbNotFoundError(
search_criteria: str,
message: str | None = None,
res=None,
**kwargs
)
Bases: RouteError
Raised when AppDb search operations return no results.
Source code in src/crew_dcs/routes/appdb/exceptions.py
44 45 46 47 48 49 50 51 52 53 54 55 | |
check_user_edit_permission
async
¶
check_user_edit_permission(
auth: DomoAuth,
collection_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Check edit permission for authenticated user on a collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing permission check result |
Raises:
| Type | Description |
|---|---|
AppDb_GET_Error
|
If check fails |
Source code in src/crew_dcs/routes/appdb/collections.py
445 446 447 448 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 491 492 493 494 495 496 497 | |
create_collection
async
¶
create_collection(
auth: DomoAuth,
datastore_id: str,
collection_name: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Create a new collection in a datastore.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
datastore_id
|
str
|
Datastore ID where collection will be created |
required |
collection_name
|
str
|
Name for the new collection |
required |
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
return_raw
|
bool
|
Return raw API response without processing |
False
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing created collection information |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If collection creation fails |
Source code in src/crew_dcs/routes/appdb/collections.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
create_collection_and_datastore
async
¶
create_collection_and_datastore(
auth: DomoAuth,
body: dict,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Create a collection and datastore in one request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
body
|
dict
|
Request payload accepted by /datastores/v1/collections |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing create result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If creation fails |
Source code in src/crew_dcs/routes/appdb/collections.py
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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
create_datastore
async
¶
create_datastore(
auth: DomoAuth,
datastore_name: str | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Create a new datastore.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
datastore_name
|
str | None
|
Name for the new datastore (shows as appName in UI) |
None
|
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 created datastore information |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If datastore creation fails |
Source code in src/crew_dcs/routes/appdb/datastores.py
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 | |
create_document
async
¶
create_document(
auth: DomoAuth,
collection_id: str,
content: dict[str, Any],
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Create a new document in a collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
content
|
dict[str, Any]
|
Document content to create |
required |
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 created document information |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If document creation fails |
Source code in src/crew_dcs/routes/appdb/documents.py
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 | |
create_documents_bulk
async
¶
create_documents_bulk(
auth: DomoAuth,
collection_id: str,
documents: list[dict[str, Any]],
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Create multiple documents in a collection in a single request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
documents
|
list[dict[str, Any]]
|
List of document content dicts to create |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing created documents information |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If bulk creation fails |
Source code in src/crew_dcs/routes/appdb/documents.py
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 | |
delete_collection
async
¶
delete_collection(
auth: DomoAuth,
collection_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Delete a collection by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing delete result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If collection deletion fails |
Source code in src/crew_dcs/routes/appdb/collections.py
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 210 211 212 213 214 215 216 217 218 219 | |
delete_datastore
async
¶
delete_datastore(
auth: DomoAuth,
datastore_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Delete a datastore by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
datastore_id
|
str
|
Unique identifier for the datastore |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing delete result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If datastore deletion fails |
Source code in src/crew_dcs/routes/appdb/datastores.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 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 | |
delete_document
async
¶
delete_document(
auth: DomoAuth,
collection_id: str,
document_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Delete a single document from a collection by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
document_id
|
str
|
Unique identifier for the document to delete |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing delete result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If document deletion fails |
SearchAppDbNotFoundError
|
If document with specified ID doesn't exist |
Source code in src/crew_dcs/routes/appdb/documents.py
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 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | |
delete_documents_bulk
async
¶
delete_documents_bulk(
auth: DomoAuth,
collection_id: str,
document_ids: list[str],
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Delete multiple documents from a collection by their IDs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
document_ids
|
list[str]
|
List of document UUIDs to delete |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing deletion result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If bulk deletion fails |
Source code in src/crew_dcs/routes/appdb/documents.py
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 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | |
download_documents
async
¶
download_documents(
auth: DomoAuth,
collection_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Download all documents from a collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing the downloaded documents |
Raises:
| Type | Description |
|---|---|
AppDb_GET_Error
|
If download fails |
Source code in src/crew_dcs/routes/appdb/documents.py
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 461 462 463 464 465 466 467 468 469 | |
get_collection_by_id
async
¶
get_collection_by_id(
auth: DomoAuth,
collection_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Retrieve a specific collection by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
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 collection information |
Raises:
| Type | Description |
|---|---|
AppDb_GET_Error
|
If collection retrieval fails |
SearchAppDbNotFoundError
|
If collection with specified ID doesn't exist |
Source code in src/crew_dcs/routes/appdb/collections.py
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 387 | |
get_collection_document_by_id
async
¶
get_collection_document_by_id(
auth: DomoAuth,
collection_id: str,
document_id: str,
query: dict[str, Any] | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Get a specific document by ID from a collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
document_id
|
str
|
Unique identifier for the document |
required |
query
|
dict[str, Any] | None
|
Optional query parameters |
None
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
return_raw
|
bool
|
Return raw API response without processing |
False
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing document information |
Raises:
| Type | Description |
|---|---|
AppDb_GET_Error
|
If document retrieval fails |
SearchAppDbNotFoundError
|
If document with specified ID doesn't exist |
Source code in src/crew_dcs/routes/appdb/documents.py
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 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 184 185 | |
get_collection_permissions
async
¶
get_collection_permissions(
auth: DomoAuth,
collection_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Retrieve permissions for a collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing permission details |
Raises:
| Type | Description |
|---|---|
AppDb_GET_Error
|
If retrieval fails |
Source code in src/crew_dcs/routes/appdb/collections.py
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 | |
get_collections
async
¶
get_collections(
auth: DomoAuth,
datastore_id: str | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Retrieve all collections, optionally filtered by datastore ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
datastore_id
|
str | None
|
Optional datastore ID to filter collections |
None
|
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 collections information |
Raises:
| Type | Description |
|---|---|
AppDb_GET_Error
|
If collections retrieval fails |
Source code in src/crew_dcs/routes/appdb/collections.py
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 277 278 | |
get_collections_from_datastore
async
¶
get_collections_from_datastore(
auth: DomoAuth,
datastore_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Get collections from a specific datastore.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
datastore_id
|
str
|
Unique identifier for the datastore |
required |
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 collections information |
Raises:
| Type | Description |
|---|---|
AppDb_GET_Error
|
If collections retrieval fails |
Source code in src/crew_dcs/routes/appdb/datastores.py
148 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 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
get_datastore_by_id
async
¶
get_datastore_by_id(
auth: DomoAuth,
datastore_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Retrieve a specific datastore by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
datastore_id
|
str
|
Unique identifier for the datastore |
required |
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 datastore information |
Raises:
| Type | Description |
|---|---|
AppDb_GET_Error
|
If datastore retrieval fails |
SearchAppDbNotFoundError
|
If datastore with specified ID doesn't exist |
Source code in src/crew_dcs/routes/appdb/datastores.py
91 92 93 94 95 96 97 98 99 100 101 102 103 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 | |
get_datastore_cards
async
¶
get_datastore_cards(
auth: DomoAuth,
datastore_ids: list[str],
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Get cards associated with one or more datastore IDs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
datastore_ids
|
list[str]
|
List of datastore UUIDs to look up cards for |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing datastore card mappings |
Raises:
| Type | Description |
|---|---|
AppDb_GET_Error
|
If datastore cards lookup fails |
Source code in src/crew_dcs/routes/appdb/datastores.py
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 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | |
get_datastores
async
¶
get_datastores(
auth: DomoAuth,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Retrieve all datastores.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
return_raw
|
bool
|
Return raw API response without processing |
False
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing datastores information |
Raises:
| Type | Description |
|---|---|
AppDb_GET_Error
|
If datastores retrieval fails |
Source code in src/crew_dcs/routes/appdb/datastores.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
get_documents_from_collection
async
¶
get_documents_from_collection(
auth: DomoAuth,
collection_id: str,
query: dict[str, Any] | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Get documents from a collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
query
|
dict[str, Any] | None
|
Optional query parameters for document filtering |
None
|
context
|
RouteContext | None
|
Optional RouteContext for request configuration |
None
|
return_raw
|
bool
|
Return raw API response without processing |
False
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing documents information |
Raises:
| Type | Description |
|---|---|
AppDb_GET_Error
|
If documents retrieval fails |
Source code in src/crew_dcs/routes/appdb/documents.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
import_documents
async
¶
import_documents(
auth: DomoAuth,
collection_id: str,
documents: list[dict[str, Any]],
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Import documents into a collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
documents
|
list[dict[str, Any]]
|
List of document dicts to import |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing import result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If import fails |
Source code in src/crew_dcs/routes/appdb/documents.py
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 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 | |
modify_collection_permissions
async
¶
modify_collection_permissions(
auth: DomoAuth,
collection_id: str,
user_id: str | None = None,
group_id: str | None = None,
permission: Collection_Permission_Enum = READ_CONTENT,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Modify collection permissions for users or groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
user_id
|
str | None
|
Optional user ID to grant permissions to |
None
|
group_id
|
str | None
|
Optional group ID to grant permissions to |
None
|
permission
|
Collection_Permission_Enum
|
Permission level to grant |
READ_CONTENT
|
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 permission modification result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If permission modification fails |
Source code in src/crew_dcs/routes/appdb/collections.py
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 530 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 | |
remove_collection_access
async
¶
remove_collection_access(
auth: DomoAuth,
collection_id: str,
entity_type: str,
entity_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Remove collection access for an entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
entity_type
|
str
|
Entity type (for example USER or GROUP) |
required |
entity_id
|
str
|
Entity identifier |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing delete result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If permission removal fails |
Source code in src/crew_dcs/routes/appdb/collections.py
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 | |
search_collections
async
¶
search_collections(
auth: DomoAuth,
body: dict,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Search collections via AppDB query endpoint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
body
|
dict
|
Search payload for /datastores/v1/collections/query |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing search results |
Raises:
| Type | Description |
|---|---|
AppDb_GET_Error
|
If search fails |
Source code in src/crew_dcs/routes/appdb/collections.py
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 | |
set_single_collection_permission
async
¶
set_single_collection_permission(
auth: DomoAuth,
collection_id: str,
source_type: str,
source_id: str,
permission: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Set a single permission tuple for a collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
source_type
|
str
|
Permission source type (for example USER or GROUP) |
required |
source_id
|
str
|
Source identifier |
required |
permission
|
str
|
Permission string |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing update result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If permission update fails |
Source code in src/crew_dcs/routes/appdb/collections.py
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 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 | |
update_collection
async
¶
update_collection(
auth: DomoAuth,
collection_id: str,
body: dict,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Update collection properties by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
body
|
dict
|
Collection update payload |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing update result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If collection update fails |
Source code in src/crew_dcs/routes/appdb/collections.py
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 | |
update_datastore
async
¶
update_datastore(
auth: DomoAuth,
datastore_id: str,
body: dict,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Update datastore properties by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
datastore_id
|
str
|
Unique identifier for the datastore |
required |
body
|
dict
|
Datastore update payload |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing update result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If datastore update fails |
Source code in src/crew_dcs/routes/appdb/datastores.py
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 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | |
update_document
async
¶
update_document(
auth: DomoAuth,
collection_id: str,
document_id: str,
content: dict[str, Any],
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Update an existing document in a collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
document_id
|
str
|
Unique identifier for the document to update |
required |
content
|
dict[str, Any]
|
Updated document content |
required |
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 updated document information |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If document update fails |
SearchAppDbNotFoundError
|
If document with specified ID doesn't exist |
Source code in src/crew_dcs/routes/appdb/documents.py
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 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 | |
update_documents_bulk
async
¶
update_documents_bulk(
auth: DomoAuth,
collection_id: str,
body: dict[str, Any],
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Operator bulk update documents matching criteria in a collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
body
|
dict[str, Any]
|
Update payload (filter criteria + update operations) |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing update result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If bulk update fails |
Source code in src/crew_dcs/routes/appdb/documents.py
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 | |
upsert_documents_bulk
async
¶
upsert_documents_bulk(
auth: DomoAuth,
collection_id: str,
documents: list[dict[str, Any]],
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Upsert multiple documents in a collection in a single request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
collection_id
|
str
|
Unique identifier for the collection |
required |
documents
|
list[dict[str, Any]]
|
List of document dicts to upsert (must include id for existing docs) |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing upserted documents information |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If bulk upsert fails |
Source code in src/crew_dcs/routes/appdb/documents.py
526 527 528 529 530 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 | |
validate_collection
async
¶
validate_collection(
auth: DomoAuth,
body: dict,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Validate a collection definition before creation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object containing credentials and instance info |
required |
body
|
dict
|
Collection definition to validate |
required |
return_raw
|
bool
|
Return raw API response without processing |
False
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing validation result |
Raises:
| Type | Description |
|---|---|
AppDb_CRUD_Error
|
If validation request fails |
Source code in src/crew_dcs/routes/appdb/collections.py
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 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 | |