Set a variable on an environment
POST
/api/v1/deploy/environments/{id}/variablesEn esta página
Parámetros
| Campo | En | Tipo | Descripción |
|---|---|---|---|
idobligatorio | ruta | string |
|
format | consulta | string | text answers in plain text instead of JSON
|
Cuerpo
| Campo | Tipo | Descripción |
|---|---|---|
keyobligatorio | string |
|
valueobligatorio | string |
|
secret | boolean |
|
redeploy | boolean | Redeploy the services this reaches so they pick it up now. Needs the right to deploy.
|
Esquema JSON
{
"type": "object",
"properties": {
"key": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
"maxLength": 256
},
"value": {
"type": "string",
"maxLength": 65536
},
"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": [
"key",
"value"
]
}Petición de ejemplo
curl -X POST "https://polaris.example.com/api/v1/deploy/environments/{id}/variables" \
-H "Authorization: Bearer $POLARIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"key": "string",
"value": "string",
"secret": true,
"redeploy": false
}'Respuestas
| Estado | Qué es |
|---|---|
200 | OK |
También puede dar los errores comunes 400, 401, 403, 404, 429. Ver errores comunes