1. Home
  2. Product Features
  3. Authoritative DNS
  4. Getting Started w/NOC API – Authoritative DNS
  1. Home
  2. Getting Started
  3. Getting Started w/NOC API – Authoritative DNS

Getting Started w/NOC API – Authoritative DNS

The NOC API exposes the entire Cloudflare infrastructure via a standardized programmatic interface. Using the NOC API you can update and manipulate most of the dashboard settings.

The NOC API is a RESTful API based on HTTPS requests and JSON responses. If you are registered with NOC, you can obtain your API key from the DNS API Access page.

Endpoints

The API is accessed by making HTTPS requests to a specific version endpoint URL, in which the GET methods dictates how to interact with the information available. Every endpoint is accessed only via the SSL-enabled HTTPS (port 443) protocol.

The stable base URL for the endpoint is:

https://my.noc.org/api

All API requests must included in the API call. The API key is provided via the DNS API Access page.

Example of how it will work:https://my.noc.org/api?apikey=[api_key]


Domain/Add

Adds a new domain to your NOC DNS Account.

NameDescription
Actiondomain/add
Required valuedomain_name=(valid_domain_name)
Results:{“status” = “success”};
In case of error:{“status”:”failed”, “reason”:”reason why”}

Example URL:

https://my.noc.org/api?apikey=[api_key]9&action=domain/add&domain_name=

Domain/Remove

Deletes a domain from your account. You need to remove all DNS records before this action is authorized.

NameDescription
Actiondomain/remove
Required valuedomain_name=(valid_domain_name)
Results:{“status” = “success”};
In case of error:{“status”:”failed”, “reason”:”reason why”}

Example URL:

https://my.noc.org/api?apikey=[api_key]&action=domain/remove&domain_name=

Domain/list

List all domains in your account.

NameDescription
Actiondomain/list
Results:{“status”:”success”,”domains”:[“mytestdomain.com”,”globo.com”]}
In case of error:{“status”:”failed”, “reason”:”reason why”}

Example URL:

https://my.noc.org/api?apikey=[api_key]&action=domain/list&domain_name=

Record/Add

Adds a new DNS record.

NameDescription
Actionrecord/add
Required valuedomain_name=(valid_domain), sub_domain=(valid_subdomain), record_type=(DNS Type: A,AAAA. MX, etc), address=(valid IP address)
Optional Valuettl=(DNS TTL), default to 3600 seconds when not provided.
Results:{“status” = “success”};
In case of error:{“status”:”failed”, “reason”:”reason why”}

Example URL:

https://my.noc.org/api?apikey=[api_key]&action=record/add&domain_name=domain.com&sub_domain=www&ttl=120&record_type=A&address=192.168.1.1

Record/Delete

Deletes a DNS record.

NameDescription
Actionrecord/delete
Required valuerecordid=(Domain record), domain_name=(valid_domain), sub_domain=(valid_subdomain)
Results:{“status” = “success”};
In case of error:{“status”:”failed”, “reason”:”reason why”}

Example URL:

https://my.noc.org/api?apikey=[api_key]&action=record/delete&domain_name=domain.com&recordid=X&sub_domain=SUBDOMAIN

Record/list

List all DNS records for a specific domain name.

NameDescription
Actionrecord/list
Required valuedomain_name=(valid_domain_name) or “all”
In case of error:{“status”:”failed”, “reason”:”reason why”}

Example URL:

https://my.noc.org/api?apikey=[api_key]&action=records/list&domain_name=domain.com
Updated on December 27, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Email: support@noc.org

Leave a Comment