Skip to content

Zone file

All operations require authentication.

3 operationsv1/domain/zone
View as Markdown (opens in a new tab)
Agent setupPrevious console (opens in a new tab)

Export the zoneProduction

GET
/v1/domain/zone/{zoneName}/export

Returns the zone content as a zone file.

IAM actions

dnsZone:apiovh:export/getrequired—

Path parameters

zoneName
required
string

Zone name

Response

200stringsuccessful operation

Example uses zoneName = string

$ curl https://api.eu.ovhcloud.com/v1/domain/zone/{zoneName}/export \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
"string"

Import a zone fileProduction

POST
/v1/domain/zone/{zoneName}/import

Imports a zone file into the zone and returns the task.

IAM actions

dnsZone:apiovh:importrequired—

Path parameters

zoneName
required
string

Zone name

Request body (required)

zoneFile
required
string

Zone file that will be imported

Response

200Tasksuccessful operation
canAccelerate
read-only
boolean

Can accelerate the task

canCancel
read-only
boolean

Can cancel the task

canRelaunch
read-only
boolean

Can relaunch the task

comment
read-only
string

Comment about the task

creationDate
read-only
stringdate-time

Creation date of the task

doneDate
read-only
stringdate-time

Done date of the task

function
read-only
TaskFunctionEnum

Function of the task

ValuesDnsAnycastActivateDnsAnycastDeactivateDnssecDisableDnssecEnableDnssecResigningDnssecRollKskDnssecRollZskZoneCheckZoneCreateZoneCutZoneDeleteZoneImportZoneRefreshZoneRestore
id
read-only
integer

Id of the task

lastUpdate
read-only
stringdate-time

Last update date of the task

status
read-only
TaskStatusEnum

Status of the task

Valuescancelleddoingdoneerrorproblemtodo
todoDate
read-only
stringdate-time

Todo date of the task

Example uses zoneName = string

$ curl https://api.eu.ovhcloud.com/v1/domain/zone/{zoneName}/import \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "canAccelerate": true, "canCancel": true, "canRelaunch": true, "comment": "string", "creationDate": "2024-01-01T12:00:00Z", "doneDate": "2024-01-01T12:00:00Z", "function": "DnsAnycastActivate", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "status": "cancelled", "todoDate": "2024-01-01T12:00:00Z"}

Reset the zoneProduction

POST
/v1/domain/zone/{zoneName}/reset

Resets the zone, optionally with the records to set afterward. With minimized, only the mandatory records are created.

IAM actions

dnsZone:apiovh:resetrequired—

Path parameters

zoneName
required
string

Zone name

Request body (required)

DnsRecords
ResetRecord[]

Records that will be set after reset

minimized
boolean

Create only mandatory records

Response

200—successful operation

Example uses zoneName = string

$ curl https://api.eu.ovhcloud.com/v1/domain/zone/{zoneName}/reset \
  -H "authorization: Bearer $OVH_TOKEN"