Creates a stage file.
POST {{baseUrl}}/session/files?suppress_response_codes=in adipisicing
You can only create one stage file at a time. Upon the first POST a unique fileId will be created by the server. File data can be posted either in base64 encoding as a JSON post or as a binary to the server. If you need to chunk this in pieces to the server, then subsequent requests must be made to the URI represented by the src property or the URI provided by the Location header returned from the first chunk. Additional chunks append to the file and you can always retry/re-post the last chunk. The chunks need to be posted without gaps in order to be successful. There are two ways to create a stage file: Create the stage file using a JSON post with base64 encoding. Post the file as binary using the appropriate Content-Type.
Body
PARAM
Key | Datatype | Required | Description |
suppress_response_codes
|
string | This can be left without an assignment or you can use itself, suppress_response_codes=suppress_response_codes |
HEADERS
Key | Datatype | Required | Description |
Content-Type
|
string |
RESPONSES
status Created
{
"returnStatus": {
"status": 200,
"code": "OK0000",
"message": "",
"server": "WS-S842b1bccd3fd4d2e86b33a844adaf5c1"
},
"id": "f_128b1931b51643979a2580f5820dec4ftif",
"contentType": "image/jpeg",
"src": "https://{host}/cp-rest/session/v2/files/f_128b1931b51643979a2580f5820dec4fjpg",
"updated": "2016-03-31T22:22:35.1995491Z"
} |
ENDPOINTS