Skip to main content
GET
https://api.app.shinzo.ai
/
v1
/
agent
/
{agentId}
/
filesystem
/
directories
/
{path}
List Directory
curl --request GET \
  --url https://api.app.shinzo.ai/v1/agent/{agentId}/filesystem/directories/{path} \
  --header 'Authorization: Bearer <token>'

Authentication

Requires JWT token or Platform API key.
agentId
string
required
Agent UUID
path
string
required
Directory path within the agent workspace (wildcard segment)
recursive
boolean
List directory contents recursively
includeHidden
boolean
Include hidden files in the listing

Example Request

curl -X GET "https://api.app.shinzo.ai/v1/agent/agt_abc123/filesystem/directories/workspace/src" \
  -H "Authorization: Bearer <jwt_token>"
With recursive listing:
curl -X GET "https://api.app.shinzo.ai/v1/agent/agt_abc123/filesystem/directories/workspace/src?recursive=true" \
  -H "Authorization: Bearer <jwt_token>"

Response

{
  "path": "/workspace/src",
  "entries": [
    {
      "name": "index.js",
      "type": "file",
      "size": 1024,
      "modified_at": "2025-01-20T10:00:00Z"
    },
    {
      "name": "utils",
      "type": "directory",
      "size": 0,
      "modified_at": "2025-01-19T15:00:00Z"
    }
  ]
}

Response Fields

FieldTypeDescription
pathstringAbsolute path of the listed directory
entriesarrayList of directory entries
entries[].namestringName of the file or directory
entries[].typestringEntry type (file or directory)
entries[].sizenumberSize in bytes (files only)
entries[].modified_atstringLast modified timestamp (ISO 8601)

Status Codes

CodeDescription
200Directory contents returned successfully
401Invalid authentication
403Access denied
404Agent or directory not found