Is there a way to rename a Google Drive folder via the REST API?
The folders I want to do this with typically have subfolders and files inside them.
I've found documentation for renaming files, but nothing about folders.
Is there a way to rename a Google Drive folder via the REST API?
The folders I want to do this with typically have subfolders and files inside them.
I've found documentation for renaming files, but nothing about folders.
Folders are treated as files in the v3 API, therefore the endpoint you mentioned will work for folders, as well as for files.
If you want to do this via the REST API, you can do so by making a PATCH HTTP request to https://www.googleapis.com/drive/v3/files/[fileOrFolderId]
The request body should include:
{
"name": "newFolderName"
}