LogoFreestyle
API Reference/Dev servers

Write a file to a Dev Server

PUT/ephemeral/v1/dev-servers/files/{*filepath}

Request Body

application/jsonRequired
devServerRequiredobject
contentRequiredstring
encodingstring
Default: "utf-8"
curl -X PUT "https://api.freestyle.sh/ephemeral/v1/dev-servers/files/{*filepath}" \
  -H "Content-Type: application/json" \
  -d '{
    "devServer": {
      "repoId": "string",
      "kind": "repo"
    },
    "content": "string",
    "encoding": "utf-8"
  }'

Successful

{
  "id": "string",
  "isNew": true
}