Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

List directory

List direct children of one directory relative to the requested location.

GET/api/fs/list
Query parameters
locationobject | any
pathstring | any
Responses
200Success
locationLocation.Inforequired
Show properties
directorystringrequired
workspaceIDobject
Show properties
object
projectobjectrequired
Show properties
idstringrequired
directorystringrequired
dataFileSystem.Entry[]required
Show properties
Array of FileSystem.Entry
pathstringrequired
typestringrequired
Allowed:filedirectory
400InvalidRequestError
_tagstringrequired
Allowed:InvalidRequestError
messagestringrequired
kindstring | any
Show properties
Any of:
string
string
any
any
fieldstring | any
Show properties
Any of:
string
string
any
any
401UnauthorizedError
_tagstringrequired
Allowed:UnauthorizedError
messagestringrequired
Request
curl -X GET "/api/fs/list"
Response
{
  "location": {
    "directory": "string",
    "workspaceID": {},
    "project": {
      "id": "string",
      "directory": "string"
    }
  },
  "data": [
    {
      "path": "string",
      "type": "file"
    }
  ]
}