GET
/
v2
/
apps
/
{app_id}
/
files
curl --request GET \
  --url https://api.squarecloud.app/v2/apps/{app_id}/files \
  --header 'Authorization: <authorization>'
{
    "status": "success",
    "response": [
        {
            "type": "file",
            "name": ".env",
            "size": 86,
            "lastModified": 1676168978000
        },
        {
            "type": "file",
            "name": ".gitignore",
            "size": 8,
            "lastModified": 1675125328000
        },
        {
            "type": "file",
            "name": "index.js",
            "size": 614,
            "lastModified": 1676168350000
        },
        {
            "type": "file",
            "name": "squarecloud.app",
            "size": 65,
            "lastModified": 1676169188000
        },
        {
            "type": "directory",
            "name": "src",
            "lastModified": 1676155738000
        }
    ]
}
Authorization
string
required

The API key for your account. You can find this in your account settings.

app_id
string
required

The ID of the application. You can find this in the URL of your application’s dashboard.

path
string
required

The path of the directory whose files you want to list. Default is the root directory.

Response

status
string

Indicates whether the call was successful. success if successful, error if not.

response
array

The list of files and directories in the specified path.

{
    "status": "success",
    "response": [
        {
            "type": "file",
            "name": ".env",
            "size": 86,
            "lastModified": 1676168978000
        },
        {
            "type": "file",
            "name": ".gitignore",
            "size": 8,
            "lastModified": 1675125328000
        },
        {
            "type": "file",
            "name": "index.js",
            "size": 614,
            "lastModified": 1676168350000
        },
        {
            "type": "file",
            "name": "squarecloud.app",
            "size": 65,
            "lastModified": 1676169188000
        },
        {
            "type": "directory",
            "name": "src",
            "lastModified": 1676155738000
        }
    ]
}