Xeonr Developer Docs
UplApi

uplim.api.v1.InternalPortalService

postGet Bucket Serving Config

Returns what the worker needs to serve a bucket's bytes independent of any object: CORS rules (absent means unconfigured, so the worker derives the default from cdn_mode; present-but-empty means allow nothing), the bucket policy document, the privacy flag, portal config and slug. An unknown bucket returns `denied` with REASON_NOT_FOUND. **Access:** internal only — the portal worker, authenticated by the shared `X-Upl-Internal-Token` header matching `S3_CREDENTIALS_INTERNAL_TOKEN` (FailedPrecondition when unset, Unauthenticated on mismatch). No user authentication.

postList Objects For S3

Backs S3 ListObjectsV2 for a bucket: a flat recursive listing, or directory mode (`delimiter` "/") with common prefixes interleaved in lexicographic key order. `max_keys` of 0 or above 1000 falls back to 1000; `continuation_token` is the last key of the previous page. Requires a live, enabled `verified_access_key_id` that covers the bucket; otherwise, or for an unknown bucket, the response carries `denied`. Any delimiter other than "" or "/" is rejected with InvalidArgument. Virtual-file folder contents are omitted. **Access:** internal only — the portal worker, authenticated by the shared `X-Upl-Internal-Token` header matching `S3_CREDENTIALS_INTERNAL_TOKEN` (FailedPrecondition when unset, Unauthenticated on mismatch). No user authentication.

postPut Bucket Serving Config For S3

Backs the S3 Put/DeleteBucketCors and Put/DeleteBucketPolicy APIs. The `verified_access_key_id` must be live, enabled and hold an explicit ADMIN grant on the bucket; otherwise, or for an unknown bucket, the response carries `denied`. CORS rules and policy documents are validated (policies against upl's supported subset, at most 20 KiB and 20 statements, and the bucket must have a slug); failures are returned in `validation_error` rather than as a Connect error. Delete clears CORS back to the cdn_mode default or removes the policy. **Access:** internal only — the portal worker, authenticated by the shared `X-Upl-Internal-Token` header matching `S3_CREDENTIALS_INTERNAL_TOKEN` (FailedPrecondition when unset, Unauthenticated on mismatch). No user authentication.

postResolve Portal Request

Resolves one portal or S3 request to a serve/deny decision in a single call, returning the bucket's portal config, canonical URL and cache version alongside the result (upload, folder listing, alias-access-required or denied). Without `verified_access_key_id` the path resolves exactly as the public GetPublicUpload does (visibility, alias passwords, virtual files). With it, the api reloads the key, requires it to be live, enabled and covering the bucket, then serves the upload even when private; integration-hidden uploads and virtual-file folders stay not-found, and keyed folder paths currently return not-found. Unknown buckets, missing paths and access failures come back as the `denied` result, not as Connect errors. **Access:** internal only — the portal worker, authenticated by the shared `X-Upl-Internal-Token` header matching `S3_CREDENTIALS_INTERNAL_TOKEN` (FailedPrecondition when unset, Unauthenticated on mismatch). No user authentication.

postResolve Presigned Download

Backs downloads the api presigns on a bucket's own hostname with the platform signing key (UPL-146). The worker verifies the signature, then calls this with the bucket hostname and the storage key the URL names. The api looks the object up in the bucket's storage and returns the bucket id, the object size and a presigned storage URL for `method` that lives five minutes; the worker records the request and redirects the client there. An unknown bucket or a missing object returns `denied` with REASON_NOT_FOUND. No grant is checked: a valid platform signature means the api already authorised the read when it signed. **Access:** internal only — the portal worker, authenticated by the shared `X-Upl-Internal-Token` header matching `S3_CREDENTIALS_INTERNAL_TOKEN` (FailedPrecondition when unset, Unauthenticated on mismatch). No user authentication.