designate/doc/source/rest/v2/reverse.rst
Endre Karlson 48ffb89c64 Add FloatingIPs reverse endpoint
Closes-Bug: #1522519
Change-Id: I93c194bc1a8585c676165cb1c49eb9ae4441c8ec
2016-01-11 11:03:36 +01:00

6.9 KiB

Currently the /reverse endpoint is used to tie reverse DNS records to IPs.

FloatingIPs

In order to use the FloatingIPs functionality you will need to have a FloatingIP associated to your project in Neutron.

Set FloatingIP's PTR record

Set a PTR record for the given FloatingIP. The domain if it does not exist will be provisioned automatically.

Example request:

POST /reverse/floatingips/RegionOne:c47229fb-0831-4b55-a5b5-380d361be4bd HTTP/1.1
Host: example.com
Accept: application/json
Content-Type: application/json

{
  "ptrdname" : "smtp.example.com.",
  "description" : "This is a floating ip for 10.0.0.1",
  "ttl": 600
}

Example response:

HTTP/1.1 202 Created
Content-Type: application/json; charset=UTF-8
Location: http://example.com:9001/v2/reverse/floatingips/RegionOne:c47229fb-0831-4b55-a5b5-380d361be4bd

{
    "ptrdname": "smtp.example.com.",
    "ttl": 600,
    "description":"This is a floating ip for 172.24.4.3",
    "address": "172.24.4.3",
    "action": "CREATE",
    "status": "PENDING",
    "links":{
        "self":"http://example.com:9001/v2/reverse/floatingips/RegionOne:c47229fb-0831-4b55-a5b5-380d361be4bd"
    },
    "pattern":"smtp.example.com.",
    "created_at":"2014-03-11T21:54:57.000000",
    "updated_at":null,
    "id":"RegionOne:c47229fb-0831-4b55-a5b5-380d361be4bd",
}
form created_at

timestamp

form updated_at

timestamp

form ptrdname

Hostname

form ttl

Time to live

form address

The FloatingIP address

form id

A combination of the Region and FloatingIP ID

form description

UTF-8 text field

form links

links to traverse the list

form action

Provisioning Action

form status

Provisioning Status

statuscode 202

Created

statuscode 401

Access Denied

statuscode 400

Invalid Object

statuscode 404

FloatingIP / PTR Not found

Get a FloatingIP's PTR record

Shows a particular FloatingIP PTR

Example request:

GET /reverse/floatingips/RegionOne:c47229fb-0831-4b55-a5b5-380d361be4bd HTTP/1.1
Host: example.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8

{
    "ptrdname": "smtp.example.com.",
    "ttl": 600,
    "description":"This is a floating ip for 172.24.4.3",
    "address": "172.24.4.3",
    "action": "NONE",
    "status": "ACTIVE",
    "links":{
        "self":"http://example.com:9001/v2/reverse/floatingips/RegionOne:c47229fb-0831-4b55-a5b5-380d361be4bd"
    },
    "pattern":"smtp.example.com.",
    "created_at":"2014-03-11T21:54:57.000000",
    "updated_at":null,
    "id":"RegionOne:c47229fb-0831-4b55-a5b5-380d361be4bd",
}
form created_at

timestamp

form updated_at

timestamp

form ptrdname

Hostname

form ttl

Time to live

form address

The FloatingIP address

form id

A combination of the Region and FloatingIP ID

form description

UTF-8 text field

form links

links to traverse the list

form action

Provisioning Action

form status

Provisioning Status

statuscode 200

OK

statuscode 404

FloatingIP or PTR not found not found

List FloatingIP PTR records

Lists all FloatingIPs PTR records

Example request:

GET /reverse/floatingips/ HTTP/1.1
Host: example.com
Accept: application/json

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8

{
  "floatingips":[
    {
        "ttl": 600,
        "ptrdname": "smtp.example.com.",
        "description":"This is a floating ip for 172.24.4.3",
        "address": "172.24.4.3",
        "action": "NONE",
        "status": "ACTIVE",
        "links":{
            "self":"http://example.com:9001/v2/reverse/floatingips/RegionOne:c47229fb-0831-4b55-a5b5-380d361be4bd"
        },
        "pattern":"smtp.example.com.",
        "created_at":"2014-03-11T21:54:57.000000",
        "updated_at":null,
        "id":"RegionOne:c47229fb-0831-4b55-a5b5-380d361be4bd",
    },
    {
        "ptrdname": "www.example.com.",
        "ttl": 600,
        "description":"This is a floating ip for 172.24.4.4",
        "address": "172.24.4.4",
        "action": "NONE",
        "status": "ACTIVE",
        "links":{
            "self":"http://example.com:9001/v2/reverse/floatingips/RegionOne:c47229fb-0831-4b55-a5b5-380d361be4be"
        },
        "pattern":"smtp.example.com.",
        "created_at":"2014-03-11T21:54:57.000000",
        "updated_at":null,
        "id":"RegionOne:c47229fb-0831-4b55-a5b5-380d361be4be",
    }
  ],
  "links":{
    "self":"http://127.0.0.1:9001/v2/tlds"
  }
}
form created_at

timestamp

form updated_at

timestamp

form name

tld name

form id

uuid

form description

UTF-8 text field

form links

links to traverse the list

statuscode 200

OK

statuscode 401

Access Denied

Unset the PTR record for a FloatingIP

Unset a PTR record for the given FloatingIP.

Example request:

PATCH /reverse/floatingips/RegionOne:c47229fb-0831-4b55-a5b5-380d361be4bd HTTP/1.1
Host: example.com
Accept: application/json
Content-Type: application/json

{
  "ptrdname" : null,
}
statuscode 202

Pending

statuscode 401

Access Denied

statuscode 400

Invalid Object

statuscode 404

FloatingIP / PTR Not found