From a5c429ba4afde413a900e891c0b2330bd1d59dc1 Mon Sep 17 00:00:00 2001 From: Maurice Meyer Date: Thu, 28 Sep 2017 19:28:17 +0200 Subject: [PATCH] Created API Functions (markdown) --- API-Functions.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 API-Functions.md diff --git a/API-Functions.md b/API-Functions.md new file mode 100644 index 0000000..217f981 --- /dev/null +++ b/API-Functions.md @@ -0,0 +1,34 @@ +# General +* all Read functions are executed with HTTP GET requests +* all Create functions are executed with HTTP POST requests +* all Update functions are executed with HTTP PUT requests +* all Delete functions are executed as HTTP DELETE requests +* Search functions are executed as a GET request with URL parameters. +* API functions that return data do so via json objects. +* API fucntions that accept data do so via json objects in the request body. +* API functions do not return a Success or error state, this information is passed by the HTTP Status Code. + +# Syntax of this document +[(Implementation) Status] function(parameter, [optional parameter]) -> return values + +# API Functions +## Domains +### Create +* [TODO] create(name, type) -> id +### Read +* [TODO] get(id) -> id, name, type +* [TO BE DISCUSSED] get_num_records(id) -> number of records in zone +### Update +* [TODO] set type(id, type) +### Delete +* [TODO] delete(id) + +## Records +### Create +* [TODO] create(name, type, content, ttl, [priority]) +### Read +* [TODO] get(id) -> type, content, ttl, [priority]) +### Update +* [TODO] set(id, [content, ttl, priority]) +### Delete +* [TODO] delete(id) \ No newline at end of file