Clatter LabsHelp Center

How do I list the files in my code with the API?

How-toUpdated
curl "$CB/v1/buckets/BUCKET_ID/tree" \
  -H "Authorization: Bearer $CLATTER_API_KEY" -H "X-Clatter-Account: $CLATTER_ACCOUNT_ID"
{
  "object": "tree",
  "ref": "9b1f0c5e2a7d43e8b6c1f0a9d2e5b7c4a1f3e8d0",
  "files": [
    { "path": "README.md", "type": "file", "size": 1840 },
    { "path": "src", "type": "dir" },
    { "path": "src/index.ts", "type": "file", "size": 5121 }
  ],
  "truncated": false
}

Paths are sorted. truncated is true for very large trees (over 100,000 entries).

Learn more#

Related articles

Still need help?

Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyz
For deleting your whole account or the data of one service.