Dynamic DNS
(Difference between revisions)
Mike.robski (Talk | contribs) |
Mike.robski (Talk | contribs) |
Revision as of 11:04, 11 October 2013
Authentication
- HTTP Basic Auth with DDNS user and passwd
API list
PUT /ddns/clients/{client_key}
Create a client
Request body
{ "offline": false }
Response
- 201(+Location)
- 401
GET /ddns/clients/{client_key}
Get a client
Request body
Response
- 200
{ "offline": true "hosts": { "rel": "related", "href": "http://{api_server}/ddns/clients/{client_key}/hosts" } }
- 404
- 403
- 401
PUT /ddns/clients/{client_key}
Update a client
Request body
{ "offline": true }
Response
- 200
{ "offline": false, "hosts": { "href": "http://{api_server}/ddns/clients/{client_key}/hosts", "rel": "related" } }
- 404
- 403
- 401
GET /ddns/clients/{client_key}/hosts
Get all hosts
Request body
Response
- 200
{ "hosts": [ "hostname": "{hostname}" "ipAddress": "{ipaddr}" "links": [ { "rel": "self", "href": "http://{api_server}/ddns/clients/{client_key}/hosts/{hostname}" } ] ] }
- 404
- 403
- 401
POST /ddns/clients/{client_key}/action
Do an action
Request body
{ "{action_name}": "{action_value}" }
Actions
- "updateIP" action
- "default" value - update ALL hosts ipaddr at once
Response
- 204
- 404
- 403
- 401
PUT /ddns/clients/{client_key}/hosts/{hostname}
Attach a host (it's actually "connecting a host to client", the host should exist before)
Request body
Response
- 201(+Location)
- 404 - if host doesn't exist in DB
- 403
- 401
DELETE /ddns/clients/{client_key}/hosts/{hostname}
Detach a host
Request body
Response
- 204
- 404
- 403
- 401
DELETE /ddns/clients/{client_key}
Delete a client
Request body
Response
- 204
- 404
- 403
- 401