Import a .env file into an environment
POST
/api/v1/deploy/environments/{id}/variables/importOn this page
Parameters
| Field | In | Type | Description |
|---|---|---|---|
idrequired | path | string |
|
format | query | string | text answers in plain text instead of JSON
|
Request body
| Field | Type | Description |
|---|---|---|
textrequired | string |
|
secret | boolean |
|
redeploy | boolean | Redeploy the services this reaches so they pick it up now. Needs the right to deploy.
|
JSON schema
{
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"maxLength": 262144
},
"secret": {
"type": "boolean",
"default": true
},
"redeploy": {
"type": "boolean",
"default": false,
"description": "Redeploy the services this reaches so they pick it up now. Needs the right to deploy."
}
},
"required": [
"text"
]
}Example request
curl -X POST "https://polaris.example.com/api/v1/deploy/environments/{id}/variables/import" \
-H "Authorization: Bearer $POLARIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "string",
"secret": true,
"redeploy": false
}'Responses
| Status | Meaning |
|---|---|
200 | OK |
Can also answer the common errors 400, 401, 403, 404, 429. See common errors