Skip to main content
PUT
/
browsers
/
{id}
/
fs
/
write_file
Write or create a file
curl --request PUT \
  --url https://api.onkernel.com/browsers/{id}/fs/write_file \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/octet-stream' \
  --data '"<string>"'
{
  "code": "bad_request",
  "message": "Missing required field: app_name",
  "details": [
    {
      "code": "invalid_input",
      "message": "Provided version string is not semver compliant"
    }
  ],
  "inner_error": {
    "code": "invalid_input",
    "message": "Provided version string is not semver compliant"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Browser session ID

Query Parameters

path
string
required

Destination absolute file path.

Pattern: ^/.*
mode
string

Optional file mode (octal string, e.g. 644). Defaults to 644.

Pattern: ^[0-7]{3,4}$

Body

application/octet-stream

The body is of type file.

Response

File written successfully