SAP Cloud Platform Open Connectors

Tips and FAQ

Google Drive: Folder Permissions

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. Here is the response payload: 

test.png

 

 

Google Drive - What ID Can Be Used To Get The Root Folder of Documents Hub Connectors?

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 connectors 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 example GET /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.

Google Drive - Only Native Google Files Can Be Stored In Binary Format

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/