editor

Inserts text at a specified line number in a file.

post/api/editor/insert

Request

  • Base URL
    http://localhost:4242/your-computer-name
  • URL
    http://localhost:4242/your-computer-name/api/editor/insert
  • Auth
    none declared

Request body

pathstring required

File path to modify

textstring required

Text to insert

insert_lineinteger nullable

Line number to insert at (1-based)

Example request

{
  "insert_line": 5,
  "path": "/path/to/file.txt",
  "text": "New line of text"
}

Response

Successfully inserted text

Changes