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.
|
Methods |
|
אחזור הקובץ המצורף של ההודעה שצוינה. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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. |"]]