Dynamic DNS
From Hostway API Documentation
(Difference between revisions)
Mike.robski (Talk | contribs) |
Mike.robski (Talk | contribs) m (1 revision: Release 90) |
||
| (6 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | = | + | = Authentication = |
| − | + | * HTTP Basic Auth with DDNS user and passwd | |
| − | |||
| − | |||
| − | = | + | = API list = |
| + | =='''PUT''' /ddns/clients/{client_key} == | ||
| + | Create a client | ||
| + | |||
| + | === Request body === | ||
| + | <nowiki> | ||
| + | { | ||
| + | "offline": false | ||
| + | }</nowiki> | ||
| + | |||
| + | === Response === | ||
| + | * 201(+Location) | ||
| + | ** Locaiton: http://{api_server}/ddns/clients/{client_key} | ||
| + | * 401 | ||
| + | |||
=='''GET''' /ddns/clients/{client_key} == | =='''GET''' /ddns/clients/{client_key} == | ||
| − | + | Get a client | |
=== Request body === | === Request body === | ||
| − | |||
=== Response === | === Response === | ||
| − | * 200 | + | * 200 |
<nowiki> | <nowiki> | ||
{ | { | ||
| Line 22: | Line 33: | ||
} | } | ||
}</nowiki> | }</nowiki> | ||
| − | * | + | * 404 |
| − | * | + | * 403 |
| + | * 401 | ||
| + | |||
=='''PUT''' /ddns/clients/{client_key} == | =='''PUT''' /ddns/clients/{client_key} == | ||
| − | + | Update a client | |
| − | + | ||
| − | + | ||
=== Request body === | === Request body === | ||
<nowiki> | <nowiki> | ||
{ | { | ||
| − | "offline": | + | "offline": true |
}</nowiki> | }</nowiki> | ||
=== Response === | === Response === | ||
| − | * 200 | + | * 200 |
| − | + | ||
<nowiki> | <nowiki> | ||
{ | { | ||
| Line 47: | Line 57: | ||
} | } | ||
}</nowiki> | }</nowiki> | ||
| − | * | + | * 404 |
| − | * | + | * 403 |
| − | + | * 401 | |
| − | + | ||
| − | * 401 | + | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
=='''GET''' /ddns/clients/{client_key}/hosts == | =='''GET''' /ddns/clients/{client_key}/hosts == | ||
| − | + | Get all hosts | |
=== Request body === | === Request body === | ||
| − | |||
| − | |||
=== Response === | === Response === | ||
| − | * 200 | + | * 200 |
| − | + | ||
<nowiki> | <nowiki> | ||
{ | { | ||
| Line 86: | Line 81: | ||
] | ] | ||
}</nowiki> | }</nowiki> | ||
| − | * | + | * 404 |
| − | * | + | * 403 |
| + | * 401 | ||
| − | ==''' | + | |
| − | + | =='''POST''' /ddns/clients/{client_key}/action == | |
| + | Do an action | ||
=== Request body === | === Request body === | ||
<nowiki> | <nowiki> | ||
{ | { | ||
| + | "{action_name}": "{action_value}" | ||
}</nowiki> | }</nowiki> | ||
| + | ==== 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 === | === Response === | ||
| − | * 201 | + | * 201(+Location) |
| − | + | ** Location: http://{api_server}/ddns/clients/{client_key}/hosts/{hostname} | |
| − | + | * 404 - if host doesn't exist in DB | |
| − | * | + | * 403 |
| − | * | + | * 401 |
=='''DELETE''' /ddns/clients/{client_key}/hosts/{hostname} == | =='''DELETE''' /ddns/clients/{client_key}/hosts/{hostname} == | ||
| Line 108: | Line 119: | ||
=== Request body === | === Request body === | ||
| − | |||
=== Response === | === Response === | ||
| − | * 204 | + | * 204 |
| − | * | + | * 404 |
| − | * | + | * 403 |
| + | * 401 | ||
| − | |||
| − | |||
| − | + | =='''DELETE''' /ddns/clients/{client_key} == | |
| − | + | Delete a client | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | ==''' | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
=== Request body === | === Request body === | ||
| − | |||
| − | |||
| − | |||
| − | |||
=== Response === | === Response === | ||
| − | * 204 | + | * 204 |
| − | * | + | * 404 |
| − | * | + | * 403 |
| − | + | * 401 | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | [[Category:Hostway API]] | |
| + | [[Category:Dynamic DNS API]] | ||
Latest revision as of 12:37, 31 January 2014
[edit] Authentication
- HTTP Basic Auth with DDNS user and passwd
[edit] API list
[edit] PUT /ddns/clients/{client_key}
Create a client
[edit] Request body
{
"offline": false
}
[edit] Response
- 201(+Location)
- 401
[edit] GET /ddns/clients/{client_key}
Get a client
[edit] Request body
[edit] Response
- 200
{
"offline": true
"hosts": {
"rel": "related",
"href": "http://{api_server}/ddns/clients/{client_key}/hosts"
}
}
- 404
- 403
- 401
[edit] PUT /ddns/clients/{client_key}
Update a client
[edit] Request body
{
"offline": true
}
[edit] Response
- 200
{
"offline": false,
"hosts": {
"href": "http://{api_server}/ddns/clients/{client_key}/hosts",
"rel": "related"
}
}
- 404
- 403
- 401
[edit] GET /ddns/clients/{client_key}/hosts
Get all hosts
[edit] Request body
[edit] Response
- 200
{
"hosts": [
"hostname": "{hostname}"
"ipAddress": "{ipaddr}"
"links": [
{
"rel": "self",
"href": "http://{api_server}/ddns/clients/{client_key}/hosts/{hostname}"
}
]
]
}
- 404
- 403
- 401
[edit] POST /ddns/clients/{client_key}/action
Do an action
[edit] Request body
{
"{action_name}": "{action_value}"
}
[edit] Actions
- "updateIP" action
- "default" value - update ALL hosts ipaddr at once
[edit] Response
- 204
- 404
- 403
- 401
[edit] PUT /ddns/clients/{client_key}/hosts/{hostname}
Attach a host (it's actually "connecting a host to client", the host should exist before)
[edit] Request body
[edit] Response
- 201(+Location)
- 404 - if host doesn't exist in DB
- 403
- 401
[edit] DELETE /ddns/clients/{client_key}/hosts/{hostname}
Detach a host
[edit] Request body
[edit] Response
- 204
- 404
- 403
- 401
[edit] DELETE /ddns/clients/{client_key}
Delete a client
[edit] Request body
[edit] Response
- 204
- 404
- 403
- 401