description:When receiving a DELETE request for an existing upload the Server
SHOULD free associated resources and MUST respond with the 204 No Content
status confirming that the upload was terminated. For all future requests
to this URL, the Server SHOULD respond with the 404 Not Found or 410 Gone
status.
operationId:FilesDelete
parameters:
- name:id
in:path
required:true
schema:
type:string
- name:Tus-Resumable
in:header
required:true
schema:
$ref:"#/components/schemas/Tus-Resumable"
responses:
204:
description:Upload was terminated
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
412:
description:Precondition Failed
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
Tus-Version:
schema:
$ref:"#/components/schemas/Tus-Version"
head:
summary:Used to determine the offset at which the upload should be continued.
description:Used to determine the offset at which the upload should be continued.
operationId:FilesHead
parameters:
- name:id
in:path
required:true
schema:
type:string
- name:Tus-Resumable
in:header
required:true
schema:
$ref:"#/components/schemas/Tus-Resumable"
responses:
200:
description:Returns offset
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
Cache-Control:
schema:
type:string
enum:
- no-store
Upload-Offset:
schema:
$ref:"#/components/schemas/Upload-Offset"
Upload-Length:
schema:
$ref:"#/components/schemas/Upload-Length"
403:
description:If the resource is not found, the Server SHOULD return either
the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset
header.
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
404:
description:If the resource is not found, the Server SHOULD return either
the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset
header.
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
410:
description:If the resource is not found, the Server SHOULD return either
the 404 Not Found, 410 Gone or 403 Forbidden status without the Upload-Offset
header.
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
412:
description:Precondition Failed
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
Tus-Version:
schema:
$ref:"#/components/schemas/Tus-Version"
patch:
summary:Used to resume the upload
description:'The Server SHOULD accept PATCH requests against any upload URL
and apply the bytes contained in the message at the given offset specified
by the Upload-Offset header. All PATCH requests MUST use Content-Type:application/offset+octet-stream,
otherwise the server SHOULD return a 415 Unsupported Media Type status.'
operationId:FilePatch
parameters:
- name:id
in:path
required:true
schema:
type:string
- name:Tus-Resumable
in:header
required:true
schema:
$ref:"#/components/schemas/Tus-Resumable"
- name:Content-Length
in:header
description:Length of the body of this request
required:true
schema:
type:integer
- name:Upload-Offset
in:header
required:true
schema:
$ref:"#/components/schemas/Upload-Offset"
- name:Upload-Checksum
in:header
schema:
$ref:"#/components/schemas/Upload-Checksum"
requestBody:
description:Remaining (possibly partial) content of the file. Required if Content-Length > 0.
required:false
content:
application/offset+octet-stream:
schema:
type:string
format:binary
responses:
204:
description:Upload offset was updated
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
Upload-Offset:
schema:
$ref:"#/components/schemas/Tus-Resumable"
Upload-Expires:
description:Added by the expiration extension. The Upload-Expires response
header indicates the time after which the unfinished upload expires.
A Server MAY wish to remove incomplete uploads after a given period
of time to prevent abandoned uploads from taking up extra storage.
The Client SHOULD use this header to determine if an upload is still
valid before attempting to resume the upload. This header MUST be
included in every PATCH response if the upload is going to expire.
If the expiration is known at the creation, the Upload-Expires header
MUST be included in the response to the initial POST request. Its
value MAY change over time. If a Client does attempt to resume an
upload which has since been removed by the Server, the Server SHOULD
respond with the 404 Not Found or 410 Gone status. The latter one
SHOULD be used if the Server is keeping track of expired uploads.
In both cases the Client SHOULD start a new upload. The value of the
Upload-Expires header MUST be in RFC 7231 datetime format.
schema:
type:string
400:
description:Added by the checksum extension. The checksum algorithm is
not supported by the server
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
403:
description:In the concatenation extension, the Server MUST respond with
the 403 Forbidden status to PATCH requests against a final upload URL
and MUST NOT modify the final or its partial uploads.
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
404:
description:PATCH request against a non-existent resource
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
409:
description:PATCH request with Upload-Offset unequal to the offset of the resource on the server. The Upload-Offset header's value MUST be equal to the current offset of the resource.
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
410:
description:PATCH request against a non-existent resource
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
412:
description:Precondition Failed
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
Tus-Version:
schema:
$ref:"#/components/schemas/Tus-Version"
415:
description:Content-Type was not application/offset+octet-stream
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
460:
description:Added by the checksum extension. Checksums mismatch
headers:
Tus-Resumable:
schema:
$ref:"#/components/schemas/Tus-Resumable"
# Download API
/s5/blob/{cid}:
get:
summary:Retrieve a blob
responses:
'302':
description:Redirecting to discovered blob url
/s5/metadata/{cid}:
get:
summary:Retrieve file metadata
description:>
*Resolvers are currently not supported
*Raw files don't have metadata
responses:
'200':
description:File metadata
content:
application/json:
schema:
type:object
/s5/download/{cid}:
get:
summary:Download a file
responses:
'200':
description:File content
content:
application/octet-stream:
schema:
type:string
format:binary
# Pins API
/s5/pin/{cid}:
post:
summary:Pin a file
responses:
'204':
description:File pinned
/s5/delete/{cid}:
delete:
summary:Delete a file. This will only unpin it from the account, and potentially delete it later if there are no more global pins.
responses:
'204':
description:File deleted
# Debug API
/s5/debug/download_urls/{cid}:
get:
summary:Retrieve download URLs
parameters:
- name:hash
in:query
required:true
schema:
type:string
description:This is base64 url encoded
- name:kinds
in:query
required:false
schema:
type:string
description:This is a comma separated list of kinds, which are integer identifiers.