Quickstart

Upload example#

Copy the examples below and replace the subdomain subdomain with your own airstore subdomain and your secret key after X-Airstore-Secret-Key to get started.

This is the most common method in web. This is the same method as the one used to upload files through forms on a website. The form property name is file (even if there is only one file).

Example using cURL one-liner#

Create a random file myfile.txt

echo 'Hello world' > myfile.txt

Upload that file (simple example)

curl -X POST -F file=@myfile.txt \
     -H "X-Airstore-Secret-Key: 00000000111122223333444444444444" \
     "https://subdomain.api.airstore.io/v1/upload?dir=/backups/2019-01/"

You should see a response like this

{
    "status": "success",
    "file": {
        "size": 395313152,
        "meta": {},
        "uuid": "65681afd-cc5b-5d5a-b059-a25e2a43c339",
        "url_permalink": "https://subdomain.api.airstore.io/v1/get/_/65681afd-cc5b-5d5a-b059-a25e2a43c339/myfile.txt",
        "url_public": "https://subdomain.airstore.io/backups/2019-01/myfile.txt",
        "type": null,
        "properties": {},
        "name": "myfile.txt"
    },
    "info": {
        ...
    }
}

Now you can access your document with either:

  • url_permalink wich is a unique link to your document, if erease the document by an other one this link will change.
  • url_public if you have allow the public listing.

That's it ! You uploaded your first file to Airstore congratulaition

If you have any question we will be happy to answer them contact us at hello@opendocs.cc