Get .env from site

Get the .env file contents from a site.


GET/api/servers/{server}/sites/{id}/env

Get environment file

This endpoint returns the contents of the .env file from your site. This will only work if the file is present.

Request

GET
/api/servers/{server}/sites/{id}/env
curl -G "https://ploi.io/api/servers/{server}/sites/{id}/env" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"

Response

{
  "content": "APP_NAME=Laravel\nAPP_ENV=production\nAPP_URL=https://example.com..."
}