DNS-Eintrag erstellen
Neuen DNS-Record für eine bestimmte Domain hinzufügen
Content-Type
application/json
category
dns
action
create_record
Anfrageparameter
| Parametername | Typ | Beschreibung | Beispiel |
|---|---|---|---|
| domain | String (3-60) | Domainname | example.com |
| type | String | DNS-Eintragstyp (A, MX, CNAME, TXT usw.) | A |
| host | String | Hostname für den DNS-Eintrag | www |
| value | String | Wert des DNS-Eintrags | 192.168.1.1 |
| pri | Integer (Optional) | Prioritätswert (für MX- und SRV-Einträge verwendet) | 20 |
Antwortparameter
| Parametername | Typ | Beschreibung |
|---|---|---|
| id | Integer | ID des DNS-Eintrags |
| type | String | DNS-Eintragstyp (A, MX, CNAME, TXT usw.) |
| host | String | Hostname |
| value | String | Wert des DNS-Eintrags |
| ttl | Integer | Time-to-Live in Sekunden |
| pri | Integer | Priorität (für MX-Einträge) |
Beispielanfrage
{
curl https://api.nicenic.net/v2/?category=dns&action=create_record&domain={domain}&type={type}&host={host}&value={value}&pri={pri}
-H "Authorization: username:api_secret"
-H "Content-Type: application/json"
}
Rückgabeergebnis
0 OK Erfolgreiche Antwort
{
"code": 0,
"msg" : "success",
"data" : {
{
"id": 12345,
"type": "A",
"host": "@",
"value": "192.168.1.1",
"ttl": 3600,
"pri": 0
}
}
}
400 Ungültige Anfrage
{
"code": 400,
"msg" : "Request parameter error",
}






