Shotstash
API referenceREST referenceUploads

Upload one part

Streams one part of a resumable upload started with the initiateUpload mutation. The body is the raw bytes; Content-MD5 is required and checked. Sending a part again replaces it.

Try the REST routes against the public demo at https://demostash.aldyernesto.my.id. Get a read-only token (valid for 60 minutes), then paste it as the Bearer token in the console of any route.

PUT
/api/v1/uploads/{sessionId}/parts/{partNumber}

Streams one part of a resumable upload started with the initiateUpload mutation. The body is the raw bytes; Content-MD5 is required and checked. Sending a part again replaces it.

Authorization

SessionToken
headerAuthorizationBearer <token>

Session token from POST /api/v1/auth/login or the login mutation, sent as Authorization: Bearer <token>.

Path Parameters

sessionId*string

Upload session id (UUID) from the initiateUpload mutation.

partNumber*string

Part number, from 1 to the session's partCount.

Header Parameters

Content-MD5*string

Base64 MD5 of the part body (RFC 1864); the server checks it.

Request Body

body*stringapplication/octet-stream

Raw bytes, streamed.

Response Body

Part stored

application/json
  1. response
partNumber*number

The part that was stored.

size*number

Bytes stored for this part.

confirmedParts*number

How many parts of the session are stored so far (a count, not a list).

partCount*number

Parts the session needs in total.

curl -X PUT "https://example.com/api/v1/uploads/string/parts/string" \  -H "Content-MD5: string" \  -H "Content-Type: application/octet-stream" \  -d 'string'
{  "partNumber": 0,  "size": 0,  "confirmedParts": 0,  "partCount": 0}