{"openapi":"3.0.1","info":{"title":"A Dynamic DNS REST Service.","description":"The routes of the dynamic DNS API","contact":{"name":"Thilo Schwarz","url":"https://github.com/th-schwarz/DynDRest","email":"osp (at) thischwa.codes"},"license":{"name":"MIT Licence","url":"https://github.com/th-schwarz/DynDRest/blob/develop/LICENSE"},"version":"0.1"},"externalDocs":{"description":"DynDRest on Github","url":"https://github.com/th-schwarz/DynDRest"},"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"paths":{"/update/{host}":{"get":{"tags":["api-controller"],"summary":"Updates the desired IP addresses of the 'host', if the 'apitoken' belongs to the host. If both parameters for IP addresses aren't set, an attempt is made to fetch the remote IP.","operationId":"update","parameters":[{"name":"host","in":"path","description":"The host, for which the IPs must be updated.","required":true,"content":{"text/plain":{"example":"mydyndns.domain.com"}}},{"name":"apitoken","in":"query","description":"The 'apitoken' which belongs to the 'host'.","required":true,"content":{"text/plain":{}}},{"name":"ipv4","in":"query","required":false,"schema":{"type":"string"}},{"name":"ipv6","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updates the desired IP addresses of the 'host', if the 'apitoken' belongs to the host. If both parameters for IP addresses aren't set, an attempt is made to fetch the remote IP.","content":{"text/plain":{"example":"Update successful."}}},"400":{"description":"If the 'apitoken' doesn't belong to the host, IP addresses aren't valid or the remote IP couldn't determine."},"500":{"description":"If the update fails."}}}},"/info/{host}":{"get":{"tags":["api-controller"],"summary":"Determines the IP settings of the 'host' and returns it in a JSON object.","operationId":"info","parameters":[{"name":"host","in":"path","description":"The host, for which the IPs must be determined.","required":true,"content":{"text/plain":{"example":"mydyndns.domain.com"}}},{"name":"apitoken","in":"query","description":"The 'apitoken' which belongs to the 'host'.","required":true,"content":{"text/plain":{}}}],"responses":{"200":{"description":"A JSON object with the IP settings of the 'host'","content":{"application/json":{"example":{"ipv4":"127.1.2.4","ipv6":"2a03:4000:41:32:0:0:0:2"}}}},"500":{"description":"If the zone info fails."},"400":{"description":"If the 'apitoken' doesn't belong to the host, IP addresses aren't valid or the remote IP couldn't determine."},"404":{"description":"If the 'host' isn't configured."}}}},"/info/update-log":{"get":{"tags":["api-controller"],"summary":"Delivers pageable update logs.","operationId":"deliverLogs","parameters":[{"name":"page","in":"query","description":"Page number to fetch. If it is not committed, it will be '1'.","required":false,"content":{"int":{}}},{"name":"search","in":"query","description":"String to search for. It belongs to 'host' and 'timestamp'.","required":false,"content":{"text/plain":{}}}],"responses":{"200":{"description":"Ordered list of update logs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLogPage"}}}}}}}},"components":{"schemas":{"UpdateItem":{"type":"object","properties":{"dateTime":{"type":"string"},"host":{"type":"string"},"ipv4":{"type":"string"},"ipv6":{"type":"string"}}},"UpdateLogPage":{"type":"object","properties":{"total":{"type":"integer","format":"int32"},"totalPage":{"type":"integer","format":"int32"},"page":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"items":{"type":"array","items":{"$ref":"#/components/schemas/UpdateItem"}}}}}}}