Operations (sample payloads)

Main operations
Copy

Create a Google document
Copy

Create a blank Google document in yours or your teams' drive.

Sample Input

1
{
2
"access_token": "ya29.a0AWY7CklhO1J3M2V5cXVpbmVzLWFyZS1hd2Vzb21l",
3
"google_mime_type": "application/vnd.google-apps.spreadsheet",
4
"name": "Q2 Sales Report",
5
"description": "Quarterly sales report for Q2 2023",
6
"parents": [
7
"1AbCdEfGhIjKlMnOpQrStUvWxYz"
8
]
9
}

Sample Output

1
{
2
"kind": "drive#file",
3
"id": "1BcDeFgHiJkLmNoPqRsTuVwXyZ",
4
"name": "Q2 Sales Report",
5
"mimeType": "application/vnd.google-apps.spreadsheet"
6
}

Create folder
Copy

Create a folder.

Sample Input

1
{
2
"name": "Project Documents",
3
"parents": [
4
"1ABC123DEF456GHI789"
5
]
6
}

Sample Output

1
{
2
"kind": "drive#file",
3
"id": "1XYZ987WVU654TSR321",
4
"name": "Project Documents",
5
"mimeType": "application/vnd.google-apps.folder"
6
}

Create permission
Copy

Create permission for a file

Sample Input

1
{
2
"access_token": "ya29.a0AfH6SMBgXhKbkzHqWvVr7MbPUo8j_1cN...",
3
"file_id": "1Aw3X5yZ9B2C1D4E5F6G7H8I9J0KlMnOp",
4
"role": "writer",
5
"grantee_type": "user",
6
"email_address": "collaborator@example.com",
7
"send_notification_email": true,
8
"email_message": "I've shared a document with you. Please review and provide feedback.",
9
"transfer_ownership": false,
10
"use_domain_admin_access": false,
11
"allow_file_discovery": false
12
}

Sample Output

1
{
2
"kind": "drive#permission",
3
"id": "05778688203104290963",
4
"type": "user",
5
"role": "writer",
6
"allowFileDiscovery": false
7
}

Delete file
Copy

Delete a file by specifying its ID.

Sample Input

1
{
2
"access_token": "ya29.a0AfH6SMBgYmLHJ7Q8K9Xn3tGwRxR1K-Zj5nZtCxWY3Ej_4KQZLlQYLLZ8jKhN7VhQqLX5O3Yk8fJ2m",
3
"file_id": "1Xj2K9lM3nOpQrStUvWxYzAbCdEfGhIjK"
4
}

Sample Output

1
{
2
"deleted": true
3
}

Delete permission
Copy

Delete permission from a file

Sample Input

1
{
2
"access_token": "ya29.a0AfH6SMBgXd1u9KcH3fJ5rHzjzxIG_vJ8PxZv3ZJrZQQqWxS1zXHq9XE2j-5WPXwN8kJKmZH7Vj8",
3
"file_id": "1Aw3X5yZ7bC9dEfGhIjKlMnOpQrStUvWx",
4
"permission_id": "05123456789012345678"
5
}

Sample Output

1
{
2
"deleted": true
3
}

Download file
Copy

Download a file by ID.

Sample Input

1
{
2
"access_token": "ya29.a0AWY7CkmhU8j_Xn2jH3xM5K9Tn6Y-abcdefghijklmnop",
3
"file_id": "1Abc123XYZ_FileID_Example",
4
"keep_original_extension": true
5
}

Sample Output

1
{
2
"file": {
3
"name": "quarterly_report.pdf",
4
"url": "https://drive.google.com/uc?id=1Abc123XYZ_FileID_Example&export=download",
5
"mime_type": "application/pdf",
6
"expires": 1623456789
7
}
8
}

Download Google file
Copy

Export and download a Google file by ID. Use this if you want to export a Google Doc for use in other programs, like Microsoft Word or Excel.

Sample Input

1
{
2
"access_token": "ya29.a0AfH6SMBgYWqH7xK9mZjJQr_fL8aXz1qP3Kj5XvCzVj0Ij-k_3j8f9tK2r1QzO8qN",
3
"file_id": "1Abc123XyZ_9876defGHI5432JKLmnop",
4
"mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
5
}

Sample Output

1
{
2
"file": {
3
"name": "Project_Proposal.docx",
4
"url": "https://drive.google.com/uc?id=1Abc123XyZ_9876defGHI5432JKLmnop&export=download",
5
"mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
6
"expires": 1623456789
7
}
8
}

Duplicate file
Copy

Duplicate a file.

Sample Input

1
{
2
"access_token": "ya29.a0AfH6SMBgYmO3XzD1K_1Xn5jL8K9CwY-9JK2H...",
3
"file_id": "1Abc123XyZ_FileID_Example",
4
"name": "Duplicate_Report_Q2_2023.docx",
5
"parents": [
6
"1FolderID123"
7
],
8
"mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
9
"description": "Duplicate of Q2 2023 report for review",
10
"starred": true
11
}

Sample Output

1
{
2
"id": "1Def456UvW_DuplicateFileID_Example",
3
"name": "Duplicate_Report_Q2_2023.docx",
4
"kind": "drive#file",
5
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
6
"starred": true,
7
"trashed": false,
8
"explicitlyTrashed": false,
9
"parents": [
10
"1FolderID123"
11
],
12
"spaces": [
13
"drive"
14
],
15
"version": "1",
16
"webViewLink": "https://docs.google.com/document/d/1Def456UvW_DuplicateFileID_Example/edit?usp=drivesdk",
17
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.openxmlformats-officedocument.wordprocessingml.document",
18
"hasThumbnail": true,
19
"thumbnailVersion": "1",
20
"viewedByMe": true,
21
"viewedByMeTime": "2023-06-15T10:30:00.000Z",
22
"createdTime": "2023-06-15T10:30:00.000Z",
23
"modifiedTime": "2023-06-15T10:30:00.000Z",
24
"modifiedByMe": true,
25
"owners": [
26
{
27
"kind": "drive#user",
28
"displayName": "John Doe",
29
"me": true,
30
"permissionId": "05925286828481325939",
31
"emailAddress": "johndoe@example.com"
32
}
33
],
34
"lastModifyingUser": {
35
"kind": "drive#user",
36
"displayName": "John Doe",
37
"me": true,
38
"permissionId": "05925286828481325939",
39
"emailAddress": "johndoe@example.com"
40
},
41
"shared": false,
42
"ownedByMe": true,
43
"capabilities": {
44
"canAddChildren": false,
45
"canChangeViewersCanCopyContent": true,
46
"canComment": true,
47
"canCopy": true,
48
"canDelete": true,
49
"canDownload": true,
50
"canEdit": true,
51
"canListChildren": false,
52
"canMoveItemIntoTeamDrive": true,
53
"canReadRevisions": true,
54
"canRemoveChildren": false,
55
"canRename": true,
56
"canShare": true,
57
"canTrash": true,
58
"canUntrash": true
59
},
60
"viewersCanCopyContent": true,
61
"writersCanShare": true,
62
"quotaBytesUsed": "5242880",
63
"isAppAuthorized": false
64
}

Get file details
Copy

Get details about a file by specifying its ID.

Sample Input

1
{
2
"access_token": "ya29.a0AfH6SMBgVmOu3X8J_kYz9Hl-fOKQZLW3_Xj5ZY1Kx8F_7vGJLY_Uj-QNQ5ZX8g",
3
"file_id": "1Zt3nOzQwDuEF5678ghIJKLmnopqrsTUV"
4
}

Sample Output

1
{
2
"id": "1Zt3nOzQwDuEF5678ghIJKLmnopqrsTUV",
3
"name": "Project Proposal.docx",
4
"kind": "drive#file",
5
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
6
"starred": false,
7
"trashed": false,
8
"explicitlyTrashed": false,
9
"spaces": [
10
"drive"
11
],
12
"version": "2",
13
"webViewLink": "https://docs.google.com/document/d/1Zt3nOzQwDuEF5678ghIJKLmnopqrsTUV/edit?usp=drivesdk",
14
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.openxmlformats-officedocument.wordprocessingml.document",
15
"hasThumbnail": true,
16
"thumbnailVersion": "1",
17
"viewedByMe": true,
18
"createdTime": "2023-05-15T09:30:00.000Z",
19
"modifiedTime": "2023-05-16T14:45:00.000Z",
20
"modifiedByMe": true,
21
"owners": [
22
{
23
"kind": "drive#user",
24
"displayName": "John Doe",
25
"me": true,
26
"permissionId": "05925286828481325495",
27
"emailAddress": "johndoe@example.com"
28
}
29
],
30
"lastModifyingUser": {
31
"kind": "drive#user",
32
"displayName": "John Doe",
33
"me": true,
34
"permissionId": "05925286828481325495",
35
"emailAddress": "johndoe@example.com"
36
},
37
"shared": true,
38
"ownedByMe": true,
39
"capabilities": {
40
"canAddChildren": false,
41
"canChangeViewersCanCopyContent": true,
42
"canComment": true,
43
"canCopy": true,
44
"canDelete": true,
45
"canDownload": true,
46
"canEdit": true,
47
"canListChildren": false,
48
"canMoveItemIntoTeamDrive": true,
49
"canReadRevisions": true,
50
"canRemoveChildren": false,
51
"canRename": true,
52
"canShare": true,
53
"canTrash": true,
54
"canUntrash": true
55
},
56
"viewersCanCopyContent": true,
57
"writersCanShare": true,
58
"quotaBytesUsed": "5242880",
59
"isAppAuthorized": false
60
}

Get permission
Copy

Get permission.

Sample Input

1
{
2
"access_token": "ya29.a0AWY7CkmvU8Xj2Zt4Ym5Ux_Uy9Ej3Kl1Mn2Op3Qr4St5Uv6Vw7Xy8",
3
"file_id": "1AbCdEfGhIjKlMnOpQrStUvWxYz",
4
"permission_id": "12345678901234567890",
5
"use_domain_admin_access": false
6
}

Sample Output

1
{
2
"kind": "drive#permission",
3
"id": "12345678901234567890",
4
"type": "user",
5
"emailAddress": "user@example.com",
6
"role": "writer",
7
"displayName": "John Doe",
8
"deleted": false
9
}

Get start page token
Copy

Get the starting pageToken to use in list changes.

Sample Input

1
{
2
"access_token": "ya29.a0AWY7CkmhU8j_kJ2xM5JvHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
3
"drive_id": "0ABCde1F2GhIiJkLmNoPqRsTuV",
4
"supports_all_drives": true
5
}

Sample Output

1
{
2
"kind": "drive#startPageToken",
3
"startPageToken": "10234"
4
}

List changes
Copy

List the changes for a user or shared drive.

Sample Input

1
{
2
"access_token": "ya29.a0AfH6SMBgXhYZ1kJ2m3k_lK5tPz8J9x-9vLz...",
3
"page_token": "EAIaAA...",
4
"drive_id": "0AIxJ5Ue...",
5
"fields": [
6
"changes/type",
7
"changes/fileId",
8
"changes/file/name"
9
],
10
"include_corpus_removals": true,
11
"include_items_from_all_drives": true,
12
"include_permissions_for_view": "published",
13
"include_removed": true,
14
"restrict_to_my_drive": false,
15
"spaces": [
16
"drive",
17
"appDataFolder"
18
],
19
"supports_all_drives": true,
20
"page_size": 50
21
}

Sample Output

1
{
2
"kind": "drive#changeList",
3
"nextPageToken": "EAIaAA...",
4
"changes": [
5
{
6
"kind": "drive#change",
7
"type": "file",
8
"changeType": "modify",
9
"time": "2023-05-15T10:30:45.123Z",
10
"removed": false,
11
"fileId": "1Pc2xVd...",
12
"file": {
13
"kind": "drive#file",
14
"id": "1Pc2xVd...",
15
"name": "Project Proposal.docx",
16
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
17
}
18
},
19
{
20
"kind": "drive#change",
21
"type": "file",
22
"changeType": "delete",
23
"time": "2023-05-15T11:15:22.456Z",
24
"removed": true,
25
"fileId": "1ZxY3Wf..."
26
}
27
]
28
}

List drives
Copy

List drives.

Sample Input

1
{
2
"access_token": "ya29.a0AWY7CklhO1J3M2V5cXJ0ZHJpdmVfYWNjZXNzX3Rva2Vu",
3
"q": "Marketing",
4
"use_domain_admin_access": true,
5
"limit": 50,
6
"page_token": "nextPageToken123"
7
}

Sample Output

1
{
2
"kind": "drive#driveList",
3
"nextPageToken": "nextPageToken456",
4
"drives": [
5
{
6
"kind": "drive#drive",
7
"id": "0ABCDEFGhijklmnopqrstuvwxyz",
8
"name": "Marketing Team Drive"
9
},
10
{
11
"kind": "drive#drive",
12
"id": "0ABCDEFGhijklmnopqrstuvwxy1",
13
"name": "Marketing Assets"
14
},
15
{
16
"kind": "drive#drive",
17
"id": "0ABCDEFGhijklmnopqrstuvwxy2",
18
"name": "Marketing Campaigns 2023"
19
}
20
]
21
}

List files
Copy

Retrieve a list of files.

Sample Input

1
{
2
"access_token": "ya29.a0AWY7CkmvU8j2X...",
3
"source": "user",
4
"order_by": [
5
{
6
"key": "modifiedTime",
7
"direction": "descending"
8
}
9
],
10
"query": "mimeType = 'application/vnd.google-apps.document'",
11
"name": "Project",
12
"spaces": [
13
"drive"
14
],
15
"fields": "files(id,name,mimeType,modifiedTime)",
16
"include_items_from_all_drives": true,
17
"supports_all_drives": true,
18
"limit": 50
19
}

Sample Output

1
{
2
"kind": "drive#fileList",
3
"nextPageToken": "~!!~AI9...FMDc",
4
"incompleteSearch": false,
5
"files": [
6
{
7
"kind": "drive#file",
8
"id": "1Abc123XyZ...",
9
"name": "Project Proposal",
10
"mimeType": "application/vnd.google-apps.document",
11
"modifiedTime": "2023-06-15T14:32:18.000Z"
12
},
13
{
14
"kind": "drive#file",
15
"id": "1Def456UvW...",
16
"name": "Project Timeline",
17
"mimeType": "application/vnd.google-apps.document",
18
"modifiedTime": "2023-06-14T09:45:30.000Z"
19
},
20
{
21
"kind": "drive#file",
22
"id": "1Ghi789RsT...",
23
"name": "Project Budget",
24
"mimeType": "application/vnd.google-apps.document",
25
"modifiedTime": "2023-06-13T16:20:45.000Z"
26
}
27
]
28
}

List permissions
Copy

List permissions.

Sample Input

1
{
2
"access_token": "ya29.a0AfH6SMBgXhKUzNQFGXPLhKlLZxSXHUGJPJQlZZKhHnTABLXXXXXXXXXXXXXXXXXXXX",
3
"file_id": "1Abc123XYZ_FileID_Example",
4
"supports_team_drive": true,
5
"use_domain_admin_access": false,
6
"limit": 50,
7
"page_token": "nextPageTokenExample123"
8
}

Sample Output

1
{
2
"kind": "drive#permissionList",
3
"nextPageToken": "nextPageTokenExample456",
4
"permissions": [
5
{
6
"kind": "drive#permission",
7
"id": "12345678",
8
"type": "user",
9
"role": "writer",
10
"allowFileDiscovery": true
11
},
12
{
13
"kind": "drive#permission",
14
"id": "87654321",
15
"type": "group",
16
"role": "reader",
17
"allowFileDiscovery": false
18
}
19
]
20
}

List spreadsheets
Copy

A list of the currently authenticated user's spreadsheets

Sample Input

1
{
2
"access_token": "ya29.a0AfH6SMBgXhYZ1234567890abcdefghijklmnopqrstuvwxyz",
3
"source": "user",
4
"limit": 50,
5
"order_by": [
6
{
7
"key": "modifiedTime",
8
"direction": "descending"
9
}
10
],
11
"query": "mimeType='application/vnd.google-apps.spreadsheet'"
12
}

Sample Output

1
{
2
"kind": "drive#fileList",
3
"nextPageToken": "pageToken123456",
4
"files": [
5
{
6
"kind": "drive#file",
7
"id": "1AbCdEfGhIjKlMnOpQrStUvWxYz12345",
8
"name": "Q4 Financial Report",
9
"mimeType": "application/vnd.google-apps.spreadsheet",
10
"starred": false,
11
"trashed": false,
12
"explicitlyTrashed": false,
13
"parents": [
14
"0BwC9876543210ZYXWVUTSRQPOnM"
15
],
16
"spaces": [
17
"drive"
18
],
19
"version": "15",
20
"webViewLink": "https://docs.google.com/spreadsheets/d/1AbCdEfGhIjKlMnOpQrStUvWxYz12345/edit?usp=drivesdk",
21
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.spreadsheet",
22
"thumbnailLink": "https://docs.google.com/spreadsheets/d/1AbCdEfGhIjKlMnOpQrStUvWxYz12345/edit?usp=drivesdk&ouid=123456789012345678901&rtpof=true&sd=true",
23
"viewedByMe": true,
24
"viewedByMeTime": "2023-05-15T14:30:00.000Z",
25
"createdTime": "2023-05-01T09:00:00.000Z",
26
"modifiedTime": "2023-05-15T14:30:00.000Z",
27
"modifiedByMeTime": "2023-05-15T14:30:00.000Z",
28
"owners": [
29
{
30
"kind": "drive#user",
31
"displayName": "John Doe",
32
"photoLink": "https://lh3.googleusercontent.com/a-/AOh14Gj1234567890",
33
"me": true,
34
"permissionId": "05123456789012345678",
35
"emailAddress": "john.doe@example.com"
36
}
37
],
38
"lastModifyingUser": {
39
"kind": "drive#user",
40
"displayName": "John Doe",
41
"me": true
42
},
43
"shared": true,
44
"ownedByMe": true,
45
"capabilities": {
46
"canEdit": true,
47
"canComment": true,
48
"canShare": true,
49
"canCopy": true,
50
"canReadRevisions": true
51
},
52
"viewersCanCopyContent": true,
53
"writersCanShare": true,
54
"permissions": [
55
{
56
"kind": "drive#permission",
57
"id": "12345678901234567890",
58
"type": "user",
59
"emailAddress": "jane.smith@example.com",
60
"role": "writer",
61
"displayName": "Jane Smith",
62
"photoLink": "https://lh3.googleusercontent.com/a-/AOh14Gj0987654321",
63
"domain": "example.com",
64
"allowFileDiscovery": true
65
}
66
],
67
"quotaBytesUsed": "1048576",
68
"isAppAuthorized": false
69
}
70
]
71
}

Move file
Copy

Move a file or folder into another folder.

Sample Input

1
{
2
"access_token": "ya29.a0AfH6SMBgYmO3X-KqtJ_9OYZ8HFZ3nZJ2Kj5X...",
3
"file_id": "1Abc123XYZ_FileID",
4
"destination_folder_id": "0BxC789PQR_FolderID"
5
}

Sample Output

1
{
2
"id": "1Abc123XYZ_FileID",
3
"name": "Important Document.docx",
4
"parents": [
5
"0BxC789PQR_FolderID"
6
]
7
}

Update permission
Copy

Update permission for a file

Sample Input

1
{
2
"access_token": "ya29.a0AWY7CklhO1J3M2...",
3
"file_id": "1Abc123XYZ789_0defGHIjkl",
4
"permission_id": "05678901234567890123",
5
"role": "writer",
6
"remove_expiration": true,
7
"transfer_ownership": false,
8
"use_domain_admin_access": false,
9
"expiration_time": "2023-12-31T23:59:59Z"
10
}

Sample Output

1
{
2
"kind": "drive#permission",
3
"id": "05678901234567890123",
4
"type": "user",
5
"role": "writer",
6
"allowFileDiscovery": true
7
}

Upload file
Copy

Upload a file.

Sample Input

1
{
2
"access_token": "ya29.a0AfH6SMBgYhN3K8jVmN2rLHB-fX_pEj1W9qoUJx7vM-1hRqTNjp5EGqYhZV8JK5UZY",
3
"file": {
4
"name": "sample_document.docx",
5
"content": "base64_encoded_file_content_here"
6
},
7
"name": "Important Document",
8
"parents": [
9
"1Abc123XyZ_FolderID"
10
],
11
"description": "This is an important document for the project.",
12
"starred": true,
13
"custom_properties": {
14
"project": "Alpha",
15
"department": "Marketing",
16
"version": "1.0"
17
}
18
}

Sample Output

1
{
2
"id": "1ZXY987abc_FileID",
3
"name": "Important Document",
4
"kind": "drive#file",
5
"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
6
"starred": true,
7
"trashed": false,
8
"explicitlyTrashed": false,
9
"parents": [
10
"1Abc123XyZ_FolderID"
11
],
12
"spaces": [
13
"drive"
14
],
15
"version": "1",
16
"webViewLink": "https://docs.google.com/document/d/1ZXY987abc_FileID/view",
17
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.openxmlformats-officedocument.wordprocessingml.document",
18
"hasThumbnail": true,
19
"thumbnailVersion": "1",
20
"viewedByMe": true,
21
"viewedByMeTime": "2023-06-15T10:30:00.000Z",
22
"createdTime": "2023-06-15T10:30:00.000Z",
23
"modifiedTime": "2023-06-15T10:30:00.000Z",
24
"modifiedByMe": true,
25
"owners": [
26
{
27
"kind": "drive#user",
28
"displayName": "John Doe",
29
"me": true,
30
"permissionId": "05925286828481325939",
31
"emailAddress": "johndoe@example.com"
32
}
33
],
34
"lastModifyingUser": {
35
"kind": "drive#user",
36
"displayName": "John Doe",
37
"me": true,
38
"permissionId": "05925286828481325939",
39
"emailAddress": "johndoe@example.com"
40
},
41
"shared": false,
42
"ownedByMe": true,
43
"capabilities": {
44
"canAddChildren": false,
45
"canChangeViewersCanCopyContent": true,
46
"canComment": true,
47
"canCopy": true,
48
"canDelete": true,
49
"canDownload": true,
50
"canEdit": true,
51
"canListChildren": false,
52
"canMoveItemIntoTeamDrive": true,
53
"canReadRevisions": true,
54
"canRemoveChildren": false,
55
"canRename": true,
56
"canShare": true,
57
"canTrash": true,
58
"canUntrash": true
59
},
60
"viewersCanCopyContent": true,
61
"writersCanShare": true,
62
"quotaBytesUsed": "5242880",
63
"isAppAuthorized": false
64
}

DDL operations
Copy

List drives (DDL)
Copy

Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping

Sample Input

1
{
2
"access_token": "ya29.a0AfH6SMBgXhWnOtC1K_Qz3bJ5Ej-mN9vZLjfJ7cXhN8sKL3mZ1QY_3f8tG5OvY9Xn2Z6rJ8Hg"
3
}

Sample Output

1
{
2
"drives": [
3
{
4
"id": "0AJ1XyMbC7FZaUk9PVA",
5
"name": "My Drive",
6
"kind": "drive#drive",
7
"mimeType": "application/vnd.google-apps.folder",
8
"driveType": "user"
9
},
10
{
11
"id": "0AJ1XyMbC7FZaUk9PVB",
12
"name": "Shared with me",
13
"kind": "drive#drive",
14
"mimeType": "application/vnd.google-apps.folder",
15
"driveType": "shared"
16
},
17
{
18
"id": "0AJ1XyMbC7FZaUk9PVC",
19
"name": "Team Drive",
20
"kind": "drive#drive",
21
"mimeType": "application/vnd.google-apps.folder",
22
"driveType": "team"
23
}
24
]
25
}

List folders (DDL)
Copy

Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping

Sample Input

1
{
2
"access_token": "ya29.a0AWY7CklhO1234567890abcdefghijklmnopqrstuvwxyz"
3
}

Sample Output

1
{
2
"folders": [
3
{
4
"id": "1Abc123XyZ",
5
"name": "Work Projects",
6
"mimeType": "application/vnd.google-apps.folder"
7
},
8
{
9
"id": "2Def456UvW",
10
"name": "Personal Documents",
11
"mimeType": "application/vnd.google-apps.folder"
12
},
13
{
14
"id": "3Ghi789RsT",
15
"name": "Shared Files",
16
"mimeType": "application/vnd.google-apps.folder"
17
}
18
]
19
}