This document provides details on the endpoints available for managing records within the system. These endpoints facilitate operations such as fetching records, creating new records, updating record information, and deleting records.
1. Update Records
PUT /api/v1/records/{recordUuid}
Updates existing records.
Example Request Body:
Copy {
"name" : "Name Update" ,
"value" : "Value Update" ,
"ttl" : 3300
}
Response:
Copy {
"timestamp" : "2024-08-21T11:55:34.303687703" ,
"data" : {
"uuid" : "000200ad-54eb-4fbb-9742-1a4ad4e43bdd" ,
"type" : "SOA" ,
"name" : "Name Update" ,
"value" : "Value Update" ,
"ttl" : 3300 ,
"priority" : 0 ,
"serial" : 0 ,
"refresh" : 0 ,
"retry" : 0 ,
"expire" : 0 ,
"version" : "Version" ,
"mname" : "MName" ,
"rname" : "RName" ,
"zoneUuid" : "381cc903-d838-4e63-b113-e271d57ef2dc"
}
}
2. Create New Records
POST /api/v1/records?zone={zone_uuid}
Creates new records within a specific zone identified by its UUID.
Example Request Body:
Copy [
{
"type" : "NS" ,
"name" : "test.ch" ,
"value" : "ns2.test.ch"
}
]
Response:
Copy {
"timestamp" : "2024-04-08T13:53:57.410035779" ,
"size" : 1 ,
"data" : [
{
"uuid" : "765f81b6-3107-4305-9564-bf373ae89001" ,
"type" : "NS" ,
"name" : "test.ch" ,
"value" : "ns2.test.ch" ,
"zoneUuid" : "000186ee-0d4a-410b-9e5a-5f6782881ceb"
}
]
}
Record types:
Copy A,
AAAA,
MX,
CNAME,
NS,
SOA,
TXT,
PTR,
TOKEN,
PROFILE,
LINK,
OTHER
3. Fetch Record by UUID
GET /api/v1/records/{record_uuid}
Fetches a record by its UUID.
Response:
Copy {
"timestamp" : "2024-04-08T10:15:18.761587107" ,
"data" : {
"uuid" : "00002c83-280a-43f7-9874-ee9076cb6275" ,
"type" : "SOA" ,
"name" : "fffffff.com" ,
"value" : "ns1.fffffff.com hostmaster.fffffff.com 2024030601 3600 600 1209600 86400" ,
"zoneUuid" : "456548cb-f94f-4b64-8948-7a4b553a80d7" ,
"ttl" : 3300 ,
"serial" : 2024030601 ,
"refresh" : 3600 ,
"retry" : 600 ,
"expire" : 1209600 ,
"version" : "1.0" ,
"mname" : "ns1.fffffff.com" ,
"rname" : "hostmaster.fffffff.com"
}
}
4. Delete Record
DELETE /api/v1/records/{record_uuid}
Deletes a record by its UUID.
Example Response:
Last updated 3 months ago