@@ -1,11 +1,11 @@
11{
22 "kind": "discovery#restDescription",
3− "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/c9szhoCXYrKaLKrzYGmZhJZBHUc\"",
3+ "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/8k2U6SLZqLD09rqAHvstdGUpdIg\"",
44 "discoveryVersion": "v1",
55 "id": "gmail:v1",
66 "name": "gmail",
77 "version": "v1",
8− "revision": "20160711",
8+ "revision": "20170110",
99 "title": "Gmail API",
1010 "description": "Access Gmail mailboxes including sending user email.",
1111 "ownerDomain": "google.com",
@@ -81,6 +81,9 @@
8181 "https://www.googleapis.com/auth/gmail.labels": {
8282 "description": "Manage mailbox labels"
8383 },
84+ "https://www.googleapis.com/auth/gmail.metadata": {
85+ "description": "View your email message metadata such as labels and headers, but not the email body"
86+ },
8487 "https://www.googleapis.com/auth/gmail.modify": {
8588 "description": "View and modify but not delete your email"
8689 },
@@ -146,6 +149,33 @@
146149 }
147150 }
148151 },
152+ "BatchModifyMessagesRequest": {
153+ "id": "BatchModifyMessagesRequest",
154+ "type": "object",
155+ "properties": {
156+ "addLabelIds": {
157+ "type": "array",
158+ "description": "A list of label IDs to add to messages.",
159+ "items": {
160+ "type": "string"
161+ }
162+ },
163+ "ids": {
164+ "type": "array",
165+ "description": "The IDs of the messages to modify. There is a limit of 1000 ids per request.",
166+ "items": {
167+ "type": "string"
168+ }
169+ },
170+ "removeLabelIds": {
171+ "type": "array",
172+ "description": "A list of label IDs to remove from messages.",
173+ "items": {
174+ "type": "string"
175+ }
176+ }
177+ }
178+ },
149179 "Draft": {
150180 "id": "Draft",
151181 "type": "object",
@@ -767,12 +797,12 @@
767797 },
768798 "data": {
769799 "type": "string",
770− "description": "The body data of a MIME message part. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.",
800+ "description": "The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.",
771801 "format": "byte"
772802 },
773803 "size": {
774804 "type": "integer",
775− "description": "Total number of bytes in the body of the message part.",
805+ "description": "Number of bytes for the message part data (encoding notwithstanding).",
776806 "format": "int32"
777807 }
778808 }
@@ -901,7 +931,7 @@
901931 "SendAs": {
902932 "id": "SendAs",
903933 "type": "object",
904− "description": "Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom \"from\" address. Send-as aliases correspond to the \"Send Mail As\" feature in the web interface. See for more details.",
934+ "description": "Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom \"from\" address. Send-as aliases correspond to the \"Send Mail As\" feature in the web interface.",
905935 "properties": {
906936 "displayName": {
907937 "type": "string",
@@ -933,7 +963,7 @@
933963 },
934964 "treatAsAlias": {
935965 "type": "boolean",
936− "description": "Whether Gmail should treat this address as an alias for the user's primary email address. See for more details. This setting only applies to custom \"from\" aliases."
966+ "description": "Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom \"from\" aliases."
937967 },
938968 "verificationStatus": {
939969 "type": "string",
@@ -1021,7 +1051,7 @@
10211051 "VacationSettings": {
10221052 "id": "VacationSettings",
10231053 "type": "object",
1024− "description": "Vacation auto-reply settings for an account. These settings correspond to the \"Vacation responder\" feature in the web interface. See for more details.",
1054+ "description": "Vacation auto-reply settings for an account. These settings correspond to the \"Vacation responder\" feature in the web interface.",
10251055 "properties": {
10261056 "enableAutoReply": {
10271057 "type": "boolean",
@@ -1133,6 +1163,7 @@
11331163 "scopes": [
11341164 "https://mail.google.com/",
11351165 "https://www.googleapis.com/auth/gmail.compose",
1166+ "https://www.googleapis.com/auth/gmail.metadata",
11361167 "https://www.googleapis.com/auth/gmail.modify",
11371168 "https://www.googleapis.com/auth/gmail.readonly"
11381169 ]
@@ -1156,6 +1187,7 @@
11561187 ],
11571188 "scopes": [
11581189 "https://mail.google.com/",
1190+ "https://www.googleapis.com/auth/gmail.metadata",
11591191 "https://www.googleapis.com/auth/gmail.modify",
11601192 "https://www.googleapis.com/auth/gmail.readonly"
11611193 ]
@@ -1185,6 +1217,7 @@
11851217 },
11861218 "scopes": [
11871219 "https://mail.google.com/",
1220+ "https://www.googleapis.com/auth/gmail.metadata",
11881221 "https://www.googleapis.com/auth/gmail.modify",
11891222 "https://www.googleapis.com/auth/gmail.readonly"
11901223 ]
@@ -1519,6 +1552,7 @@
15191552 },
15201553 "scopes": [
15211554 "https://mail.google.com/",
1555+ "https://www.googleapis.com/auth/gmail.metadata",
15221556 "https://www.googleapis.com/auth/gmail.modify",
15231557 "https://www.googleapis.com/auth/gmail.readonly"
15241558 ]
@@ -1616,6 +1650,7 @@
16161650 "scopes": [
16171651 "https://mail.google.com/",
16181652 "https://www.googleapis.com/auth/gmail.labels",
1653+ "https://www.googleapis.com/auth/gmail.metadata",
16191654 "https://www.googleapis.com/auth/gmail.modify",
16201655 "https://www.googleapis.com/auth/gmail.readonly"
16211656 ]
@@ -1643,6 +1678,7 @@
16431678 "scopes": [
16441679 "https://mail.google.com/",
16451680 "https://www.googleapis.com/auth/gmail.labels",
1681+ "https://www.googleapis.com/auth/gmail.metadata",
16461682 "https://www.googleapis.com/auth/gmail.modify",
16471683 "https://www.googleapis.com/auth/gmail.readonly"
16481684 ]
@@ -1747,6 +1783,31 @@
17471783 "https://mail.google.com/"
17481784 ]
17491785 },
1786+ "batchModify": {
1787+ "id": "gmail.users.messages.batchModify",
1788+ "path": "{userId}/messages/batchModify",
1789+ "httpMethod": "POST",
1790+ "description": "Modifies the labels on the specified messages.",
1791+ "parameters": {
1792+ "userId": {
1793+ "type": "string",
1794+ "description": "The user's email address. The special value me can be used to indicate the authenticated user.",
1795+ "default": "me",
1796+ "required": true,
1797+ "location": "path"
1798+ }
1799+ },
1800+ "parameterOrder": [
1801+ "userId"
1802+ ],
1803+ "request": {
1804+ "$ref": "BatchModifyMessagesRequest"
1805+ },
1806+ "scopes": [
1807+ "https://mail.google.com/",
1808+ "https://www.googleapis.com/auth/gmail.modify"
1809+ ]
1810+ },
17501811 "delete": {
17511812 "id": "gmail.users.messages.delete",
17521813 "path": "{userId}/messages/{id}",
@@ -1828,6 +1889,7 @@
18281889 },
18291890 "scopes": [
18301891 "https://mail.google.com/",
1892+ "https://www.googleapis.com/auth/gmail.metadata",
18311893 "https://www.googleapis.com/auth/gmail.modify",
18321894 "https://www.googleapis.com/auth/gmail.readonly"
18331895 ]
@@ -2008,7 +2070,7 @@
20082070 },
20092071 "q": {
20102072 "type": "string",
2011− "description": "Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, \"from:someuser@example.com rfc822msgid: is:unread\".",
2073+ "description": "Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, \"from:someuser@example.com rfc822msgid: is:unread\". Parameter cannot be used when accessing the api using the gmail.metadata scope.",
20122074 "location": "query"
20132075 },
20142076 "userId": {
@@ -2027,6 +2089,7 @@
20272089 },
20282090 "scopes": [
20292091 "https://mail.google.com/",
2092+ "https://www.googleapis.com/auth/gmail.metadata",
20302093 "https://www.googleapis.com/auth/gmail.modify",
20312094 "https://www.googleapis.com/auth/gmail.readonly"
20322095 ]
@@ -2986,6 +3049,7 @@
29863049 },
29873050 "scopes": [
29883051 "https://mail.google.com/",
3052+ "https://www.googleapis.com/auth/gmail.metadata",
29893053 "https://www.googleapis.com/auth/gmail.modify",
29903054 "https://www.googleapis.com/auth/gmail.readonly"
29913055 ]
@@ -3022,7 +3086,7 @@
30223086 },
30233087 "q": {
30243088 "type": "string",
3025− "description": "Only return threads matching the specified query. Supports the same query format as the Gmail search box. For example, \"from:someuser@example.com rfc822msgid: is:unread\".",
3089+ "description": "Only return threads matching the specified query. Supports the same query format as the Gmail search box. For example, \"from:someuser@example.com rfc822msgid: is:unread\". Parameter cannot be used when accessing the api using the gmail.metadata scope.",
30263090 "location": "query"
30273091 },
30283092 "userId": {
@@ -3041,6 +3105,7 @@
30413105 },
30423106 "scopes": [
30433107 "https://mail.google.com/",
3108+ "https://www.googleapis.com/auth/gmail.metadata",
30443109 "https://www.googleapis.com/auth/gmail.modify",
30453110 "https://www.googleapis.com/auth/gmail.readonly"
30463111 ]