REST Resource: users.messages.attachments
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
संसाधन: MessagePartBody
एमआईई मैसेज के किसी एक हिस्से का मुख्य हिस्सा.
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 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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. |"]]