อัปเดตระเบียน DNS
อัปเดตระเบียน DNS ที่มีอยู่ตาม ID
Content-Type
application/json
หมวดหมู่
dns
action
update_record
พารามิเตอร์คำขอ
| ชื่อพารามิเตอร์ | ประเภท | คำอธิบาย | ตัวอย่าง |
|---|---|---|---|
| domain | String (3-60) | ชื่อโดเมน | example.com |
| id | Integer | รหัสระเบียน DNS ที่จะอัปเดต | 12345 |
| value | String | ค่าระเบียน DNS ใหม่ | 192.168.1.2 |
| pri | Integer (Optional) | ค่าความสำคัญใหม่ (ใช้สำหรับระเบียน MX และ SRV) | 20 |
พารามิเตอร์การตอบกลับ
| ชื่อพารามิเตอร์ | ประเภท | คำอธิบาย |
|---|---|---|
| id | Integer | รหัสระเบียน DNS |
ตัวอย่างคำขอ
{
curl https://api.nicenic.net/v2/?category=dns&action=update_record&domain={domain}&id={id}&value={value}&pri={pri}
-H "Authorization: username:api_secret"
-H "Content-Type: application/json"
}
ผลลัพธ์ที่ส่งกลับ
0 OK การตอบกลับที่สำเร็จ
{
"code": 0,
"msg" : "success",
"data" : {
{
"id": 12345
}
}
}
400 คำขอไม่ถูกต้อง
{
"code": 400,
"msg" : "Request parameter error",
}






