Skip to main content
GET
/
projects
/
{project_name}
/
files
Read a path
curl --request GET \
  --url https://api.cloudsquid.io/api/projects/{project_name}/files \
  --header 'X-API-Key: <api-key>'
{
  "name": "<string>",
  "size": 123,
  "mimetype": "<string>",
  "modified_at": "2023-11-07T05:31:56Z",
  "url": "<string>"
}
Polymorphic response: The response shape depends on what exists at the path. Check the ftype field — "file" returns a download URL, "folder" returns a listing of direct children.

What this does

Reads whatever exists at the given path. If the path resolves to a file, returns a File object with a short-lived presigned download URL (15-minute TTL). If it resolves to a folder, returns a Folder object listing its direct children.

Examples

curl "https://api.cloudsquid.io/api/projects/my-project/files?path=/invoices/2024/jan.pdf" \
  -H "X-API-Key: YOUR_API_KEY"
File response (200):
{
  "ftype": "file",
  "name": "jan.pdf",
  "size": 48210,
  "mimetype": "application/pdf",
  "modified_at": "2026-06-01T12:00:00Z",
  "url": "https://storage.googleapis.com/presigned?..."
}
Folder response (200):
{
  "ftype": "folder",
  "name": "2024",
  "entries": [
    {
      "ftype": "file",
      "name": "jan.pdf",
      "size": 48210,
      "mimetype": "application/pdf",
      "modified_at": "2026-06-01T12:00:00Z",
      "url": "https://storage.googleapis.com/presigned?..."
    },
    {
      "ftype": "folder",
      "name": "archive"
    }
  ]
}

Authorizations

X-API-Key
string
header
required

Path Parameters

project_name
string
required

The name of the project

Query Parameters

path
string
required

Absolute path inside the project

Response

File or folder

A file object inside the filesystem

ftype
enum<string>
required
Available options:
file,
folder
name
string
required
size
integer

size in bytes

mimetype
string
modified_at
string<date-time>
url
string<uri>

Presigned download url. 15min TTL.