Use the compressedBinaryDataFileId property
Use the compressedBinaryDataFileId property
Use the compressedBinaryDataFileId
property when you want to push 256 MB or less of compressed or uncompressed, binary or non-binary item data.
Using this property to push item data, whether you’re pushing a single item or batches of items, involves several steps which are detailed in this article.
When pushing a single item
When pushing a single item, you must first create a file container.
You then upload the item binary data into the file container.
Finally, you perform an Add or update a single item
call using the compressedBinaryDataFileId
property to reference the file container in which the item data is stored.
Step 1: Create a file container
Perform a POST /files
HTTP request to create a file container.
Note the uploadUri
and fileId
from the call response.
Step 2: Upload the item binary data into the file container
Perform the following PUT uploadUri
request to upload your item data into the file container you created in step 1.
Request template
|
Request definition
|
Replace:
-
<MyUploadURI>
with theuploadUri
you got from step 1. -
<HTTPHeaders>
with therequiredHeaders
you got from step 1. -
<MyItemData>
with your uncompressed or Deflate, GZip, LZMA, or ZLib compressed item data. Your request body must be in binary format.
|
Don’t Base64 encode your item data. |
Sample request
The following example shows how to upload Deflate compressed item data.
|
Request definition
|
|
Request body
|
|
Successful response - 200 OK
|
Step 3: Use the fileId
as the CompressedBinaryDataFileId
value
Once the request you performed in step 2 has successfully returned, you can use the fileId
you got from step 1 as the compressedBinaryDataFileId
property value.
The following example shows how you can use the compressedBinaryDataFileId
property to specify item data when performing a single push operation (see Add or update a single item in a Push source).
|
When using the
The default value is |
Sample request
|
Request definition
|
|
Request body
|
|
Successful response - 202 Accepted
|
When pushing batches of items
Using the compressedBinaryDataFileId
property to upload a batch of items involves creating file containers for each item, and another for the batch of items.
You then upload the binary data of each item into its file container.
The next step is to upload the batch of items into the batch file container, using the compressedBinaryDataFileId
property to reference each item’s file container.

Finally, you can push the batch file container to your source.
Step 1: Create the file containers
For each item to be added or updated, use the POST /files
HTTP request to create a new Amazon S3 file container.
Note the uploadUri
and fileId
of each file container you create.
Similarly, create a file container for the batch of items you want to add or update.
Note its uploadUri
and fileId
as well.
Step 2: Upload the binary data of each item into its file container
For each item to be added or updated, use the PUT uploadUri
HTTP request to upload the item data into its file container.
Request template
|
Request definition
|
Replace:
-
<MyUploadURI>
with theuploadUri
you got from step 1. -
<HTTPHeaders>
with therequiredHeaders
you got from step 1. -
<MyItemData>
with your uncompressed or Deflate, GZip, LZMA, or ZLib compressed item data. Your request body must be in binary format.
|
Don’t Base64 encode your item data. |
Sample request
The following example shows how to upload Deflate compressed item data.
|
Request definition
|
|
Request body
|
|
Successful response - 200 OK
|
Step 3: Upload the batch of items using the compressedBinaryDataFileId
property
Upload your items into your batch file container using the PUT uploadUri
HTTP request.
In the addOrUpdate
child items, use the compressedBinaryDataFileId
property to reference the fileId
of the file container into which you uploaded the item’s binary data.
|
When using the
The default value is |
Sample request
The following example shows how to upload a batch of items to a file container, referring to an uploaded compressedBinaryDataFileId
in an item.
|
Request definition
|
|
Request body
|
|
Successful response - 200 OK
|
Step 4: Push the file container into your push source
Push the file container in which you just uploaded your batch of items into your source using the PUT /sources/{sourceId}/documents/batch
HTTP request.