You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a new HTTP endpoint to the Agent HTTP API. This API will be in support of Coder Desktop File Sync, so that our GUI can list directories in the workspace when setting up a file sync.
API endpoint: api/v0/ls
Request format: (example is for /home/coder on a Unix system)
{
// path components as an ordered list"path": ["home", "coder"],
// also accepts "home", in which case path is interpreted relative to the home dir"relativity": "root"
}
Response format:
{
// the absolute path we are returning"absolute_path": ["home", "coder"],
"contents": [
{
"name": "repos",
"dir": true,
},
{
"name": "Downloads",
"dir": true,
}
]
}
Errors
403 Forbidden - if the agent doesn’t have permission to list the directory
404 File Not Found - if the directory doesn’t exist
We also write a standard codersdk.Response message for any unsuccessful requests.
The text was updated successfully, but these errors were encountered:
Add a new HTTP endpoint to the Agent HTTP API. This API will be in support of Coder Desktop File Sync, so that our GUI can list directories in the workspace when setting up a file sync.
api/v0/ls
/home/coder
on a Unix system)codersdk.Response
message for any unsuccessful requests.The text was updated successfully, but these errors were encountered: