Vous êtes sur la page 1sur 3

REST API v1.

1 | Managed DNS Documentation | Support | Zerigo

http://www.zerigo.com/docs/apis/dns/1.1/single_page

(/)

Services:

Cloud VPS (/vps-servers)

Managed DNS (/managed-dns) Blog (/blog) Support (/support)

Watchdog (/watchdog) Manage Account (https://manage.zerigo.com/accounts)

Contact Us (/contact)

(/) Now part of

1 of 3

4/21/2012 1:20 PM

REST API v1.1 | Managed DNS Documentation | Support | Zerigo

http://www.zerigo.com/docs/apis/dns/1.1/single_page

REST API v1.1 - Managed DNS


Accounts/Billing (/docs/general)

DNS (/docs/managed-dns)

Servers (/docs/vps-servers)

Watchdog (/docs/watchdog)

Managed DNS - REST API v1.1


Introduction and Overview (/docs/apis/dns/1.1)
Zerigo DNS supports a fairly standard REST API for full creation, modification, and deletion of domain (zone) and host records. It is easy and straightforward to work with. Note that in the context of the API, domains are always referred to as zones. Zones (domains), hosts, zone templates (templates), and host templates (hosts for zone templates) are all supported.

API status
This is the current version of the API. All new development should use this version. Additionally, users of an older version of the API should plan to upgrade to the latest version. See the documentation for the older versions for sunset dates.

REST API Basics


REST runs on top of HTTP. It uses standard GET, POST, PUT, and DELETE methods for HTTP along with XML document bodies. Authentication is sent as an HTTP basic auth header.

Authentication
Authentication for all API requests is done via a standard Basic HTTP Auth header. The username is your email address and the password is the dynamic update token available in Manage Account DNS Preferences. You must enable dynamic updates to use the API.

Content types
A Content-Type header is required for all POST or PUT requests. If your content is sent as XML (recommended), you must send Content-Type: application/xml. All examples within our documentation are XML and must use the application/xml mime-type. A Content-Type header should not be sent with GET or DELETE requests. You may also send standard web-form content with the application/x-www-form-urlencoded mime-type. Parameters should be translated like this: <zone><domain>example.com</domain> <ns-type>pri_sec</ns-type></zone> becomes zone[domain]=example.com& zone[ns_type]=pri_sec. Note that ns-type became ns_type. The rule is this: use hyphens for XML node names and use underscores for web-form content or URL query parameters. If your HTTP client cannot send PUT and DELETE verbs, you may substitute the parameter _method=put along with a POST request. This only works for web-form content and the _method parameter must be in the POST body, not in the query string. It is recommended that you use an HTTP client capable of using PUT and DELETE verbs.

HTTP Request Specifics


The URL endpoint for this API is http://ns.zerigo.com/api/1.1/. https is supported. The HTTP status code in the response is an important part of the API. Where possible we attempt to indicate results by way of the status code. At times the status code is sufficient to communicate the entire response and the body of the response will be blank. Common response codes are: 200 201 401 403 404 405 OK Created Credentials required Forbidden (Credentials understood but not acceptable for this request) Not found (The requested object was not found) Method not allowed (Probably a mixup between GET, POST, PUT, and DELETE)

2 of 3

4/21/2012 1:20 PM

REST API v1.1 | Managed DNS Documentation | Support | Zerigo

http://www.zerigo.com/docs/apis/dns/1.1/single_page

Cloud VPS
Overview (/vps-servers/) Features (/vps-servers/features) Specs (/vps-servers/technical_specs) FAQ/Support (/vps-servers/q_and_a) Plans and Pricing (/vps-servers /pricing) Cloud VPS API (/docs/vps-servers) Cloud VPS Support Documentation (/docs/vps-servers)

DNS
Overview (/managed-dns/) Features (/managed-dns/features) Specs (/manageddns/technical_specs) FAQ/Support (/manageddns/q_and_a) Plans and Pricing (/manageddns/pricing) Managed DNS API (/docs /managed-dns) DNS Support Documentation (/docs /managed-dns)

Watchdog
Overview (/watchdog/) Features (/watchdog/features) Specs (/watchdog/technical_specs) FAQ/Support (/watchdog/q_and_a) Plans and Pricing (/watchdog#pricing) Watchdog Support Documentation (/docs/watchdog)

Support
Support Docs (/support) Contact Us (/contact) Accounts and Billing (/docs/general) Terms of Service (/terms) Service Level Agreements (/sla)

Copyright 2012 Zerigo, Inc., an 8x8 (http://www.8x8.com/) company; all rights reserved. Terms of service (/terms).

3 of 3

4/21/2012 1:20 PM

Vous aimerez peut-être aussi