List Files

REST API to list files#

GET /v1/list

Using this List API, you can list files and directories. You will see all the files and directories inside a specific directory (by default : the root /).

This /v1/list API roughly match the ls command on Unix. If you want to list all your files recursively, whatever their directories are, then you should consider the /v1/search API (using a wildcard search) that provide such feature and imitate the Unix find command.

Parameters#

dir (optional) : /path/to/folder (default: /).

Specify the folder where you want to list files. Be aware that directory are case sensitive.

Permissions#

Only the secret keys having the FILE_LIST permission will be able to list files.

PermissionValid
FILE_UPLOADDenied
FILE_LISTAuthorized
FILE_FETCHDenied
CONFIG_CHANGEDenied

API Demo#

Since a demo is better than thousands words, just click on the green Send button below.

host: "https://example.api.airstore.io" path: "/v1/list" parameters: dir: / limit: 1000 theme: clouds-midnight editor_theme: clouds_midnight method: GET

Response Format#

You can find your files in the files list, and the directories in the directories list (it makes sense :)).

{
    "container": {
        "airstore_system": "airstore_nest"
    },
    "files": [
        {
            "uuid": "45a0b809-f13a-51fd-abd3-b2eb02b6be90",
            "name": "paris.jpg",
            "created_at": "2017-02-12T06:48:56Z",
            "modified_at": "2017-02-12T06:48:56Z",
            "type": "image/jpeg",
            "size": 23115,
            "meta": {},
            "properties": {},
            "url_permalink": "http://example.api.airstore.io/v1/get/_/45a0b809-f13a-51fd-abd3-b2eb02b6be90/ec-paris.jpg",
            "url_public": "http://example.airstore.io/ec-paris.jpg"
        },

        ...

    ],
    "directories": [
        {
            "uuid": "6e840755-6954-51ac-b86a-050141645054",
            "path": "/photos",
            "name": "photos",
            "properties": {},
            "count_files_recursive": 1,
            "total_size_recursive": 12,
            "public_icon": "http://scaleflex.cloudimg.io/crop/300x300/x/http://www.airstore.io/assets/dir.png"
        },

        ...
    ]
}

{#od_b204258e}