Leap0

Copy a file or directory

Copy a file or directory from one path to another. Set `recursive` to true for directories.

POST
/v1/sandbox/{sandboxID}/filesystem/copy

Copy a file or directory from one path to another. Set recursive to true for directories.

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.

src_path*string

Source path.

dst_path*string

Destination path.

recursive?boolean

Copy directory contents recursively.

Defaultfalse
overwrite?boolean

Overwrite destination if it exists.

Defaultfalse

Response Body

application/json

application/json

application/json

curl -X POST "https://api.leap0.dev/v1/sandbox/string/filesystem/copy" \  -H "Content-Type: application/json" \  -d '{    "src_path": "string",    "dst_path": "string"  }'
Empty
{  "message": "string",  "errors": [    {      "field": "string",      "error": "string"    }  ]}
{  "message": "string"}
{  "message": "string"}
Empty