Uploads (Chunked)
Plan upload session
Changed onPlan an upload session by checking which parts already exist on the server. This endpoint allows clients to optimize uploads by skipping parts that have already been uploaded (cache hits) and only uploading missing parts.
The actual endpoint URL is returned by the Create upload session and Get upload session endpoints.
post/files/upload_sessions/{upload_session_id}/plan
Request
- Base URLhttps://upload.box.com/api/2.0
- URLhttps://upload.box.com/api/2.0/files/upload_sessions/{upload_session_id}/plan
- AuthOAuth 2Authorization code: https://account.box.com/api/oauth2/authorizeToken URL: https://api.box.com/oauth2/token
Path parameters
upload_session_idstring required
The ID of the upload session.
Request body
Example request
{
"parts": [
{
"offset": 0,
"size": 8388608,
"sha512": "ae78a0ca28abffe70ac9aba830556cd6eb3fcf1501dbd9b2d7a5f45992c00812cb07b51bbd0a9174e2295671c0e86f30354afa91d281d4fbee6a323a483d6383"
},
{
"offset": 8388608,
"size": 8388608,
"sha512": "588fde2156e1d8b23c9ca88ed3bed7bd1270e6ba0bb5b97b294ea1498952d7fd505e406097638514df92e9c5fecd0e73bd872499fcd7ea18eeb18567d0e09020"
}
]
}Response
Returns information about which parts already exist (hits) and which parts need to be uploaded (misses).
Example response
{
"upload_session_id": "F971964745A5CD0C001BBE4E58196BFD",
"hits": [
{
"offset": 0,
"size": 8388608,
"sha512": "ae78a0ca28abffe70ac9aba830556cd6eb3fcf1501dbd9b2d7a5f45992c00812cb07b51bbd0a9174e2295671c0e86f30354afa91d281d4fbee6a323a483d6383",
"part_id": "BFDF5379"
}
],
"misses": [
{
"offset": 8388608,
"size": 8388608,
"sha512": "588fde2156e1d8b23c9ca88ed3bed7bd1270e6ba0bb5b97b294ea1498952d7fd505e406097638514df92e9c5fecd0e73bd872499fcd7ea18eeb18567d0e09020"
}
]
}Changes
- info
endpoint added
- info