Add a domain
POST
/api/v1/deploy/services/{id}/domainsEn esta página
Parámetros
| Campo | En | Tipo | Descripción |
|---|---|---|---|
idobligatorio | ruta | string | A service id, or project/service, or project/environment/service |
format | consulta | string | text answers in plain text instead of JSON
|
Cuerpo
| Campo | Tipo | Descripción |
|---|---|---|
hostname | string |
|
targetPort | integer |
|
certificate | string |
|
Esquema JSON
{
"type": "object",
"properties": {
"hostname": {
"type": "string",
"pattern": "^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9-]{2,63}$"
},
"targetPort": {
"type": "integer",
"minimum": 1,
"maximum": 65535
},
"certificate": {
"type": "string",
"enum": [
"le",
"internal",
"none"
]
}
}
}Petición de ejemplo
curl -X POST "https://polaris.example.com/api/v1/deploy/services/{id}/domains" \
-H "Authorization: Bearer $POLARIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"hostname": "string",
"targetPort": 1,
"certificate": "le"
}'Respuestas
| Estado | Qué es |
|---|---|
201 | Created |
También puede dar los errores comunes 400, 401, 403, 404, 429. Ver errores comunes