Move a bucket to a different owner
Transfers ownership of a bucket to a team or back to the caller. Requires admin on the bucket and the upl admin team role in each team involved. The bucket's slug, aliases and URLs are unchanged; individual permission grants are preserved, while access-key grants that would cross the new ownership boundary are revoked.
Authorization
OAuth2 upl:bucket:manageOAuth 2.0 authorization
In: header
Scope: upl:bucket:manage
Header Parameters
Define the version of the Connect protocol
1Define the timeout, in ms
Request Body
application/json
The bucket to transfer.
Where it should end up. Requires ADMIN on the bucket, and — when moving to or out of a team — the upl "admin" team role in that team.
Access-key grants that would cross the new ownership boundary (a personal key holding a now-team-owned bucket, or a team key holding a bucket that left the team) are revoked as part of the move. Set true to acknowledge that; without it the request fails and names the affected keys.
Response Body
application/json
application/json
curl -X POST "https://uploads-api.xeonr.io/uplim.api.v1.BucketsService/MoveBucket" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{}'{
"bucket": {
"bucketId": "string",
"bucketName": "string",
"url": "string",
"uploadCount": 0,
"usedSpaceBytes": 0,
"totalSpaceBytes": 0,
"aliases": [
"string"
],
"isPrimary": true,
"createdAt": "2023-01-15T01:30:15.01Z",
"updatedAt": "2023-01-15T01:30:15.01Z",
"type": "BUCKET_TYPE_UNSPECIFIED",
"destination": "BUCKET_DESTINATION_UNSPECIFIED",
"destinationConfig": {
"s3Bucket": {
"bucketName": "example.com",
"region": "string",
"roleArn": "string"
}
},
"primaryAlias": "string",
"portalConfig": {
"cdnMode": true
},
"integrationBucketTypeId": "64e6bf6c-205f-4993-b9eb-3e0601207a25",
"slug": "string",
"private": true,
"ownerTeam": "string",
"ownerTeamSlug": "string",
"cors": {
"rules": [
{
"id": "string",
"allowedOrigins": [
"string"
],
"allowedMethods": [
"string"
],
"allowedHeaders": [
"string"
],
"exposeHeaders": [
"string"
],
"maxAgeSeconds": 86400
}
]
},
"policyJson": "string"
}
}{
"code": "not_found",
"message": "string",
"details": [
{
"type": "string",
"value": "string",
"debug": {}
}
]
}