In the REST API examples, HTTP requests are defined as raw HTTP. For example:
POST /v2/zones HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"name": "example.org.",
"email": "hostmaster@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": "example.org.", "email": "hostmaster@example.org"}' \
http://localhost:9001/v2/zones
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.
These headers work for all APIs
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.