Skip to main content
POST
/
api
/
editor
/
create
Create New File
curl --request POST \
  --url http://localhost:4242/{computer_name}/api/editor/create \
  --header 'Content-Type: application/json' \
  --data '
{
  "file_text": "Hello, World!",
  "path": "/path/to/newfile.txt"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Body

application/json
path
string
required

File path to create

Example:

"/path/to/newfile.txt"

file_text
string | null

Initial file contents

Example:

"Hello, World!"

Response

Successfully created file