REST API Documentation

Intro

In the REST API examples, HTTP requests are defined as raw HTTP. For example:

POST /v2/pools HTTP/1.1          # The HTTP Method, Path and HTTP Version
Accept: application/json         # Headers
Content-Type: application/json

{                                # The rest is the body of request
  "pool": {
    "name": "Example Pool",
    "nameservers": [
      "ns1.example.org."
    ]
  }
}

With this info we can make this request using the cURL tool. We’ll assume we are running Designate on localhost.

curl -X POST -i \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '{"name": "ns1.example.org."}' \
     http://localhost:9001/v1/servers

The -i flag is used to dump the response headers as well as the response body.

The cURL tool is extremely robust. Please take a look at the cURL tutorial for more info.

Incubated Project

Table Of Contents

Previous topic

Configuration Options

Next topic

Servers

This Page