I am using https://developers.google.com/drive/v2/reference/parents/insert api to update the parent folder for a particular file.
Example -
Original Folder - A
Dest Folder - B
Root Folder - /
File - a1
After submitting a post request to the above endpoint, we see the following in the parents section of the file.
parents : [ A, B, / ]
Is it a known issue ? How can I avoid it apart from having to delete the 'root' folder manually ?
Edit: Information about the apis used.
Steps
- Use - drive/v2/files/%s/permissions for Adding Permission
- Use - drive/v2/files/%s/parents - for Inserting the parent. Set
"kind", "drive#parentReference" and "id", "destfolderId"
in the request
Type of account - The folder being inserted into belongs to a 'Super Admin'