cURL
curl --request POST \ --url http://localhost:4242/{computer_name}/api/editor/insert \ --header 'Content-Type: application/json' \ --data ' { "insert_line": 5, "path": "/path/to/file.txt", "text": "New line of text" } '
{ "detail": [ { "loc": [ "<string>" ], "msg": "<string>", "type": "<string>" } ] }
Inserts text at a specified line number in a file.
File path to modify
"/path/to/file.txt"
Text to insert
"New line of text"
Line number to insert at (1-based)
5
Successfully inserted text