Skip to main content
GET
https://api.buntime.sh
/
files
/
list
curl "https://api.buntime.sh/files/list?sessionId=ses_abc123" \
  -H "Authorization: Bearer $BUNTIME_API_KEY"
{
  "files": [
    {
      "path": "hello.ts",
      "size": 29,
      "modified": "2024-01-19T10:30:00Z",
      "type": "file"
    },
    {
      "path": "data.json",
      "size": 156,
      "modified": "2024-01-19T10:31:00Z",
      "type": "file"
    }
  ]
}

Request

sessionId
string
required
Session ID to list files from
path
string
Directory path to list (default: /workspace root)
Authorization
string
required
Bearer token with your API key

Response

files
array
Array of file objects

Example

curl "https://api.buntime.sh/files/list?sessionId=ses_abc123" \
  -H "Authorization: Bearer $BUNTIME_API_KEY"
{
  "files": [
    {
      "path": "hello.ts",
      "size": 29,
      "modified": "2024-01-19T10:30:00Z",
      "type": "file"
    },
    {
      "path": "data.json",
      "size": 156,
      "modified": "2024-01-19T10:31:00Z",
      "type": "file"
    }
  ]
}