-
Notifications
You must be signed in to change notification settings - Fork 49
API Remote
Lukas Metzger edited this page Apr 29, 2018
·
5 revisions
GET /remote/ip
This call returns the ip of the client. This can e.g. be used for dynamic DNS Clients.
code | result |
---|---|
200 | Everything okay |
{
"ip": "1.2.3.4"
}
GET /remote/updatepw?record=10&content=foo-bar-baz&password=supersecret
parameter | explanation |
---|---|
record | The id of the record to update |
content | The new content |
password | The password used for authentication |
code | result |
---|---|
204 | Everything okay, therefore content is empty |
403 | No permission for the given record |
404 | Record does not exist |
422 | One of the required arguments is missing |
GET /remote/servertime
This call returns the time of the server. This can be used to obtain a timestamp for the signature api.
code | result |
---|---|
200 | Everything okay |
{
"time": 1525006738
}
POST /remote/updatekey
This API does the authentication via an RSA signature. To obtain the signature you must have a Unix-Timestamp with sufficient precision. You can obtain it from the server with the GET /remote/servertime
API. Concatenate the record id (as string), the content and the timestamp (also as string). Sign this data with SHA512 using your private key and base64 encode the signature.
{
"record": 5,
"content": "1.2.3.4",
"time": 1525009108,
"signature": "YIRJppYL55dOuC[...]u0sXYgClo="
}
parameter | explanation |
---|---|
record | The id of the record to update |
content | The new content |
time | The unix timestamp used in the signature |
signature | The signature |
code | result |
---|---|
204 | Everything okay, therefore content is empty |
403 | No permission for the given record |
404 | Record does not exist |
422 | One of the required arguments is missing |