Skip to Content
Xeonr Developer Docs
UplApiBuckets

Update team entitlement

POST
/uplim.api.v1.BucketsService/UpdateTeamEntitlement

Changes what update_mask names. new_bucket_defaults sets what a form for a new team bucket starts from (absent goes back to the deployment's). pool_mb sets the team's storage pool, the most all its buckets may hold together, as an override of its plan (0 removes the override; with no plan pool the team is unlimited). A team already over a pool it is given keeps reads and deletes; its new uploads are refused. bucket_cap_mb is deprecated: a team has no per-bucket cap, and naming it is InvalidArgument. Returns the entitlement after the change.

Access: pool_mb needs the upl:admin scope. new_bucket_defaults needs the team's upl admin role, checked with Xeonr Auth rather than the token, or upl:admin. A caller with no upl role in the team gets NotFound; one without what a named field needs gets PermissionDenied and nothing changes. Narrow tokens are refused as for GetTeamEntitlement.

Required scopes: upl:bucket:manage

Authorization

OAuth2 upl:bucket:manage
AuthorizationBearer <token>

OAuth 2.0 authorization

In: header

Scope: upl:bucket:manage

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

ownerScope*|

The team. Only a team has an entitlement; personal is InvalidArgument.

updateMask?string

Which fields to apply: "new_bucket_defaults", "pool_mb". A field outside the mask is left as it is; an empty mask is InvalidArgument, and so is "bucket_cap_mb" (UPL-160).

bucketCapMb?integerDeprecated

Deprecated (UPL-160): a team has no per-bucket cap. Naming it in update_mask is InvalidArgument.

Formatint32
Range0 <= value <= 1073741824
newBucketDefaults?

The team's new-bucket defaults. Absent goes back to the deployment's. Needs the team's upl admin role, or upl:admin.

poolMb?integer

The team's storage pool in MiB, as an override of its plan. 0 removes the override: back to the plan's pool, or none. Needs upl:admin.

Formatint32
Range0 <= value <= 1073741824
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://uploads-api.xeonr.io/uplim.api.v1.BucketsService/UpdateTeamEntitlement" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{    "ownerScope": "map[team:urn:xeonr:auth:team:0f6b5f8c-21f4-4b6e-9b4f-3a6a2c7d8e91]"  }'
{
  "entitlement": "map[canUpdateCap:false canUpdateDefaults:true newBucketDefaults:map[cdnMode:true private:true] newBucketDefaultsSource:TEAM_ENTITLEMENT_SOURCE_OVERRIDE poolBytes:107374182400 poolSource:TEAM_ENTITLEMENT_SOURCE_BINDING]",
  "bucketsRecapped": "0"
}