REST Resource: users.messages.attachments
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
リソース: MessagePartBody
JSON 表現 |
{
"attachmentId": string,
"size": integer,
"data": string
} |
フィールド |
attachmentId |
string
存在する場合は、別の messages.attachments.get リクエストで取得できる外部アタッチメントの ID が含まれます。指定されていない場合、メッセージ部分の本文のコンテンツ全体がデータフィールドに含まれます。
|
size |
integer
メッセージ部分データのバイト数(エンコードを除く)。
|
data |
string (bytes format)
MIME メッセージ パートの本文データ(base64url でエンコードされた文字列)。メッセージ本文がない MIME コンテナ タイプの場合、または本文データが個別の添付ファイルとして送信される場合は空になります。本文データが別のアタッチメントに含まれている場合、アタッチメント ID が存在します。 Base64 でエンコードされた文字列。
|
メソッド |
|
指定したメッセージの添付ファイルを取得します。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# REST Resource: users.messages.attachments\n\n- [Resource: MessagePartBody](#MessagePartBody)\n - [JSON representation](#MessagePartBody.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: MessagePartBody\n-------------------------\n\nThe body of a single MIME message part.\n\n| JSON representation |\n|---------------------------------------------------------------------|\n| ``` { \"attachmentId\": string, \"size\": integer, \"data\": string } ``` |\n\n| Fields ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `attachmentId` | `string` When present, contains the ID of an external attachment that can be retrieved in a separate `messages.attachments.get` request. When not present, the entire content of the message part body is contained in the data field. |\n| `size` | `integer` Number of bytes for the message part data (encoding notwithstanding). |\n| `data` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` 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. A base64-encoded string. |\n\n| Methods ------- ||\n|----------------------------------------------------------------------------------|----------------------------------------|\n| ### [get](/workspace/gmail/api/reference/rest/v1/users.messages.attachments/get) | Gets the specified message attachment. |"]]