From cd48ee3ba19e5cccda685f08bea9f3ac2f705ad0 Mon Sep 17 00:00:00 2001 From: Lukas Metzger Date: Fri, 5 Jan 2018 16:50:09 +0100 Subject: [PATCH] Created API Records (markdown) --- API-Records.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 API-Records.md diff --git a/API-Records.md b/API-Records.md new file mode 100644 index 0000000..b907b33 --- /dev/null +++ b/API-Records.md @@ -0,0 +1,38 @@ +# Domains +## Get list of domains +`GET /records?page=5&pagesize=10&domain=1,2,3,4&queryName=foo&type=NS,SRV,A&queryContent=bar&sort=id-asc,name-desc,type-asc,content-asc,priority-desc,ttl-asc` + +| parameter | explanation | +| --- | --- | +| page | The page of the results to return | +| pagesize | How many items should be on each page | +| domain | A comma separated list of domain ids from which records should be returned, if omitted all records accessible by this user are returned | +| queryName | A search query on the record name | +| type | A comma separated list of record types (case insensitive) | +| queryContent | A search query on the record content | +| sort | A comma separated list of field names to sort (in this order) combined with the sort order (see example) | + +### Response +| code | result | +| --- | --- | +| 200 | Everything was successful | + +```json +{ + "paging": { + "page": 5, + "total": 20, + "pagesize": 10 + }, + "results": [ + { + "id": 1, + "name": "dns.example.com", + "type": "A", + "content": "1.2.3.4", + "priority": 0, + "ttl": 86400 + } + ] +} +```