DNS Zones
The DNS zones' endpoints allow you to list and view DNS zones on your account. A DNS zone houses DNS records for a domain on your account. On this page, we'll dive into the different zone endpoints you can use to manage your DNS zones programmatically.
The zone model
The zone model contains all the information about a DNS zone on your ola.cv account.
Properties
- Name
id- Type
- string
- Description
Unique identifier for the zone.
- Name
name- Type
- string
- Description
The name of the DNS zone, it is typically the domain name.
- Name
status- Type
- string
- Description
Shows the activation status of the zone when using the default nameservers. Otherwise, it states whether you manage your own nameservers.
- Name
name_servers- Type
- array
- Description
An array of nameservers or authoritative DNS servers currently attached to the domain.
- Name
activated_at- Type
- timestamp
- Description
Timestamp of when the zone was activated.
- Name
created_at- Type
- timestamp
- Description
Timestamp of when the zone was created.
- Name
updated_at- Type
- timestamp
- Description
Timestamp of when the zone was last updated.
List all zones
This endpoint allows you to retrieve a paginated list of all your DNS zones. By default, a maximum of 20 zones are shown per page.
Optional attributes
- Name
page- Type
- integer
- Description
The page to retrieve zone records for.
- Name
per_page- Type
- integer
- Description
The number of records to retrieve per page.
Request
curl https://ola.cv/api/v1/zones \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json'
Response
{
"data": [
{
"id": "444576043220111360",
"name": "somedomain.cv",
"status": "active",
"name_servers": [
"brad.ns.cloudflare.com",
"coco.ns.cloudflare.com"
],
"activated_at": null,
"created_at": "2024-08-19T13:37:55.000000Z",
"updated_at": "2024-08-19T13:37:55.000000Z"
},
{
"id": "444507583383592960",
"name": "anotherdomain.cv",
"status": "self-managed",
"name_servers": [
"ns1.self.com",
"ns2.self.com"
],
"activated_at": "2024-08-15T16:53:30.000000Z",
"created_at": "2024-08-14T14:08:22.000000Z",
"updated_at": "2024-08-15T16:53:30.000000Z"
}
],
"meta": {
"current_page": 1,
"first_page_url": "https://ola.cv/api/v1/zones?page=1",
"next_page_url": null,
"path": "https://ola.cv/api/v1/zones",
"per_page": 20,
"prev_page_url": null,
},
"message": "DNS zones retrieved successfully."
}
Retrieve a zone
This endpoint allows you to retrieve a zone by providing the zone ID. Refer to the list at the top of this page to see which properties are included with zone objects.
Request
curl https://ola.cv/api/v1/zones/444576043220111360 \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json'
Response
{
"data": {
"id": "444576043220111360",
"name": "anotherdomain.cv",
"status": "active",
"name_servers": [
"brad.ns.cloudflare.com",
"coco.ns.cloudflare.com"
],
"activated_at": "2024-08-15T16:53:30.000000Z",
"created_at": "2024-08-14T14:08:22.000000Z",
"updated_at": "2024-08-15T16:53:30.000000Z"
},
"message": "DNS zne retrieved successfully."
}
Retrieve a domain zone
This endpoint allows you to retrieve a zone by providing the domain ID the zone belongs to. Refer to the list at the top of this page to see which properties are included with zone objects.
Request
curl https://ola.cv/api/v1/domains/437610729587142658/zone \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json'
Response
{
"data": {
"id": "444576043220111360",
"name": "anotherdomain.cv",
"status": "active",
"name_servers": [
"brad.ns.cloudflare.com",
"coco.ns.cloudflare.com"
],
"activated_at": "2024-08-15T16:53:30.000000Z",
"created_at": "2024-08-14T14:08:22.000000Z",
"updated_at": "2024-08-15T16:53:30.000000Z"
},
"message": "DNS zne retrieved successfully."
}