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