Create directory
curl --request POST \
--url http://127.0.0.1:8765/v1/workspaces/{workspace_id}/vfs/mkdir \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "/notes"
}
'import requests
url = "http://127.0.0.1:8765/v1/workspaces/{workspace_id}/vfs/mkdir"
payload = { "path": "/notes" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '/notes'})
};
fetch('http://127.0.0.1:8765/v1/workspaces/{workspace_id}/vfs/mkdir', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}
{
"explanation": {
"call": "mkdir",
"paths": [
"/notes"
],
"outcome": "allow",
"reason": "",
"source": "",
"decision": null,
"answers": [],
"error": ""
}
}
VFS
Create directory
POST
/
v1
/
workspaces
/
{workspace_id}
/
vfs
/
mkdir
Create directory
curl --request POST \
--url http://127.0.0.1:8765/v1/workspaces/{workspace_id}/vfs/mkdir \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "/notes"
}
'import requests
url = "http://127.0.0.1:8765/v1/workspaces/{workspace_id}/vfs/mkdir"
payload = { "path": "/notes" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '/notes'})
};
fetch('http://127.0.0.1:8765/v1/workspaces/{workspace_id}/vfs/mkdir', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}
{
"explanation": {
"call": "mkdir",
"paths": [
"/notes"
],
"outcome": "allow",
"reason": "",
"source": "",
"decision": null,
"answers": [],
"error": ""
}
}
Create a directory at the path.
See error examples and recovery steps. The complete OpenAPI contract includes every response schema.
{}
{
"explanation": {
"call": "mkdir",
"paths": [
"/notes"
],
"outcome": "allow",
"reason": "",
"source": "",
"decision": null,
"answers": [],
"error": ""
}
}
Errors
Errors
| Status | Meaning |
|---|---|
400 | The request is malformed: the body is not JSON (invalid_json) or not a JSON object, a field is missing (missing_field), unknown (unknown_field) or has a wrong value (invalid_value), or the request is otherwise invalid (invalid_request). param names the field at fault. |
401 | The token is missing or wrong (unauthorized). |
403 | The call is refused. A policy refused it (policy_refused, with decision), a mount mode or permission refused it (forbidden), the backend is out of space or quota (storage_full), or the request came for a host or from a browser origin that is not allowed (host_not_allowed, origin_not_allowed). |
404 | The workspace, session, job, file or route does not exist, or the caller may not see it (not_found). |
409 | The request conflicts with the current state. The id or name is taken (already_exists), the workspace is busy on another server or starting or stopping (workspace_busy), the workspace is stopped (workspace_stopped), a file changed since it was read (stale_write), or the state allows no such change (conflict). |
429 | Past a rate limit (rate_limited), or a new session past max_sessions (session_limit). |
413 | The request body, a multipart part, or stdin exceeds its size limit (too_large). |
500 | The server failed internally (internal). The message is internal server error and the cause goes to the server log. A file call that fails with an I/O error (EIO, EPIPE, EBADF) carries its errno and the POSIX message instead. Check for side effects before retrying. |
Authorizations
Query Parameters
Response
200 - application/json
An empty object when the call succeeds. With explain=true, explanation says what the call would do; nothing runs.
- Result
- Explanation (explain=true)
An empty object.