Adding a domain¶
Note
If the automatic update is disabled, changes to the configuration are only applied once the automatic update is enabled again. Disabling the automatic update is primarily used to change many settings at once, so that Myra does not roll out a half-finished configuration. In some cases, Myra support also disables this option to prevent the Myra system from removing special configuration settings. Note that disabling autoUpdate is not related to database transactions. All changes made are saved, but not rolled out.
Note
If the optional attributes are not set, the system adds a default value.
Note
The body does not contain the attributes id, created, and modified. The values of these attributes are set by the system after the entries are created.
Sends a POST request to the endpoint /domains.
Description¶
The Add-Domain request allows the user to add a domain to the organisation.
Requirements¶
Values of the request: none
Objects: DomainVO
Request¶
To add a domain, no additional information needs to be added to the path of the request.
For a detailed specification of which information is required to add a domain, an object DomainVO with the following attributes needs to be defined in the body:
| Attributes | Description | Values |
|---|---|---|
name |
The name of the domain. | string |
The following attributes are optional:
| Attributes | Description | Values |
|---|---|---|
autoUpdate |
The availability of the auto update for the domain. |
|
autoDns |
Defines if the autoDns function for automatic searching for possible subdomains is enabled when creating a new domain. |
|
maintenance |
The availability of an existing maintenance page for the selected domain. |
|
The system responds by returning the object DomainVO with the information about the new entry.
Example¶
Example request body:
{
"objectType": "string",
"name": "string",
"organizationId": 0,
"autoDns": true,
"autoUpdate": true,
"maintenance": true,
"paused": true,
"pausedUntil": "string",
"template": "string",
"dnsRecords": [
{
"objectType": "string",
"name": "string",
"value": "string",
"priority": 0,
"ttl": 0,
"vhostId": 0,
"recordType": "string",
"weight": 0,
"port": 0,
"active": true,
"paused": true,
"sslCertTemplate": "string",
"upstreamOptions": "string",
"alternativeCname": "string",
"environment": "string",
"caaFlags": 0,
"caaTag": "string",
"endpoints": "string",
"serviceType": 0,
"encryption": "string",
"identificationNumber": "string",
"hashType": "string",
"enabled": true,
"comment": "string"
}
],
"reversed": true,
"environment": "string",
"locked": true,
"tagId": 0,
"permissions": "string",
"label": "string"
}
Responses¶
The following responses are available:
| STATUS CODE | DESCRIPTION |
|---|---|
| 201 | The request has succeeded and a new object has been created. |
| 400 | The request was unsuccessful. The request was invalid or information is missing. |
| 401 | The request has not succeeded because the user authentication was incorrect. |
| 403 | The request has not succeeded because the user does not have the right permissions. |