Storage

List #

URL Parameters


string provider (optional)

Filter storage by provider. Account provider you want to filter by. Must be one of the following: aws, aws_lightsail, exoscale, hetzner, gcp, upcloud, scaleway, vultr.


string region (optional)

Filter storage by given region


string sort (optional)

Parameter to sort by. Must be one of the following: id, name. Default direction is ascending, to request a descending order you can prefix the parameter value with a dash: sort=-id.


datetime modified_since (optional)

Filter storages that have only been modified after the given date time.


integer page_size (optional)

Amount of results to display per page. Must be betwen 15 and 100.

                            GET
                            /v1/storage
                        
                           
curl https://api.snapshooter.com/v1/storage \
-X GET \
--header 'Authorization: Bearer API_TOKEN_HERE' \
HTTP/2 200
{
"data": [
{
"id": 3,
"name": "SnapShooter EU (Ireland)",
"provider": "snapshooter",
"region": "eu-west-1",
"bucket": "9ewsy1.free.eu-west-1.snapshooter.cloud",
"endpoint": null,
"estimated_size": 1024,
"priority": 1
}
],
"links": {
},
"meta": {
}
}

Add #

Parameters


string name

Name of the storage


string provider

Storage provider. Available providers: digitalocean, aws, wasabi, b2, filebase, upcloud, snapshooter, scaleway, exoscale and custom.


string key

Storage key


string secret

Storage secret


string bucket

Storage bucket


string endpoint

Storage endpoint url. Only required for 'custom' providers.


string region

Storage region. Required for all providers, except for 'custom' provider.

                            POST
                            /v1/storage
                        
                           
curl https://api.snapshooter.com/v1/storage \
-X POST \
--header 'Authorization: Bearer API_TOKEN_HERE' \
HTTP/2 201
{
"data": {
"id": 3,
"name": "SnapShooter EU (Ireland)",
"provider": "snapshooter",
"region": "eu-west-1",
"bucket": "9ewsy1.free.eu-west-1.snapshooter.cloud",
"endpoint": null,
"estimated_size": 1024,
"priority": 1
}
}

Examples

curl -X POST https://api.snapshooter.com/v1/storage \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"name": "Demo DigitalOcean Space",
"provider": "digitalocean",
"key": "<Access Key>",
"secret": "<Secret Key>",
"bucket": "snapshooter-demo",
"region": "fra1"
}
DATA
curl -X POST https://api.snapshooter.com/v1/storage \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"name": "Demo AWS S3",
"provider": "aws",
"key": "<Access Key>",
"secret": "<Secret Key>",
"bucket": "snapshooter-demo",
"region": "us-east-2"
}
DATA
curl -X POST https://api.snapshooter.com/v1/storage \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"name": "Demo Wasabi",
"provider": "wasabi",
"key": "<Access Key>",
"secret": "<Secret Key>",
"bucket": "snapshooter-demo",
"region": "us-central-1"
}
DATA
curl -X POST https://api.snapshooter.com/v1/storage \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"name": "Demo Backblaze B2",
"provider": "b2",
"key": "<Access Key>",
"secret": "<Secret Key>",
"bucket": "demo-snapshooter",
"region": "us-west-001"
}
DATA
curl -X POST https://api.snapshooter.com/v1/storage \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"name": "Demo Filebase",
"provider": "filebase",
"key": "<Access Key>",
"secret": "<Secret Key>",
"bucket": "snapshooter-demo",
"region": "us-east-1"
}
DATA
curl -X POST https://api.snapshooter.com/v1/storage \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"name": "Demo Upcloud",
"provider": "upcloud",
"key": "<Access Key>",
"secret": "<Secret Key>",
"bucket": "snapshooter-demo",
"region": "de-fra1"
}
DATA
curl -X POST https://api.snapshooter.com/v1/storage \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"name": "Demo Scaleway",
"provider": "scaleway",
"key": "<Access Key>",
"secret": "<Secret Key>",
"bucket": "snapshooter-demo",
"region": "nl-ams-1"
}
DATA
curl -X POST https://api.snapshooter.com/v1/storage \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"name": "Demo Exoscale",
"provider": "exoscale",
"key": "<Access Key>",
"secret": "<Secret Key>",
"bucket": "snapshooter-demo",
"region": "ch-dk-2"
}
DATA
curl -X POST https://api.snapshooter.com/v1/storage \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"name": "Demo Custom S3 Service",
"provider": "custom",
"key": "<Access Key>",
"secret": "<Secret Key>",
"bucket": "snapshooter-demo",
"region": "us-west-rack-2",
"endpoint": "play.min.io:9000"
}
DATA

Errors


Update #

Parameters


string name

Storage name


string key

Storage key. Can be updated for any provider, except: snapshooter, dropbox, google_drive and azure_blob.


string secret

Storage secret. Can be updated for any provider, except: snapshooter, dropbox, google_drive and azure_blob.

                            PATCH
                            /v1/storage/{storage_id}
                        
                           
curl https://api.snapshooter.com/v1/storage/{storage_id} \
-X PATCH \
--header 'Authorization: Bearer API_TOKEN_HERE' \
HTTP/2 204
//Empty Response Body

Examples

curl -X POST https://api.snapshooter.com/v1/storage/{storage_id} \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"name": "Secondary Backup Replica"
}
DATA
curl -X POST https://api.snapshooter.com/v1/storage/{storage_id} \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
--data-binary @- <<DATA
{
"key": "<Same Access Key>",
"secret": "<New Secret Key>"
}
DATA

Errors


Delete #

Parameters

This endpoint does not accept any parameters
                            DELETE
                            /v1/storage/{storage_id}
                        
                           
curl https://api.snapshooter.com/v1/storage/{storage_id} \
-X DELETE \
--header 'Authorization: Bearer API_TOKEN_HERE'
HTTP/2 204
//Empty Response Body

Errors



Was this page helpful?

Thank you for helping us improve!