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
299 300 301 302 303 304 305 306 307 308 309 | |
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
312 313 314 315 316 317 318 319 320 321 322 | |
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
328 329 330 331 332 333 334 335 | |
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
338 339 340 341 342 343 344 345 346 347 348 349 | |
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
355 356 357 358 359 | |
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
362 363 364 365 366 367 368 369 370 371 372 373 | |
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
376 377 378 379 380 381 382 | |
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
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | |
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
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
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
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
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
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 302 303 304 | |
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
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 361 362 363 364 365 366 | |
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
440 441 442 443 444 445 446 447 448 449 | |
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 | |