on develop help sign in
Updating gmail service definition
356810cBrendan Hay
gen/model/gmail/v1/gmail-api.json+74−9
@@ -1,11 +1,11 @@
1{
1{
2 "kind": "discovery#restDescription",
2 "kind": "discovery#restDescription",
3− "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/c9szhoCXYrKaLKrzYGmZhJZBHUc\"",
3+ "etag": "\"tbys6C40o18GZwyMen5GMkdK-3s/8k2U6SLZqLD09rqAHvstdGUpdIg\"",
4 "discoveryVersion": "v1",
4 "discoveryVersion": "v1",
5 "id": "gmail:v1",
5 "id": "gmail:v1",
6 "name": "gmail",
6 "name": "gmail",
7 "version": "v1",
7 "version": "v1",
8− "revision": "20160711",
8+ "revision": "20170110",
9 "title": "Gmail API",
9 "title": "Gmail API",
10 "description": "Access Gmail mailboxes including sending user email.",
10 "description": "Access Gmail mailboxes including sending user email.",
11 "ownerDomain": "google.com",
11 "ownerDomain": "google.com",
@@ -81,6 +81,9 @@
81 "https://www.googleapis.com/auth/gmail.labels": {
81 "https://www.googleapis.com/auth/gmail.labels": {
82 "description": "Manage mailbox labels"
82 "description": "Manage mailbox labels"
83 },
83 },
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+ },
84 "https://www.googleapis.com/auth/gmail.modify": {
87 "https://www.googleapis.com/auth/gmail.modify": {
85 "description": "View and modify but not delete your email"
88 "description": "View and modify but not delete your email"
86 },
89 },
@@ -146,6 +149,33 @@
146 }
149 }
147 }
150 }
148 },
151 },
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+ },
149 "Draft": {
179 "Draft": {
150 "id": "Draft",
180 "id": "Draft",
151 "type": "object",
181 "type": "object",
@@ -767,12 +797,12 @@
767 },
797 },
768 "data": {
798 "data": {
769 "type": "string",
799 "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.",
771 "format": "byte"
801 "format": "byte"
772 },
802 },
773 "size": {
803 "size": {
774 "type": "integer",
804 "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).",
776 "format": "int32"
806 "format": "int32"
777 }
807 }
778 }
808 }
@@ -901,7 +931,7 @@
901 "SendAs": {
931 "SendAs": {
902 "id": "SendAs",
932 "id": "SendAs",
903 "type": "object",
933 "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.",
905 "properties": {
935 "properties": {
906 "displayName": {
936 "displayName": {
907 "type": "string",
937 "type": "string",
@@ -933,7 +963,7 @@
933 },
963 },
934 "treatAsAlias": {
964 "treatAsAlias": {
935 "type": "boolean",
965 "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."
937 },
967 },
938 "verificationStatus": {
968 "verificationStatus": {
939 "type": "string",
969 "type": "string",
@@ -1021,7 +1051,7 @@
1021 "VacationSettings": {
1051 "VacationSettings": {
1022 "id": "VacationSettings",
1052 "id": "VacationSettings",
1023 "type": "object",
1053 "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.",
1025 "properties": {
1055 "properties": {
1026 "enableAutoReply": {
1056 "enableAutoReply": {
1027 "type": "boolean",
1057 "type": "boolean",
@@ -1133,6 +1163,7 @@
1133 "scopes": [
1163 "scopes": [
1134 "https://mail.google.com/",
1164 "https://mail.google.com/",
1135 "https://www.googleapis.com/auth/gmail.compose",
1165 "https://www.googleapis.com/auth/gmail.compose",
1166+ "https://www.googleapis.com/auth/gmail.metadata",
1136 "https://www.googleapis.com/auth/gmail.modify",
1167 "https://www.googleapis.com/auth/gmail.modify",
1137 "https://www.googleapis.com/auth/gmail.readonly"
1168 "https://www.googleapis.com/auth/gmail.readonly"
1138 ]
1169 ]
@@ -1156,6 +1187,7 @@
1156 ],
1187 ],
1157 "scopes": [
1188 "scopes": [
1158 "https://mail.google.com/",
1189 "https://mail.google.com/",
1190+ "https://www.googleapis.com/auth/gmail.metadata",
1159 "https://www.googleapis.com/auth/gmail.modify",
1191 "https://www.googleapis.com/auth/gmail.modify",
1160 "https://www.googleapis.com/auth/gmail.readonly"
1192 "https://www.googleapis.com/auth/gmail.readonly"
1161 ]
1193 ]
@@ -1185,6 +1217,7 @@
1185 },
1217 },
1186 "scopes": [
1218 "scopes": [
1187 "https://mail.google.com/",
1219 "https://mail.google.com/",
1220+ "https://www.googleapis.com/auth/gmail.metadata",
1188 "https://www.googleapis.com/auth/gmail.modify",
1221 "https://www.googleapis.com/auth/gmail.modify",
1189 "https://www.googleapis.com/auth/gmail.readonly"
1222 "https://www.googleapis.com/auth/gmail.readonly"
1190 ]
1223 ]
@@ -1519,6 +1552,7 @@
1519 },
1552 },
1520 "scopes": [
1553 "scopes": [
1521 "https://mail.google.com/",
1554 "https://mail.google.com/",
1555+ "https://www.googleapis.com/auth/gmail.metadata",
1522 "https://www.googleapis.com/auth/gmail.modify",
1556 "https://www.googleapis.com/auth/gmail.modify",
1523 "https://www.googleapis.com/auth/gmail.readonly"
1557 "https://www.googleapis.com/auth/gmail.readonly"
1524 ]
1558 ]
@@ -1616,6 +1650,7 @@
1616 "scopes": [
1650 "scopes": [
1617 "https://mail.google.com/",
1651 "https://mail.google.com/",
1618 "https://www.googleapis.com/auth/gmail.labels",
1652 "https://www.googleapis.com/auth/gmail.labels",
1653+ "https://www.googleapis.com/auth/gmail.metadata",
1619 "https://www.googleapis.com/auth/gmail.modify",
1654 "https://www.googleapis.com/auth/gmail.modify",
1620 "https://www.googleapis.com/auth/gmail.readonly"
1655 "https://www.googleapis.com/auth/gmail.readonly"
1621 ]
1656 ]
@@ -1643,6 +1678,7 @@
1643 "scopes": [
1678 "scopes": [
1644 "https://mail.google.com/",
1679 "https://mail.google.com/",
1645 "https://www.googleapis.com/auth/gmail.labels",
1680 "https://www.googleapis.com/auth/gmail.labels",
1681+ "https://www.googleapis.com/auth/gmail.metadata",
1646 "https://www.googleapis.com/auth/gmail.modify",
1682 "https://www.googleapis.com/auth/gmail.modify",
1647 "https://www.googleapis.com/auth/gmail.readonly"
1683 "https://www.googleapis.com/auth/gmail.readonly"
1648 ]
1684 ]
@@ -1747,6 +1783,31 @@
1747 "https://mail.google.com/"
1783 "https://mail.google.com/"
1748 ]
1784 ]
1749 },
1785 },
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+ },
1750 "delete": {
1811 "delete": {
1751 "id": "gmail.users.messages.delete",
1812 "id": "gmail.users.messages.delete",
1752 "path": "{userId}/messages/{id}",
1813 "path": "{userId}/messages/{id}",
@@ -1828,6 +1889,7 @@
1828 },
1889 },
1829 "scopes": [
1890 "scopes": [
1830 "https://mail.google.com/",
1891 "https://mail.google.com/",
1892+ "https://www.googleapis.com/auth/gmail.metadata",
1831 "https://www.googleapis.com/auth/gmail.modify",
1893 "https://www.googleapis.com/auth/gmail.modify",
1832 "https://www.googleapis.com/auth/gmail.readonly"
1894 "https://www.googleapis.com/auth/gmail.readonly"
1833 ]
1895 ]
@@ -2008,7 +2070,7 @@
2008 },
2070 },
2009 "q": {
2071 "q": {
2010 "type": "string",
2072 "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.",
2012 "location": "query"
2074 "location": "query"
2013 },
2075 },
2014 "userId": {
2076 "userId": {
@@ -2027,6 +2089,7 @@
2027 },
2089 },
2028 "scopes": [
2090 "scopes": [
2029 "https://mail.google.com/",
2091 "https://mail.google.com/",
2092+ "https://www.googleapis.com/auth/gmail.metadata",
2030 "https://www.googleapis.com/auth/gmail.modify",
2093 "https://www.googleapis.com/auth/gmail.modify",
2031 "https://www.googleapis.com/auth/gmail.readonly"
2094 "https://www.googleapis.com/auth/gmail.readonly"
2032 ]
2095 ]
@@ -2986,6 +3049,7 @@
2986 },
3049 },
2987 "scopes": [
3050 "scopes": [
2988 "https://mail.google.com/",
3051 "https://mail.google.com/",
3052+ "https://www.googleapis.com/auth/gmail.metadata",
2989 "https://www.googleapis.com/auth/gmail.modify",
3053 "https://www.googleapis.com/auth/gmail.modify",
2990 "https://www.googleapis.com/auth/gmail.readonly"
3054 "https://www.googleapis.com/auth/gmail.readonly"
2991 ]
3055 ]
@@ -3022,7 +3086,7 @@
3022 },
3086 },
3023 "q": {
3087 "q": {
3024 "type": "string",
3088 "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.",
3026 "location": "query"
3090 "location": "query"
3027 },
3091 },
3028 "userId": {
3092 "userId": {
@@ -3041,6 +3105,7 @@
3041 },
3105 },
3042 "scopes": [
3106 "scopes": [
3043 "https://mail.google.com/",
3107 "https://mail.google.com/",
3108+ "https://www.googleapis.com/auth/gmail.metadata",
3044 "https://www.googleapis.com/auth/gmail.modify",
3109 "https://www.googleapis.com/auth/gmail.modify",
3045 "https://www.googleapis.com/auth/gmail.readonly"
3110 "https://www.googleapis.com/auth/gmail.readonly"
3046 ]
3111 ]