Xeonr Developer Docs

Put Bucket Serving Config For S3

POST
/uplim.api.v1.InternalPortalService/PutBucketServingConfigForS3

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.

AuthorizationBearer <token>

JWT access token obtained via OAuth2 flow or service account

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

bucketRef?&
verifiedAccessKeyId?string

SigV4-verified access key making the request. The api recomputes the key's grants and requires ADMIN on this bucket — these are bucket administration operations, not content operations.

Length1 <= length
cors?

PutBucketCors

Response Body

application/json

application/json

curl -X POST "https://uploads-api.xeonr.io/uplim.api.v1.InternalPortalService/PutBucketServingConfigForS3" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "denied": {
    "reason": "REASON_UNSPECIFIED"
  },
  "validationError": "string"
}
{
  "code": "not_found",
  "message": "string",
  "details": [
    {
      "type": "string",
      "value": "string",
      "debug": {}
    }
  ]
}