Cloud APIs
...
Upload API version 2019/03
Upload API Endpoints (2019/03)
18 min
the upload endpoints allow users to send files to the bsn cloud server base url for this endpoint https //api bsn cloud/upload/2019/03/rest delete /sessions/{sessiontoken}/ cancels the specified content upload session segment sessiontoken string string the content upload session token generated by the server request example the example request parameters and headers are set as follows sessiontoken is set to wixmjm0nty3odkwiiwibmf delete /upload/2019/03/rest/sessions/wixmjm0nty3odkwiiwibmf/ http/1 1 host api bsn cloud connection keep alive authorization bearer {{useraccesstoken}} if unmodified since wed, 20 dec 2024 21 32 34 gmt accept application/vnd bsn error+json accept encoding gzip,deflate success response 204 204 the specified content upload session was successfully cancelled failure response 401 401 the access token is invalid or not specified 403 403 the supplied access token, though valid, doesn't provide access to this method 404 404 the content upload session with specified session token was not found 412 412 the current content upload session state has different timestamp than specified in request 5xx 5xx any 500 code is an internal server error post /sessions/{sessiontoken}/uploads/ creates a new content upload either in scope of the specified content upload session or standalone segment sessiontoken string string the content upload session token generated by the server or none if the new content upload is standalone request body the docid\ lb3fkxjouw9bjvuwzyldl request example the example request parameters and headers are set as follows sessiontoken is set to wixmjm0nty3odkwiiwibmf content upload example post /upload/2019/03/rest/sessions/wixmjm0nty3odkwiiwibmf/uploads/ http/1 1 host api bsn cloud connection keep alive authorization bearer {{useraccesstoken}} accept application/vnd bsn content upload status 201903+json, application/vnd bsn content upload negotiation status 201903+json, application/vnd bsn error+json accept encoding gzip,deflate this request supports multiple payload representations for the different use cases the application/vnd bsn start content upload arguments 201903+json representation is used to start the new docid\ fkvdcafrx380751m5hbnr upload as shown in the example below application/vnd bsn start content upload arguments 201903+json content type application/vnd bsn start content upload arguments 201903+json content length 277 { "sessiontoken" null, "uploadtoken" null, "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "auto", "filesize" 12, "filelastmodifieddate" "0001 01 01t00 00 00", "sha1hash" "", "filethumb" null, "tags" {} } the application/vnd bsn start content update arguments 201903+json representation is used to modify the previously uploaded docid\ fkvdcafrx380751m5hbnr as shown in the example below application/vnd bsn start content update arguments 201903+json content type application/vnd bsn start content update arguments 201903+json content length 300 { "sessiontoken" null, "uploadtoken" null, "contentid" 12345, "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "auto", "filesize" 12, "filelastmodifieddate" "0001 01 01t00 00 00", "sha1hash" "", "filethumb" null, "tags" {} } the application/vnd bsn start webpage asset upload arguments 201903+json representation is used to modify the previously uploaded docid\ v9gqtyryzsbhf9q3 3y9u as shown in the example below application/vnd bsn start webpage asset upload arguments 201903+json content type application/vnd bsn start webpage asset upload arguments 201903+json content length 371 { "sessiontoken" "271e6422 704f 4c6f b6dc 60c17a00f0fc", "uploadtoken" null, "webpageassetid" 0, "relativepath" "/assets/text/", "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "auto", "filesize" 12, "filelastmodifieddate" "0001 01 01t00 00 00", "sha1hash" "", "filethumb" null, "tags" {} } success response body 201 201 returns the uri and timestamp of the docid\ f5sqgrauaymnao bbjaje entity examples this response supports multiple payload representations for the different use cases the application/vnd bsn content upload status 201903+json representation of the docid\ f5sqgrauaymnao bbjaje which is used for uploads of content which doesn't have equivalents in the destination folder application/vnd bsn content upload status 201903+json { "sessiontoken" "", "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "contentid" 0, "filename" "hello world txt", "filesize" 12, "sha1hash" "", "state" "started", "starttime" "2025 08 26t23 47 37 937z", "endtime" null, "lastactivitytime" "2025 08 26t23 47 37 937z", "chunks" \[ { "count" 0, "length" 12, "state" "uploading" } ] } the application/vnd bsn content upload negotiation status 201903+json representation of the docid\ zwviwwbbla9uvhiusxiop which is used to indicate that there is equivalent content in the destination folder and provide details about it application/vnd bsn content upload negotiation status 201903+json { "sessiontoken" "", "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "contentid" 0, "filename" "hello world txt", "filesize" 12, "sha1hash" "", "state" "started", "starttime" "2025 08 26t23 47 37 937z", "endtime" null, "lastactivitytime" "2025 08 26t23 47 37 937z", "chunks" null, "matchingfiles" \[ { "id" 12345, "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "text", "filesize" 12, "sha1hash" "2ef7bde608ce5404e97d5f042f95f89f1c232871", "uploaddate" "2025 08 05t16 30 15 003z" } ] } failure response 300 300 the acceptable content upload representations are not specified 400 400 the specified content upload arguments are incomplete or not acceptable 401 401 the access token is invalid or not specified 404 404 the content upload session with specified session token was not found 406 406 the specified representaion of content upload entity is not acceptable 415 415 the specified representaion of content upload arguments is invalid or not supported 5xx 5xx any 500 code is an internal server error get /sessions/{sessiontoken}/uploads/{uploadtoken}/ retrieves the status of specified content upload segment sessiontoken string string the content upload session token generated by the server or none if the new content upload is standalone uploadtoken string string the upload token generated by the server request example the example request parameters and headers are set as follows sessiontoken is set to none uploadtoken is set to 321e6fc1 553f 4bb0 8c7a d5bf859be6b2 get /upload/2019/03/rest/sessions/none/uploads/321e6fc1 553f 4bb0 8c7a d5bf859be6b2/ http/1 1 host api bsn cloud connection keep alive authorization bearer {{useraccesstoken}} if modified since wed, 20 dec 2024 21 32 34 gmt accept application/vnd bsn content upload status 201903+json accept encoding gzip,deflate success response body 200 200 the docid\ f5sqgrauaymnao bbjaje was successfully retrieved example application/vnd bsn content upload status 201903+json { "sessiontoken" "", "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "contentid" 0, "filename" "hello world txt", "filesize" 12, "sha1hash" "", "state" "started", "starttime" "2025 08 26t23 47 37 937z", "endtime" null, "lastactivitytime" "2025 08 26t23 47 37 937z", "chunks" \[ { "count" 0, "length" 12, "state" "uploading" } ] } success response 304 304 the timestamp specified in the request is the same or newer than the timestamp in the current content upload state failure response 300 300 the acceptable content upload session representations are not specified 401 401 the access token is invalid or not specified 404 404 a content upload session with the specified session token was not found or the content upload with specified upload token was not found 406 406 the specified representation of the content upload session entity is not acceptable 5xx 5xx any 500 code is an internal server error put /sessions/{sessiontoken}/uploads/{uploadtoken}/ updates the status of the specified content upload segment sessiontoken string string the content upload session token generated by the server or none if the new content upload is standalone uploadtoken string string the content upload token generated by the server request body the docid\ lb3fkxjouw9bjvuwzyldl for a new content upload, or docid\ l9u4ogjgyrotjnudfx4nu for editing the existing (previously uploaded) content, or webpageassetuploadarguments (2019/03) for a new webpage asset upload request example the example request parameters and headers are set as follows sessiontoken is set to none uploadtoken is set to 321e6fc1 553f 4bb0 8c7a d5bf859be6b2 content upload, start, and complete example put /upload/2019/03/rest/sessions/none/uploads/321e6fc1 553f 4bb0 8c7a d5bf859be6b2/ http/1 1 host api bsn cloud connection keep alive authorization bearer {{useraccesstoken}} if unmodified since wed, 20 dec 2024 21 32 34 gmt accept application/vnd bsn content upload status 201903+json, application/vnd bsn content upload negotiation status 201903+json, application/vnd bsn error+json accept encoding gzip,deflate this request supports multiple payload representations for the different use cases the application/vnd bsn start content upload arguments 201903+json representation is used to begin a @content entity upload within an ongoing session as shown in the example below application/vnd bsn start content upload arguments 201903+json content type application/vnd bsn start content upload arguments 201903+json content length 345 { "sessiontoken" "271e6422 704f 4c6f b6dc 60c17a00f0fc", "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "auto", "filesize" 12, "filelastmodifieddate" "0001 01 01t00 00 00", "sha1hash" "", "filethumb" null, "tags" {} } the application/vnd bsn content upload arguments 201903+json representation is used to clarify an ongoing docid\ fkvdcafrx380751m5hbnr upload as shown in the example below application/vnd bsn content upload arguments 201903+json content type application/vnd bsn content upload arguments 201903+json content length 351 { "sessiontoken" null, "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "auto", "filesize" 12, "filelastmodifieddate" "0001 01 01t00 00 00", "sha1hash" "2ef7bde608ce5404e97d5f042f95f89f1c232871", "filethumb" null, "tags" {} } the application/vnd bsn complete content upload arguments 201903+json representation is used to complete previously started docid\ fkvdcafrx380751m5hbnr uploads as shown in the example below application/vnd bsn complete content upload arguments 201903+json content type application/vnd bsn complete content upload arguments 201903+json content length 351 { "sessiontoken" null, "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "auto", "filesize" 12, "filelastmodifieddate" "0001 01 01t00 00 00", "sha1hash" "2ef7bde608ce5404e97d5f042f95f89f1c232871", "filethumb" null, "tags" {} } the application/vnd bsn start content update arguments 201903+json representation is used to start a new upload which modifies the previously uploaded docid\ fkvdcafrx380751m5hbnr as shown in the example below application/vnd bsn start content update arguments 201903+json content type application/vnd bsn content update arguments 201903+json content length 368 { "sessiontoken" "271e6422 704f 4c6f b6dc 60c17a00f0fc", "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "contentid" 12345, "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "auto", "filesize" 12, "filelastmodifieddate" "0001 01 01t00 00 00", "sha1hash" "", "filethumb" null, "tags" {} } the application/vnd bsn content update arguments 201903+json representation is used to clarify an ongoing upload which modifies a previously uploaded docid\ fkvdcafrx380751m5hbnr as shown in the example below application/vnd bsn content update arguments 201903+json content type application/vnd bsn start content update arguments 201903+json content length 374 { "sessiontoken" null, "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "contentid" 12345, "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "auto", "filesize" 12, "filelastmodifieddate" "0001 01 01t00 00 00", "sha1hash" "2ef7bde608ce5404e97d5f042f95f89f1c232871", "filethumb" null, "tags" {} } the application/vnd bsn complete content upload arguments 201903+json representation is used to finish an upload which modifies the previously uploaded docid\ fkvdcafrx380751m5hbnr as shown in the example below application/vnd bsn complete content upload arguments 201903+json content type application/vnd bsn complete content upload arguments 201903+json content length 374 { "sessiontoken" null, "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "contentid" 12345, "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "auto", "filesize" 12, "filelastmodifieddate" "0001 01 01t00 00 00", "sha1hash" "2ef7bde608ce5404e97d5f042f95f89f1c232871", "filethumb" null, "tags" {} } the application/vnd bsn start webpage asset upload arguments 201903+json representation is used to show the status of a new docid\ v9gqtyryzsbhf9q3 3y9u upload as shown in the example below application/vnd bsn start webpage asset upload arguments 201903+json content type application/vnd bsn start webpage asset upload arguments 201903+json content length 371 { "sessiontoken" "271e6422 704f 4c6f b6dc 60c17a00f0fc", "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "webpageassetid" 0, "relativepath" "/assets/text/", "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "auto", "filesize" 12, "filelastmodifieddate" "0001 01 01t00 00 00", "sha1hash" "", "filethumb" null, "tags" {} } the application/vnd bsn webpage asset upload arguments 201903+json representation is used to clarify an ongoing docid\ v9gqtyryzsbhf9q3 3y9u upload as shown in the example below application/vnd bsn webpage asset upload arguments 201903+json content type application/vnd bsn webpage asset upload arguments 201903+json content length 445 { "sessiontoken" "271e6422 704f 4c6f b6dc 60c17a00f0fc", "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "webpageassetid" 0, "relativepath" "/assets/text/", "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "auto", "filesize" 12, "filelastmodifieddate" "0001 01 01t00 00 00", "sha1hash" "2ef7bde608ce5404e97d5f042f95f89f1c232871", "filethumb" null, "tags" {} } the application/vnd bsn complete webpage asset upload arguments 201903+json representation is used to complete previously started docid\ v9gqtyryzsbhf9q3 3y9u uploads as shown in the example below application/vnd bsn complete webpage asset upload arguments 201903+json content type application/vnd bsn complete webpage asset upload arguments 201903+json content length 445 { "sessiontoken" "271e6422 704f 4c6f b6dc 60c17a00f0fc", "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "webpageassetid" 0, "relativepath" "/assets/text/", "filename" "hello world txt", "virtualpath" "\\\shared\\\unsorted\\\\", "mediatype" "auto", "filesize" 12, "filelastmodifieddate" "0001 01 01t00 00 00", "sha1hash" "2ef7bde608ce5404e97d5f042f95f89f1c232871", "filethumb" null, "tags" {} } success response body 200 200 returns the docid\ f5sqgrauaymnao bbjaje example application/vnd bsn content upload status 201903+json { "sessiontoken" "", "uploadtoken" "321e6fc1 553f 4bb0 8c7a d5bf859be6b2", "contentid" 0, "filename" "hello world txt", "filesize" 12, "sha1hash" "2ef7bde608ce5404e97d5f042f95f89f1c232871", "state" "started", "starttime" "2025 08 26t23 47 37 937z", "endtime" null, "lastactivitytime" "2025 08 26t23 47 37 937z", "chunks" \[ { "count" 0, "length" 12, "state" "uploading" } ] } failure response 300 300 the acceptable content upload session representations are not specified 400 400 the specified content upload session arguments are incomplete or not acceptable 401 401 the access token is invalid or not specified 404 404 the content upload session with the specified session token was not found or the content upload with specified upload token was not found 406 406 the specified representaion of the content upload session entity is not acceptable 412 412 the current content upload session state has different timestamp than specified in the request 415 415 the specified representaion of the content upload session arguments is invalid or not supported 5xx 5xx any 500 code is an internal server error delete /sessions/{sessiontoken}/uploads/{uploadtoken}/ cancels the specified content upload segment sessiontoken string string the content upload session token generated by the server or none if the new content upload is standalone uploadtoken string string the content upload token generated by the server request example the example request parameters and headers are set as follows sessiontoken is set to none uploadtoken is set to 321e6fc1 553f 4bb0 8c7a d5bf859be6b2 delete /upload/2019/03/rest/sessions/none/uploads/321e6fc1 553f 4bb0 8c7a d5bf859be6b2/ http/1 1 host api bsn cloud connection keep alive authorization bearer {{useraccesstoken}} if unmodified since wed, 20 dec 2024 21 32 34 gmt accept application/vnd bsn error+json accept encoding gzip,deflate success response 204 204 the specified content upload was successfully cancelled failure response 401 401 the access token is invalid or not specified 404 404 the content upload session with specified session token was not found or the content upload with specified upload token was not found 412 412 the current content upload state has different timestamp than specified in request 5xx 5xx any 500 code is an internal server error get /sessions/{sessiontoken}/uploads/{uploadtoken}/chunks/ retrieves the status of content chunks in the specified active content upload segment sessiontoken string string the content upload session token generated by the server or none if the new content upload is standalone uploadtoken string string the content upload token generated by the server request examples the example request parameters and headers are set as follows sessiontoken is set to none uploadtoken is set to 321e6fc1 553f 4bb0 8c7a d5bf859be6b2 get /upload/2019/03/rest/sessions/none/uploads/321e6fc1 553f 4bb0 8c7a d5bf859be6b2/chunks/ http/1 1 host api bsn cloud connection keep alive authorization bearer {{useraccesstoken}} accept application/vnd bsn upload content chunk status list 201903+json accept encoding gzip,deflate success response body 200 200 an array of docid\ mxhdq 5ih5skyewwbtwtz entities was successfully retrieved example application/vnd bsn upload content chunk status list 201903+json \[ { "count" 0, "length" 12, "state" "uploading" } ] failure response 300 300 the acceptable content upload session representations are not specified 401 401 the access token is invalid or not specified 404 404 a content upload session with the specified session token was not found or the content upload with specified upload token was not found 406 406 the specified representation of the content chunk entity is not acceptable 5xx 5xx any 500 code is an internal server error post /sessions/{sessiontoken}/uploads/{uploadtoken}/chunks/ uploads a new content chunk in scope of the specified docid\ mxhdq 5ih5skyewwbtwtz query string parameters offset string string required required start position of the current file part segment sessiontoken string string the content upload session token generated by the server or none if the new content upload is standalone uploadtoken string string the content upload token generated by the server request body the docid\ mxhdq 5ih5skyewwbtwtz request examples the example request parameters and headers are set as follows offset is set to 0 sessiontoken is set to none uploadtoken is set to 321e6fc1 553f 4bb0 8c7a d5bf859be6b2 post /upload/2019/03/rest/sessions/none/uploads/321e6fc1 553f 4bb0 8c7a d5bf859be6b2/chunks/?offset=0 http/1 1 host api bsn cloud connection keep alive authorization bearer {{useraccesstoken}} accept application/vnd bsn error+json accept encoding gzip,deflate content type application/octet stream content length 12 this is the example request body application/octet stream hello world! success response 202 202 the specified content chunk has been successfully added to the queue failure response 4 4 00 00 the specified content chunk data is incomplete or not acceptable 401 401 the access token is invalid or not specified 404 404 a content upload session with the specified session token was not found or the content upload with specified upload token was not found 415 415 the specified content chunk format is invalid or not supported 5xx 5xx any 500 code is an internal server error