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"

Response Body

200

Successful

idRequiredstring
isNewRequiredboolean

500

Internal Server Error

responseRequiredstring
curl -X PUT "https://api.freestyle.sh/ephemeral/v1/dev-servers/files/{*filepath}" \
  -H "Content-Type: application/json" \
  -d '{
    "devServer": {
      "repoId": "c7c90052-c566-40b6-94a5-a1e9a44bfdc7",
      "kind": "repo"
    },
    "content": "string",
    "encoding": "utf-8"
  }'

Successful

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