Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
...
...
...
Use this endpoint to upload files to the network. Webpages are uploaded as a collection of files in an upload session, while all other files are uploaded individually without a session marker.
Calls to the /Sessions/
endpoints require unique Accept and Content-Type header values (outlined below). Failing to include these header values will prompt a code 406 response from the server. Unlike other BSN REST endpoints, the upload URL contains the "Upload" path before the API version.
Base URL for these endpoints: https://api.brightsignnetwork.com/Upload/2017/01/REST/Sessions
Upload Workflow
Webpages
These steps outline how to upload a webpage (i.e. an HTML file and associated asset files)
- The client makes a POST call to the
/
endpoint with the following Content-Type value:S
essions/application/vnd.bsn.start.webpage.upload.arguments.201701+json
. The POST request body includes information about the HTML file and associated asset files (including the path of each asset file relative to the HTML file).- The response body includes a token for the webpage-upload session, as well as an upload token for each file that is part of the webpage.
- The client begins uploading the webpage HTML file by calling PUT on the
/
endpoint with the following Content-Type value:S
essions/{S
essionToken}/Uploads/{U
ploadToken}/application/vnd.bsn.start.webpage.asset.upload.arguments.201701+json
. - The client uploads the file to the server by calling POST on the
/
endpoint. If the file is larger than approximately 256KB, the client will need to make multiple POST calls and use theS
essions/{S
essionToken}/U
ploads/{U
ploadToken}/chunks/?offset
URL parameter to segment the file into chunks. - Once the file chunk(s) have been uploaded, the client completes the HTML file upload by calling PUT on the
/
endpoint with the following Content-Type value:S
essions/{S
essionToken}/U
ploads/{U
ploadToken}/application/vnd.bsn.complete.webpage.asset.upload.arguments.201701+json
. - The client repeats steps 2 through 4 for each asset file associated with the HTML file.
- Once all files have been uploaded, the client completes the webpage-upload session by calling PUT on the
/
endpoint with the following Content-Type:S
essions/{S
essionToken}/application/vnd.bsn.complete.webpage.upload.arguments.201701+json
. The response body will include the newcontentId
values of the uploaded HTML and asset files.
Note | ||
---|---|---|
| ||
All files must be specified in the initial POST call to the |
Endpoints:
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
...