E etsa libaka tsa DNS le ho laola li-records tsa bona. Li-zones li sebelisitsoeng ke ns1.vps.org, ns2.vps.org le ns3.vps.org.
Setereke se na le li-records bakeng sa sebaka se le seng. Ho fetoha hohle ho etsang ka API ho tlatsoa ho VPS.org nameservers kapele. Ho fana ka sebaka sa marang-rang ho tloha libakeng tsena, beha li-nameservers tsa eona ho ngolisi ea hau ho ns1.vps.org, ns2.vps.org le ns3.vps.org.
Liphetoho li bolokiloe'me li phatlalatsoa ka tsela e le' ngoe: haeba li-server tsa lebitso li sa lumele ho fetoha, kopo e khutlisa 502'me ha ho na ntho e bolokiloe. Setereke ha se ka etsoa bakeng sa domain e hokahantsoeng le akhawunti e' ngoe, e leng mohlokomeli kapa ngoana oa akaunti e' ngoe, kapa lebitso le bolokiloe VPS.org.
Litokelo li hlokahale:
dns:list (GET), dns:create (POST), dns:update (PUT, PATCH, sync), dns:delete (DELETE), dns:*
E khutlisa libaka tsa hau, tse ncha pele, 25 ka leqephe. Li-records ha li kenyeletsoe mona; fumana sebaka se le seng ho li fumana.
| Parameter | Mofuta | E hlokahala | Bophara |
|---|---|---|---|
domain |
string | Ha ho joalo | E-ba le sebaka se nang le lebitso la domain ena feela |
page |
integer | Ha ho joalo | Page number, starting at 1 |
curl -X GET "https://admin.vps.org/api/v1/dns-zones/?domain=example.com" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
url = "https://admin.vps.org/api/v1/dns-zones/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
response = requests.get(url, headers=headers, params={"domain": "example.com"})
for zone in response.json()["results"]:
print(zone["uuid"], zone["domain"], zone["record_count"])
const response = await fetch('https://admin.vps.org/api/v1/dns-zones/?domain=example.com', {
headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' }
});
const data = await response.json();
console.log(data.results);
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "c7a1e3f0-2b4d-4e6a-9c8b-0d1f2e3a4b5c",
"domain": "example.com",
"created_at": "2026-09-06T03:11:48.829693Z",
"record_count": 5
}
]
}
| Setereke | Mofuta | Bophara |
|---|---|---|
uuid |
string | Mokhatlo oa li-ID |
domain |
string | Lebitso la domain, le bolokiloe ka li-letters tse nyane |
created_at |
datetime | Nako ea ho theha (ISO 8601, UTC) |
record_count |
integer | Lipalo tsa li-records sebakeng, ho kenyeletsoa le li-records tsa NS tse tharo |
| 200 | Bophelo bo botle |
| 403 | Token ea API e sa nepahalang kapa e sa fumaneheng, kapa token e na le litokelo tse hlokahalang |
E etsa sebaka'me e phatlalatsa. Sebaka se qala ka li-records tsa NS tse tharo bakeng sa ns1, ns2 le ns3.vps.org, tse leng li-records tsa sistimi mme ha li ka hlophisoa kapa ho tlosoa.
| Parameter | Mofuta | E hlokahala | Bophara |
|---|---|---|---|
domain |
string | E | Lebitso la domain, mohlala example.com |
curl -X POST "https://admin.vps.org/api/v1/dns-zones/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}'
{
"uuid": "c7a1e3f0-2b4d-4e6a-9c8b-0d1f2e3a4b5c",
"domain": "example.com",
"created_at": "2026-09-14T21:02:11.402113Z",
"records": [
{
"uuid": "1f2e3d4c-5b6a-4978-8a9b-0c1d2e3f4a5b",
"record_type": "NS",
"name": "@",
"value": "ns1.vps.org",
"ttl": 86400,
"priority": null,
"created_at": "2026-09-14"
},
...
],
"record_count": 3
}
| 201 | E entsoe |
| 400 | Lebitso la domain le sa nepahale kapa le sa fumaneha |
E khutlisa sebaka se le seng le li-records tsohle tsa eona ka array ea li-records. Likarabo li na le sebopeho se tšoanang le ho theha likarabo ka holimo.
curl -X GET "https://admin.vps.org/api/v1/dns-zones/c7a1e3f0-2b4d-4e6a-9c8b-0d1f2e3a4b5c/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
| 200 | Bophelo bo botle |
| 404 | Ha e fumanehe, kapa e na le akhaonto e 'ngoe |
E tlosa sebaka ho tloha liserver tsa lebitso tse tharo, e hlahloba hore na ha ho na e 'ngoe ea tsona e ntse tšebeletsoa, ebe e tlosa sebaka le li-records tsa eona. Haeba server ea lebitso e ntse e araba bakeng sa sebaka, kopo e hloleha' me sebaka se bolokiloe hore u ka e leka hape.
curl -X DELETE "https://admin.vps.org/api/v1/dns-zones/c7a1e3f0-2b4d-4e6a-9c8b-0d1f2e3a4b5c/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
| 204 | E tlositsoe. Likarabo ha li na'mele. |
| 400 | Motsamaisi oa lebitso o ntse a sebetsana le sebaka. Sebaka ha sea tlosoa; sebaka sa lintlha tse khuts'oane se bonts'a liphoso. |
| 404 | Ha e fumanehe, kapa e na le akhaonto e 'ngoe |
GET e khutlisa li-records tsohle libakeng tse kang li-array tse tloaelehileng (ha li na li-page), tse hlophisitsoeng ka mofuta le lebitso. POST e eketsa li-records libakeng'me e li phatlalatsa.
| Parameter | Mofuta | E hlokahala | Bophara |
|---|---|---|---|
record_type |
string | E | A, AAAA, CNAME, MX, NS, TXT, SRV, PTR, SOA, CAA |
name |
string | E | @ bakeng sa domain ea eona, kapa letšoao joalo ka www. Linama li bolokiloe ka li- letters tse nyane. |
value |
string | E | Data ea ho ngola, e kang aterese ea IP kapa lebitso la mohala. Linama tsa mohala ha li hloke qeto e latelang'me lipalo tsa TXT ha li hloke li-quotation; li tla etsoa ka bobeli ha ho ngola ho phatlalatsoa. |
ttl |
integer | E | Nako ea ho phela ka metsotsoana |
priority |
integer | MX le SRV feela | E hlokahala bakeng sa MX le SRV li-records'me e sa tsotellehe bakeng sa mefuta e meng. Bakeng sa SRV, beha boima, port le sepheo ka moputso. |
curl -X POST "https://admin.vps.org/api/v1/dns-zones/c7a1e3f0-2b4d-4e6a-9c8b-0d1f2e3a4b5c/records/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"record_type": "MX", "name": "@", "value": "mail.example.com", "ttl": 3600, "priority": 10}'
import requests
zone_uuid = "c7a1e3f0-2b4d-4e6a-9c8b-0d1f2e3a4b5c"
url = f"https://admin.vps.org/api/v1/dns-zones/{zone_uuid}/records/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
data = {"record_type": "A", "name": "www", "value": "203.0.113.10", "ttl": 3600}
response = requests.post(url, headers=headers, json=data)
print(response.status_code, response.json())
{
"uuid": "9d430082-5562-42b4-a0b2-12a6f6c862f9",
"record_type": "MX",
"name": "@",
"value": "mail.example.com",
"ttl": 3600,
"priority": 10,
"created_at": "2026-09-14"
}
| Setereke | Mofuta | Bophara |
|---|---|---|
uuid |
string | Mokhatlo oa ho tšoaea li-record, o sebelisoang ke /api/v1/dns-records/ endpoints |
priority |
integer | null | Bohlokoa ba li-records tsa MX le SRV, haeba e le null |
created_at |
date | Letsatsi la ho theha feela (Y-MM-DD), ntle le nako |
| 200 | GET: li-records tsa sebaka |
| 201 | POST: rekoto e entsoe |
| 400 | Phapang ea ho nepahala, mohlala, mofuta oa rekoto o sa tsejoeng, ttl e sa fumaneheng, kapa MX kapa SRV rekoto e se nang boikarabello |
| 404 | Ha e fumanehe, kapa e na le akhaonto e 'ngoe |
E tlatsa sebaka le li-records tsohle tsa eona ho li-server tsa lebitso hape. Liphetoho tsa li-record li phatlalatsoa ka ho toba, empa ho phatlalatsoa ke ho etsa liteko tse ntle ka ho fetisisa'me ho hloleha ha ho hloleha ho hloka hore ho be le kopo ea pele, ka hona sebelisa sena ha ho na ho fetoha ho hlaha ho DNS ho batla. Ha ho hlokahale ho hlokahala.
curl -X POST "https://admin.vps.org/api/v1/dns-zones/c7a1e3f0-2b4d-4e6a-9c8b-0d1f2e3a4b5c/sync/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
{
"detail": "Zone example.com synced to PowerDNS"
}
GET e khutlisa li-records tsa libaka tsohle tsa hau, 25 ka leqephe, tse hlophisitsoeng ka domain, mofuta le lebitso. POST e etsa lengolo-tsoibila joaloka li-records tsa sebaka sa ho qetela, empa e nka sebaka sa'mele e le zone_uuid.
| Parameter | Mofuta | E hlokahala | Bophara |
|---|---|---|---|
zone |
string | Ha ho joalo | Li-records tsa sebaka feela ka uuid ena |
record_type |
string | Ha ho joalo | Rekoto ea mofuta ona feela, mohlala MX (lebokose le sa tsejoeng) |
page |
integer | Ha ho joalo | Page number, starting at 1 |
curl -X GET "https://admin.vps.org/api/v1/dns-records/?zone=c7a1e3f0-2b4d-4e6a-9c8b-0d1f2e3a4b5c&record_type=A" \
-H "Authorization: Bearer YOUR_API_TOKEN"
curl -X POST "https://admin.vps.org/api/v1/dns-records/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"zone_uuid": "c7a1e3f0-2b4d-4e6a-9c8b-0d1f2e3a4b5c", "record_type": "TXT", "name": "@", "value": "v=spf1 mx -all", "ttl": 3600}'
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "4b8e2c10-7d3f-4a5b-9e6c-1a2b3c4d5e6f",
"record_type": "A",
"name": "www",
"value": "203.0.113.10",
"ttl": 3600,
"priority": null,
"created_at": "2026-09-14"
}
]
}
| 200 | GET: katleho |
| 201 | POST: rekoto e entsoe |
| 400 | Phapang ea ho nepahala, kapa zone_uuid e sa fumanehe kapa e se e 'ngoe ea libaka tsa hau |
GET e khutlisa lifaele tse leshome. PUT e e fetola'me e hloka record_type, name, value le ttl. PATCH e fetola feela libaka tseo u li romellang. DELETE e tlosa lifaele'me e khutlisa 204 ntle le'mele. Liphetoho li phatlalatsoa kapele. Lifaele tsa NS tse hlahisoang le sebaka ke lifaele tsa sistimi: ho nchafatsa kapa ho li tlosa ho khutlisa 403.
curl -X PATCH "https://admin.vps.org/api/v1/dns-records/4b8e2c10-7d3f-4a5b-9e6c-1a2b3c4d5e6f/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ttl": 300}'
| 200 | GET, PUT kapa PATCH: rekoto |
| 204 | E tlositsoe. Likarabo ha li na'mele. |
| 400 | Ho nepahala ha ho nepahala |
| 403 | Rekoto ke rekoto ea sistimi, kapa token e na le litokelo tse hlokahalang |
| 404 | Ha e fumanehe, kapa e na le akhaonto e 'ngoe |
Liphoso tsa ho nepahala li khutlisa 400 le bothata bo tšoauoang ka lebitso la sebaka:
{
"priority": ["MX records require a priority value"]
}
Qhaola li-server tsa lebitso la VPS.org ka kotloloho ho netefatsa hore ho fetoha ho phela pele ho ngoliso ea hau ea ngoliso kapa cache ea resolver e fumana:
dig @ns1.vps.org example.com A
dig @ns2.vps.org example.com MX
dig @ns3.vps.org www.example.com