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.



Name Description
Action domain/add
Required value domain_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.



Name Description
Action domain/remove
Required value domain_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.



Name Description
Action domain/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.



Name Description
Action record/add
Required value domain_name=(valid_domain), sub_domain=(valid_subdomain), record_type=(DNS Type: A,AAAA. MX, etc), address=(valid IP address)
Optional Value ttl=(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.



Name Description
Action record/delete
Required value recordid=(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.



Name Description
Action record/list
Required value domain_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

Posted in   product_configuration   API     by noc_team

Improve Your Websites Speed and Security