This Choreo updates the metadata or content of an existing file. The documentation for this Google Drive resource can be found here.
Note that the RequestBody JSON input can be used to specify multiple fields from the file resource. Below is an example of how to update the content and title of a file using the RequestBody input.
Here is an example of acceptable inputs:
ClientID: {YOUR CLIENT ID}
ClientSecret: {YOUR CLIENT SECRET}
RefreshToken: {YOUR REFRESH TOKEN}
ContentType: text/plain
FileContent: aGVsbG8gd29ybGQ=
FileID: 1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8
RequestBody: {"title": "myTest.txt"}
The following is a sample of the JSON information returned by this Choreo:
{
"kind": "drive#file",
"id": "1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8",
"etag": "\"vGmlhiWxP02tugPmRvLynwC_A0Y/MTM2NTc4NDAwMzQ5OA\"",
"selfLink": "https://www.googleapis.com/drive/v2/files/1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8",
"alternateLink": "https://docs.google.com/document/d/1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8/edit?usp=drive_web",
"embedLink": "https://docs.google.com/document/d/1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8/preview",
"iconLink": "https://ssl.gstatic.com/docs/doclist/images/icon_11_document_list.png",
"thumbnailLink": "https://docs.google.com/feeds/vt?gd=true&id=1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8&v=2&s=AMedNnoAAAAAUWhR45U-XNJuWTnonJzEOISHRhvCnKOU&sz=s220",
"title": "myTest.txt",
"mimeType": "application/vnd.google-apps.document",
"labels": {
"starred": false,
"hidden": false,
"trashed": false,
"restricted": false,
"viewed": true
},
"createdDate": "2013-04-12T14:41:37.647Z",
"modifiedDate": "2013-04-12T16:26:43.498Z",
"modifiedByMeDate": "2013-04-12T16:26:43.498Z",
"lastViewedByMeDate": "2013-04-12T16:26:41.919Z",
"parents": [
{
"kind": "drive#parentReference",
"id": "0ALyw6-lKEQSZUk9PVA",
"selfLink": "https://www.googleapis.com/drive/v2/files/1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8/parents/0ALyw6-lKEQSZUk9PVA",
"parentLink": "https://www.googleapis.com/drive/v2/files/0ALyw6-lKEQSZUk9PVA",
"isRoot": true
}
],
"exportLinks": {
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "https://docs.google.com/feeds/download/documents/export/Export?id=1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8&exportFormat=docx",
"application/vnd.oasis.opendocument.text": "https://docs.google.com/feeds/download/documents/export/Export?id=1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8&exportFormat=odt",
"text/html": "https://docs.google.com/feeds/download/documents/export/Export?id=1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8&exportFormat=html",
"application/rtf": "https://docs.google.com/feeds/download/documents/export/Export?id=1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8&exportFormat=rtf",
"text/plain": "https://docs.google.com/feeds/download/documents/export/Export?id=1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8&exportFormat=txt",
"application/pdf": "https://docs.google.com/feeds/download/documents/export/Export?id=1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8&exportFormat=pdf"
},
"userPermission": {
"kind": "drive#permission",
"etag": "\"vGmlhiWxP02tugPmRvLynwC_A0Y/dzyUG3qoIkW40zNYQKdbXDl_tE8\"",
"id": "me",
"selfLink": "https://www.googleapis.com/drive/v2/files/1GfsT5RnrM9A8LLKzz8pl1UTqRSuF9zlPqf_2kE2TAT8/permissions/me",
"role": "owner",
"type": "user"
},
"quotaBytesUsed": "0",
"ownerNames": [
"AJ TembooDev"
],
"owners": [
{
"kind": "drive#user",
"displayName": "AJ TembooDev",
"isAuthenticatedUser": true,
"permissionId": "04692518151122865289"
}
],
"lastModifyingUserName": "AJ TembooDev",
"lastModifyingUser": {
"kind": "drive#user",
"displayName": "AJ TembooDev",
"isAuthenticatedUser": true,
"permissionId": "04692518151122865289"
},
"editable": true,
"writersCanShare": true,
"shared": false,
"appDataContents": false
}