storage

Space

0.01 USD

Create

POST /v1/space/Create

Create an object. Returns error if object with this name already exists. Max object size of 10MB, see Upload endpoint for larger objects. If you want to update an existing object use the `Update` endpoint

Request

namestring

The name of the object. Use forward slash delimiter to implement a nested directory-like structure e.g. images/foo.jpg

objectstring

The contents of the object. Either base64 encoded if sending request as application/json or raw bytes if using multipart/form-data format

visibilitystring

Who can see this object? "public" or "private", defaults to "private"

Response

urlstring

A public URL to access the object if visibility is "public"

Request

Response

{
    "url": "https://example.com/foo/bar/file.jpg"
}

0.000001 USD

Delete

POST /v1/space/Delete

Delete an object from space

Request

namestring

Name of the object

Response

{}

Request

Response

{}

0.000001 USD

Download

POST /v1/space/Download

Download an object via a presigned url

Request

namestring

name of object

Response

urlstring

presigned url

Request

Response

{
    "url": "https://example.com/foo/bar/images/file.jpg"
}

0.000001 USD

List

POST /v1/space/List

List the objects in space

Request

prefixstring

optional prefix for the name e.g. to return all the objects in the images directory pass images/

Response

objectsarray

Request

Response

{
    "objects": [
        {
            "name": "images/file.jpg",
            "modified": "2021-12-10T14:28:23.220874511Z",
            "created": "2021-12-10T14:28:23.220874511Z",
            "visibility": "public",
            "url": "https://example.com/foo/bar/images/file.jpg"
        },
        {
            "name": "images/file2.jpg",
            "modified": "2021-12-10T14:27:23.220874511Z",
            "created": "2021-12-10T14:27:23.220874511Z",
            "visibility": "public",
            "url": "https://example.com/foo/bar/images/file2.jpg"
        }
    ]
}

0.000001 USD

Read

POST /v1/space/Read

Read an object in space

Request

namestring

name of the object

Response

objectobject

The object itself

Request

Response

{
    "object": {
        "name": "images/file.jpg",
        "modified": "2021-12-10T14:28:23.220874511Z",
        "created": "2021-12-10T14:28:23.220874511Z",
        "url": "https://example.com/foo/bar/images/file.jpg",
        "visibility": "public",
        "data": "<file bytes>"
    }
}

0.01 USD

Update

POST /v1/space/Update

Update an object. If an object with this name does not exist, creates a new one.

Request

namestring

The name of the object. Use forward slash delimiter to implement a nested directory-like structure e.g. images/foo.jpg

objectstring

The contents of the object. Either base64 encoded if sending request as application/json or raw bytes if using multipart/form-data format

visibilitystring

Who can see this object? "public" or "private", defaults to "private"

Response

urlstring

A public URL to access the object if visibility is "public"

Request

Response

{
    "url": "https://example.com/foo/bar/images/file.jpg"
}

0.01 USD

Upload

POST /v1/space/Upload

Upload a large object (> 10MB). Returns a time limited presigned URL to be used for uploading the object

Request

namestring

visibilitystring

is this object public or private

Response

urlstring

a presigned url to be used for uploading. To use the URL call it with HTTP PUT and pass the object as the request data

Request

Response

{
    "url": "https://example.com/foo/bar/images/file.jpg"
}