REST Resource: users.messages.attachments
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Risorsa: MessagePartBody
Il corpo di una singola parte del messaggio MIME.
Rappresentazione JSON |
{
"attachmentId": string,
"size": integer,
"data": string
} |
Campi |
attachmentId |
string
Se presente, contiene l'ID di un allegato esterno che può essere recuperato in una richiesta messages.attachments.get separata. Se non è presente, l'intero contenuto del corpo della parte del messaggio è contenuto nel campo dati.
|
size |
integer
Numero di byte per i dati della parte del messaggio (a prescindere dalla codifica).
|
data |
string (bytes format)
I dati del corpo di una parte del messaggio MIME come stringa con codifica base64url. Può essere vuoto per i tipi di contenitori MIME che non hanno un corpo del messaggio o quando i dati del corpo vengono inviati come allegato separato. Un ID allegato è presente se i dati del corpo sono contenuti in un allegato separato. Una stringa con codifica Base64.
|
Metodi |
|
Recupera l'allegato del messaggio specificato. |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 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. |"]]