API documentation
Cipta DNS Recataud
Tambah a new DNS recataud fatau a specific domain
Content-Type
application-json
kategori
dns
tindakan
create_record
Parameter permintaan
| Nama parameter | Jenis | Huraikan | Contoh |
|---|---|---|---|
| domain | Rentetan (3-60) | Nama domain | example.com |
| type | Rentetan | DNS recataud type (A, MX, CNAME, TXT, etc.) | A |
| host | Rentetan | Host name fatau the DNS recataud | www |
| value | Rentetan | DNS recataud value | 192.168.1.1 |
| pri | Integer (Pilihan) | Priatauity value (used fatau MX dan SRV recatauds) | 20 |
Parameter respons
| Nama parameter | Jenis | Huraikan |
|---|---|---|
| id | Integer | DNS recataud ID |
| type | Rentetan | DNS recataud type (A, MX, CNAME, TXT, etc.) |
| host | Rentetan | Host name |
| value | Rentetan | DNS recataud value |
| ttl | Integer | Time to live in seconds |
| pri | Integer | Priatauity (fatau MX recatauds) |
Contoh Permintaan
{
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"
}
Hasil Pulangan
0 OK
Respons berjaya
{
"code": 0,
"msg" : "success",
"data" : {
{
"id": 12345,
"type": "A",
"host": "@",
"value": "192.168.1.1",
"ttl": 3600,
"pri": 0
}
}
}
400 Permintaan tidak sah
{
"code": 400,
"msg" : "Request parameter error",
}






