Skip to main content
To upload a file to the server, use a PUT or POST request.

Create a PUT request

To upload a file using a PUT request, pass the following URI:
The URI accepts these parameters:
You cannot pass registration parameters in a PUT request. For more information, see Specify the structure of a batch.
Specify the value of the Content-type header field explicitly, and put the file to upload in the body of the PUT request. The server also supports hash coding. Encode the MD5 hash value of the file in Base64 using UTF-16LE, and then pass it in the standard Content-MD5 header. The server computes its own hash value for the file and compares it against the header. If the two values do not match, the server deletes the file. Two server responses are possible:
  • HTTP 201 (Created) – The file was uploaded to the server successfully.
  • HTTP 400 (Bad request) – A required parameter is missing, or the hash function value does not match the value specified in the header. No file was uploaded.

Create a POST request

Use a PUT request when you can. If PUT is not an option, upload the file with a POST request instead. Pass the projectName and batchType parameters in the URL, as in a PUT request, or as text fields in the request body.

Pass multiple images in one request

You can pass multiple images in one POST request. Set the value of the Content-type field to multipart/form-data and specify the separator value in the boundary parameter. The names of the files included in a request must not be the same. The following example passes two files in a single request:

Pass a text field

You can also pass a text field in a POST request:
End the request with this boundary string: