Skip to main content

API - Sandbox - Send content

The purpose of this method is to send original content (or files) to cost.

This method is equivalent to copying a file to the project's "SANDBOX" directory.

 

This method is identical to the one used for sending content for translation.

The only difference is the "locale" parameter which must be set here to "sandbox" (instead of the source language code).

Please refer to API - Send source content for more details.

 

Do not forget to send JSON instructions exactly as you do it when sending content for actual translation. See API - Send instructions.

Note that the sandbox does not support alignment instructions.

URL

(PUT) /api/files/file?token=&locale=sandbox&filename=

Please note that this is an HTTP PUT and not a GET action. The binary data of the file must be included in the message body.

Please note that multi-part attachments are not supported.

PARAMETERS

Parameters are:

token

The session token obtained when connecting.

locale

Must be set to "sandbox"

filename

The relative path of the file including sub-directories.

  • This can be a simple file name like “myfile.xml”.
  • Or, it can include directories such as “folder1\folder2\myfile.xml”.

Note the use of backslash separators as it is common on Windows systems.

The file will be saved to the project input directory with the specified sub-directories. Sub-directories are created if these do not yet exist.

Using sub-directories is useful if you want to organize files into folders.

MESSAGE BODY

Add the binary content of the file to the message body.

Do not use multi-part MIME contents as this is not supported by the Beebox.

 

The file will be saved to the project input directory and then picked up from there by the Beebox. Always make sure to verify the HTTP status to make sure that your operation succeeded.

Example: If you specify filename “folder1\myfile.xml”, the file will be saved to “c:\beebox\{project id}\sandbox\folder1\myfile.xml”.

RESULTS

The method returns no result. An HTTP status of 204 indicates success. Other HTTP status values indicate an error.

 

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.