This is a series of articles dedicated to demonstrating how to get acquainted with Openprovider DNS Zones API methods.
This is a first article in a series in which we are going to cover DNS zone creation. To get more information about our API in general, please use our documentation portal as your reference.
While being a domain registrar Openprovider also provides DNS hosting for which we have an extensive API.
Zones represent the DNS zone for a domain. Each domain usually have a zone, however zones may also exist without a domain. Zones have at least 1 (but oftentimes more) records. All zones represent a combination of system records, which are records that are created automatically by us, such as SOA and NS records, as well as custom records, which are records created by users.
Once you have an Openprovider account you can use the Zones API methods which will allow you to list records for a zone, as well as add, edit, and remove zone records.
However, first things first. Let's focus on creating a zone as our starting point.
|domain||string||Required. name of a zone (domain name)|
|type||string||Required. master or slave|
|master_ip||string||Optional. required for type = slave|
|records||array of data||Required for master zones|
|is_spamexpert_enabled||boolean||Optional. Enable SE subscription for a zone|
|secured||boolean||Optional. Enable DNSSEC|
curl -X POST \
-H 'Authorization: ,Bearer 2831a37fb8*******90b5aac822' \
-H 'Content-Type: application/json' \
"value": "test value 0"
"value": "test value 1"
Once you have decided on the records that your zone should store(or the absence of the latter), you can use our API endpoint,
api.openprovider.eu, to send a request.
The 0 code that we received indicates that the zone has been successfully created.
Now let's try to retrieve it from the API to make sure of that and change some of its records.