Get .env from application

Get the .env file contents from an application, such as an application on a worker server.


GET/api/servers/{server}/applications/{application}/env

Get environment file

This endpoint returns the contents of the .env file of your application. It returns a 404 when the application has no .env file or the server cannot be reached.

Find the ID of an application by listing the applications of a server with GET /api/servers/{server}/applications.

Request

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

Response

{
  "data": "APP_NAME=Laravel\nAPP_ENV=production\nQUEUE_CONNECTION=redis..."
}