Skip to main content
Create a new directory at the specified Viking URI.

Python SDK

from openviking import OpenViking

client = OpenViking()

# Create a new directory
client.mkdir("viking://resources/new-project/")

HTTP API

curl -X POST http://localhost:1933/api/v1/fs/mkdir \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-key" \
  -d '{
    "uri": "viking://resources/new-project/"
  }'
POST /api/v1/fs/mkdir

{
  "uri": "viking://resources/new-project/"
}

Parameters

uri
string
required
Viking URI for the new directory (must end with /)

Response

status
string
Operation status (ok on success)
result
object
Result object containing the created directory URI
time
number
Execution time in seconds
{
  "status": "ok",
  "result": {
    "uri": "viking://resources/new-project/"
  },
  "time": 0.1
}

CLI

openviking mkdir viking://resources/new-project/

Notes

  • The URI should end with a trailing slash (/) to indicate it’s a directory
  • Parent directories are created automatically if they don’t exist
  • If the directory already exists, the operation succeeds without error