Blobs

Manage file blobs.

Initiate file upload

post

Initiate a file upload. This endpoint can be used to create resumable uploads.

Authorizations
Query parameters
filenamestringOptional

The name of the file.

temporarybooleanOptional

When uploading temporary files, set the parameter to true.

Responses
202
Accepted
post
POST /api/blobs/uploads HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Upload a chunk of data for the specified upload.

post

Upload a stream of data to upload without completing the upload.

Authorizations
Path parameters
idstringRequired

The universally unique identifier (UUID).

Example: 52e51422-573d-4fc9-b5c6-4a30058f5d71
Header parameters
PortSIP-Upload-TokenstringRequired

The upload token of file upload.

Body
string · binaryOptional
Responses
203
Accepted
post
POST /api/blobs/uploads/{id}/append HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
PortSIP-Upload-Token: text
Content-Type: application/octet-stream
Accept: */*
Content-Length: 8

"binary"

No content

Complete file upload

post

Complete the upload specified by unique ID, providing all the data in the body, if necessary. A request without a body will just complete the upload with previously uploaded content.

Authorizations
Path parameters
idstringRequired

The universally unique identifier (UUID).

Example: 52e51422-573d-4fc9-b5c6-4a30058f5d71
Query parameters
digeststringOptional

The Content Digests. A digest is a serialized hash result, consisting of a algorithm and hex portion. Only sha256 based digest accepted.

Example: 84d89877f0d4041efb6bf91a16f0248f2fd573e6af05c19f96bedb9f882f7882
Header parameters
PortSIP-Upload-TokenstringRequired

The upload token of file upload.

Body
string · binaryOptional
Responses
201
Created
application/json
post
POST /api/blobs/uploads/{id}/complete HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
PortSIP-Upload-Token: text
Content-Type: application/octet-stream
Accept: */*
Content-Length: 8

"binary"
{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}

Get file upload status

get

Retrieve status of upload identified by the unique ID. The primary purpose of this endpoint is to resolve the current status of a resumable upload.

Authorizations
Path parameters
idstringRequired

The universally unique identifier (UUID).

Example: 52e51422-573d-4fc9-b5c6-4a30058f5d71
Responses
204
No Content
get
GET /api/blobs/uploads/{id}/status HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Delete file upload

post

Cancel outstanding upload processes, releasing associated resources. If this is not called, the unfinished uploads will eventually timeout.

Authorizations
Path parameters
idstringRequired

The universally unique identifier (UUID).

Example: 52e51422-573d-4fc9-b5c6-4a30058f5d71
Responses
204
No Content
post
POST /api/blobs/uploads/{id}/destroy HTTP/1.1
Host: hostname:8887
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Download file blobs

get

Download file from server by it's digest.

Path parameters
digeststringRequired

The Content Digests. A digest is a serialized hash result, consisting of a algorithm and hex portion. Only sha256 based digest accepted.

Example: 84d89877f0d4041efb6bf91a16f0248f2fd573e6af05c19f96bedb9f882f7882
Responses
200
OK
application/octet-stream
Responsestring · binary
get
GET /api/blobs/{digest} HTTP/1.1
Host: hostname:8887
Accept: */*
binary