Endpoint Modules¶
Auto-generated from source — always in sync with the backend.
S3 Buckets¶
buckets
¶
S3 bucket CRUD endpoints.
Endpoints
GET /buckets — list all buckets POST /buckets — create a bucket HEAD /buckets/{bucket} — check if bucket exists DELETE /buckets/{bucket} — delete a bucket (force=true empties first) GET /buckets/{bucket}/versioning — get versioning status PUT /buckets/{bucket}/versioning — set versioning GET /buckets/{bucket}/acl — get bucket ACL PUT /buckets/{bucket}/acl — set bucket ACL GET /buckets/{bucket}/cors — get bucket CORS PUT /buckets/{bucket}/cors — set bucket CORS DELETE /buckets/{bucket}/cors — delete bucket CORS GET /buckets/{bucket}/uploads — list in-progress multipart uploads
list_buckets(s3=Depends(get_s3_service))
async
¶
List all S3 buckets accessible to the authenticated user.
Source code in backend/app/api/v1/endpoints/s3/buckets.py
54 55 56 57 58 59 60 | |
create_bucket(body, s3=Depends(get_s3_service))
async
¶
Create a new S3 bucket.
Source code in backend/app/api/v1/endpoints/s3/buckets.py
63 64 65 66 67 68 69 70 | |
head_bucket(bucket, s3=Depends(get_s3_service))
async
¶
Check whether a bucket exists. Returns 200 or 404.
Source code in backend/app/api/v1/endpoints/s3/buckets.py
73 74 75 76 77 | |
delete_bucket(bucket, force=Query(None), s3=Depends(get_s3_service), hcp=Depends(get_mapi_service), token='', storage_settings=Depends(get_storage_settings))
async
¶
Delete an S3 bucket.
If force=true, all objects (including versions and delete markers)
are removed before deleting the bucket itself. On HCP, when the S3
delete fails with BucketNotEmpty (typically due to immutable deletion
records), the endpoint reconfigures the namespace via MAPI to allow
pruning, then retries. On MinIO/generic, force-delete is just
empty + delete (no MAPI involved).
Source code in backend/app/api/v1/endpoints/s3/buckets.py
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 | |
get_bucket_versioning(bucket, s3=Depends(get_s3_service))
async
¶
Get the versioning configuration for a bucket.
Source code in backend/app/api/v1/endpoints/s3/buckets.py
341 342 343 344 345 346 347 348 349 350 351 | |
put_bucket_versioning(bucket, body, s3=Depends(get_s3_service))
async
¶
Enable or suspend versioning on a bucket.
Source code in backend/app/api/v1/endpoints/s3/buckets.py
354 355 356 357 358 359 360 361 362 363 364 | |
get_bucket_acl(bucket, s3=Depends(get_s3_service))
async
¶
Get the access control list (ACL) for a bucket.
Source code in backend/app/api/v1/endpoints/s3/buckets.py
370 371 372 373 374 375 376 377 | |
put_bucket_acl(bucket, body, s3=Depends(get_s3_service))
async
¶
Set the access control list (ACL) for a bucket.
Source code in backend/app/api/v1/endpoints/s3/buckets.py
380 381 382 383 384 385 386 387 388 389 390 391 | |
get_bucket_cors(bucket, s3=Depends(get_s3_service))
async
¶
Get the CORS configuration for a bucket.
Source code in backend/app/api/v1/endpoints/s3/buckets.py
397 398 399 400 401 | |
put_bucket_cors(bucket, body, s3=Depends(get_s3_service))
async
¶
Set the CORS configuration for a bucket.
Source code in backend/app/api/v1/endpoints/s3/buckets.py
404 405 406 407 408 409 410 411 412 413 414 415 | |
delete_bucket_cors(bucket, s3=Depends(get_s3_service))
async
¶
Delete the CORS configuration for a bucket.
Source code in backend/app/api/v1/endpoints/s3/buckets.py
418 419 420 421 422 423 424 | |
list_multipart_uploads(bucket, prefix=Query(None), max_uploads=Query(1000, ge=1, le=1000), s3=Depends(get_s3_service))
async
¶
List in-progress multipart uploads for a bucket.
Source code in backend/app/api/v1/endpoints/s3/buckets.py
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | |
S3 Objects¶
objects
¶
S3 object CRUD endpoints.
start_s3_stats(bucket, prefix=Query(None), delimiter=Query(None), s3=Depends(get_s3_service), cache=Depends(get_cache_service))
async
¶
Start counting objects at a prefix in the background.
Returns 202 with a task_id. Poll GET /s3_stats/{task_id} for results.
Source code in backend/app/api/v1/endpoints/s3/objects.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 | |
get_s3_stats(bucket, task_id, cache=Depends(get_cache_service))
async
¶
Poll a counting task. Returns current progress and status.
Source code in backend/app/api/v1/endpoints/s3/objects.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
delete_objects(bucket, body, s3=Depends(get_s3_service))
async
¶
Delete explicit keys and/or everything under a prefix (folder).
Source code in backend/app/api/v1/endpoints/s3/objects.py
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 | |
start_delete_task(bucket, body, s3=Depends(get_s3_service), cache=Depends(get_cache_service))
async
¶
Start a background delete of the given folders (prefixes) and/or
keys.
Returns 202 + task_id; poll GET /delete-task/{task_id} for progress.
One task covers a whole select-all (many folders), so the UI does not fire
a request per folder, and it survives large folders / HTTP timeouts.
Source code in backend/app/api/v1/endpoints/s3/objects.py
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | |
get_delete_task(bucket, task_id, cache=Depends(get_cache_service))
async
¶
Poll progress of a background folder-delete task.
Source code in backend/app/api/v1/endpoints/s3/objects.py
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | |
cancel_delete_task(bucket, task_id, cache=Depends(get_cache_service))
async
¶
Request cancellation of a running delete task.
Best-effort: the runner checks the flag before each page, so it stops within one page. Already-deleted objects stay deleted (delete is idempotent).
Source code in backend/app/api/v1/endpoints/s3/objects.py
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | |
start_zip_download(request, bucket, body, s3=Depends(get_s3_service), cache=Depends(get_cache_service))
async
¶
Start a background ZIP download task.
Accepts either explicit keys or a prefix to list all objects under. Returns 202 with task_id for polling.
Source code in backend/app/api/v1/endpoints/s3/objects.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 | |
get_zip_download(bucket, task_id, cache=Depends(get_cache_service))
async
¶
Poll ZIP task status or download the completed ZIP.
Source code in backend/app/api/v1/endpoints/s3/objects.py
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 630 | |
create_folder(bucket, body, s3=Depends(get_s3_service))
async
¶
Create a folder (zero-byte object with trailing slash).
Source code in backend/app/api/v1/endpoints/s3/objects.py
704 705 706 707 708 709 710 711 712 713 | |
S3 Credentials¶
credentials
¶
S3 presigned URL generation and credential derivation endpoints.
generate_presigned_url(body, s3=Depends(get_s3_service))
async
¶
Generate a presigned URL for temporary access to an object.
Use get_object to create a download link, or put_object for an upload link.
The URL is valid for the specified duration (default 1 hour, max 7 days).
Anyone with the URL can access the object — no credentials needed.
Source code in backend/app/api/v1/endpoints/s3/credentials.py
35 36 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 | |
get_s3_credentials(token, storage_settings=Depends(get_storage_settings), s3_settings=Depends(get_s3_settings))
async
¶
Return the S3 credentials for the authenticated user.
HCP: derives keys from username/password (base64 + md5). MinIO/generic: returns the configured S3 access key and secret key.
Source code in backend/app/api/v1/endpoints/s3/credentials.py
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 | |
Authentication¶
auth
¶
Authentication endpoint — OAuth2 password flow.
login(request, form_data=Depends(), tenant=Form(None))
async
¶
Authenticate with HCP credentials and receive a JWT bearer token.
Credentials are stored in the JWT and passed through to HCP on every API call. HCP validates them — login itself always succeeds.
Tenant can be provided in three ways (first match wins):
tenantform field — set it directly (used by the frontend).tenant/usernameformat — enteracc-ai/my_userin the username field. Works in the Swagger Authorize dialog (lock icon).- Omit — for system-level access (no tenant routing).
Source code in backend/app/api/v1/endpoints/auth.py
34 35 36 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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |