On this page
Parameters
| Field | In | Type | Description |
|---|---|---|---|
idrequired | path | string | A service id, or project/service, or project/environment/service |
format | query | string | text answers in plain text instead of JSON
|
Request body
| Field | Type | Description |
|---|---|---|
hostname | string |
|
targetPort | integer |
|
certificate | string |
|
JSON schema
{
"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"
]
}
}
}Example request
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"
}'Responses
| Status | Meaning |
|---|---|
201 | Created |
Can also answer the common errors 400, 401, 403, 404, 429. See common errors