Leap0

Edit a file (find and replace)

Apply one or more find-and-replace edits within a single file.

POST
/v1/sandbox/{sandboxID}/filesystem/edit-file

Apply one or more find-and-replace edits within a single file.

Authorization

BearerAuth
AuthorizationBearer <token>

API key passed as a Bearer token in the Authorization header. Alternatively, use the leap0-authorization header.

In: header

Path Parameters

sandboxID*string

Unique sandbox identifier.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

path*string

Path to the file.

edits*array<>

List of find-and-replace edits to apply.

Items1 <= items

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.leap0.dev/v1/sandbox/string/filesystem/edit-file" \  -H "Content-Type: application/json" \  -d '{    "path": "string",    "edits": [      {        "find": "string"      }    ]  }'
{  "diff": "string",  "replacements": 0}
{  "message": "string",  "errors": [    {      "field": "string",      "error": "string"    }  ]}
{  "message": "string"}
{  "message": "string"}