Binary Objects
Binary objects are used to import any type of binary data. This may be used in conjuction with the low level API upload function, or the data may be embedded directly.
Uploaded Objects
When referencing an uploaded binary object, the object is specified as a string by the server-provided "object_id"
. The object must have been uploaded prior to the API action in which it is being referenced.
Example
{
"file": "<object ID>"
}
Embedded Objects
Alternatively, the content of an object may be embedded directly in JSON API actions.
Text
A text
binary object contains UTF-8 encoded plain text.
Example
{
"file": {
"type": "text",
"content": "<plain text>"
}
}
Base64
A base64
binary object must be encoded with the standard RFC 4648 format.
Example
{
"file": {
"type": "base64",
"content": "<base64 encoded text>"
}
}
No Comments