When looking for an API call that deals with the Google Drive folder permissions, the API call files/{id}/permissions can be used also for folders as follows:
1. Retrieve the id of the folder through the call GET/folders/content.
2. Copy/paste the id in the POST/files/{id}/permissions API call and use the below payload:
{
"role": "reader",
"type": "anyone"
}
The above payload adds the reader permission with anyone with the link.
We are in the process of normalizing the documents hub even further, but there are always a few unique API provider differences and the 'ID' used to make a GET by the root folder ID is one such difference.
Currently the following values can be used in these elements to make GET calls directly against the root folder by ID (for example, GET /folders/{id}/contents
or GET /folders/{id}/metadata
).
- Box:
0
. For exampleGET /folders/0/contents
. - Dropbox: Double URL-encoded path:
%252F
. For example,GET /folders/%252F/contents
. - Google Drive:
root
. For example,GET /folders/root/contents
. - OneDrive:
root
. For example,GET /folders/root/contents
. - ShareFile: Whatever value was input at instance provision as the Sharefile root folder, such as
top
. For example,GET /folders/top/contents
.
Native google files can be downloaded directly with the help of the web content URL provided for them. However, for non native files, the URL provided by Google does not work.
Therefore, only native google files can be stored in binary format. Given below is the link provided by Google to download them:
https://developers.google.com/resources/api-libraries/documentation/drive/v3/java/latest/
If you would like to upload a file to a folder that has been shared with you, this can be done using the POST /files endpoint, provided that you have edit permissions on the folder. You will need to provide the folderId
you would like to upload to, as well as the path. The path will be used relative to the folderId
and will be used as the name of the file upload. For example, a path of "/myNewFile" in the folder with id 1234 would result in a file named "myNewFile" in the folder with id 1234. In order to make use of the folderId you will also need to set calculateFolderPath to false.
If you enable the Document Hub Tagging (document.tagging
) configuration parameter with certain elements from the Documents hub, the paths and tags for any documents accessed will be stored in the Cloud Elements database in clear text. Affected elements include a mention of this in their respective descriptions of the parameter.
Documents elements affected include:
- Dropbox
- Dropbox Business
- Egnyte
- Google Drive
- Sharepoint
- Syncplicity
See our Data Protection & Privacy documentation for specifics about our data storage and security policies.