REST Resource: users.messages.attachments
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
المرجع: MessagePartBody
نص جزء واحد من رسالة MIME
تمثيل JSON |
{
"attachmentId": string,
"size": integer,
"data": string
} |
الحقول |
attachmentId |
string
يحتوي على معرّف مرفق خارجي، في حال توفّره، ويمكن استرجاعه في طلب messages.attachments.get منفصل. في حال عدم توفّر الحقل، يتم تضمين محتوى جزء الرسالة بالكامل في حقل البيانات.
|
size |
integer
عدد وحدات البايت لبيانات جزء الرسالة (بغض النظر عن الترميز)
|
data |
string (bytes format)
بيانات نص جزء رسالة MIME كسلسلة base64url مشفّرة قد تكون فارغة لأنواع حاويات MIME التي لا تحتوي على نص الرسالة أو عند إرسال بيانات النص كمرفق منفصل. يتوفّر معرّف مرفق إذا كانت بيانات النصّ مضمّنة في مرفق منفصل. سلسلة بترميز base64
|
الطُرق |
|
الحصول على مرفق الرسالة المحدّد |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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. |"]]