Xeonr Developer Docs
API SpecificationBuckets

Grant resource permission

POST
/uplim.api.v1.BucketsService/GrantResourcePermission

Grants a user access to a specific folder or upload within a bucket.

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

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

bucketRef?|

Reference to the bucket containing the resource

accountId?string

User to grant permission to

permissionLevel?string

Permission level to grant

Value in"BUCKET_PERMISSION_LEVEL_UNSPECIFIED" | "BUCKET_PERMISSION_LEVEL_READ" | "BUCKET_PERMISSION_LEVEL_READ_WRITE" | "BUCKET_PERMISSION_LEVEL_ADMIN"
folderRef*|

Grant access to a folder (and all descendants)

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://uploads-api.xeonr.io/uplim.api.v1.BucketsService/GrantResourcePermission" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{    "folderRef": {      "folderId": "string"    }  }'
{
  "permission": {
    "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
      }
    },
    "permissionLevel": "BUCKET_PERMISSION_LEVEL_UNSPECIFIED",
    "sharedBy": {
      "id": "string",
      "username": "string"
    },
    "sharedAt": "2023-01-15T01:30:15.01Z",
    "permissionId": "string",
    "folder": {
      "folderId": "string",
      "path": "string",
      "revokedSubpaths": [
        "string"
      ]
    }
  }
}
{
  "code": "not_found",
  "message": "string",
  "details": [
    {
      "type": "string",
      "value": "string",
      "debug": {}
    }
  ]
}