Search for grant permissions


Searches for grant permissions given to a file ID.

Endpoint URL: {network.internalDNSName or network.proxyURL} received in DeviceInformation

Request Syntax

GET /v1/filePermsSearch/granting


Request Headers

ParameterDescriptionRequired
Accept-EncodingUse value gzip in Accept-Encoding header to compress the response data. This reduces network traffic and improves response time.

Value of type: string
false
AuthorizationAn access token with nas_read_only or nas_read_write scope as well as the File Permission with value ReadFilePerms or FileOwner for the file or a parent.

Value of type: string
true
If-MatchA previous response ETag or *. Returns the object only if its entity tag (ETag) is the same as the one specified.

Value of type: string
false
If-None-MatchA previous response ETag or *. Returns the object only if its entity tag (ETag) is different from the one specified.

Value of type: string
false


Request Query Parameters

ParameterDescriptionRequired
entityIDThe entity identifier to further filter granting permissions. Could be a Cloud user ID or a Cloud share's authId. Parameter is not required unless entityType is given.false
entityTypeRepresents the structure of top-level concepts, such as user or cloudShare to further filter granting permissions. Parameter not required unless entityID is given.false
fieldsThe fields to return.

Value of type: csv

Default: All fields
false
fileIDThe File ID to search for granting permissions.true
limitThe page size limit.

Value of type: integer

Default: 20
false
pageTokenThe pageToken obtained from the last response.

Value of type: string
false
prettyWhether to pretty print the response. It refers to the process of displaying source code or other items in a presentable and attractive way.

Value of type: boolean

Default: false
false


200 Response

OK

Response Headers

ParameterDescriptionRequired
Content-TypeIndicates the media type for the message body. Use application/jsonas content-type.false
EtagAn eTag (entity tag) is an HTTP response header used to determine the change in file metadata and content.false


Response Payload

ParameterDescriptionRequired
FilePermsThe file permission array.

Array of type: FilePermission
true
pageTokenThe pageToken for the next request.

Value of type: string
false


Example

Sample request to search for grant permissions given to a file ID.

Request

GET /sdk/v1/filePermsSearch/granting?fileID={file-id} HTTP/1.1Host: Endpoint-URLAuthorization: Bearer 8fc0180d-7ccc-4072-b923-93643201cf9e

Response

HTTP/1.1 200 OKContent-Type: application/jsonEtag: "S51XOVk--LJQ8qTL8Ojw9g"Vary: OriginDate: Fri, 09 Sep 2016 23:21:26 GMTContent-Length: 231{  "pageToken": "",  "filePerms": [    {      "id": "yJf5MNdBImciJ1rdFHkPxa1UQZoz_0HmbPH_xtaG",      "entity": {        "id": "ff80808156dd4b580157112c19c50e25",        "type": "user"      },      "fileId": "file-id",      "value": "WriteFile"    }  ]}