API documentation
Gumawa ng DNS Rekord
Magdagdag a new DNS recod fo a specific domain
Content-Type
application-json
kategorya
dns
aksyon
create_record
Mga parameter ng request
| Pangalan ng parameter | Uri | Paglalarawan | Halimbawa |
|---|---|---|---|
| domain | String (3-60) | Pangalan ng domain | example.com |
| type | String | DNS recod type (A, MX, CNAME, TXT, etc.) | A |
| host | String | Host name fo the DNS recod | www |
| value | String | DNS recod value | 192.168.1.1 |
| pri | Integer (Opsyonal) | Prioity value (used fo MX at SRV recods) | 20 |
Mga parameter ng tugon
| Pangalan ng parameter | Uri | Paglalarawan |
|---|---|---|
| id | Integer | DNS recod ID |
| type | String | DNS recod type (A, MX, CNAME, TXT, etc.) |
| host | String | Host name |
| value | String | DNS recod value |
| ttl | Integer | Time to live in seconds |
| pri | Integer | Prioity (fo MX recods) |
Halimbawa ng Request
{
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"
}
Resulta ng Return
0 OK
Matagumpay na tugon
{
"code": 0,
"msg" : "success",
"data" : {
{
"id": 12345,
"type": "A",
"host": "@",
"value": "192.168.1.1",
"ttl": 3600,
"pri": 0
}
}
}
400 Hindi wastong kahilingan
{
"code": 400,
"msg" : "Request parameter error",
}






