From 9f92ab57a0e80c7bfefde2fb4b367a9a68cc0ad1 Mon Sep 17 00:00:00 2001 From: Lukas Metzger Date: Sun, 1 Oct 2017 19:57:45 +0200 Subject: [PATCH] Created API Domains (markdown) --- API-Domains.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 API-Domains.md diff --git a/API-Domains.md b/API-Domains.md new file mode 100644 index 0000000..fad758c --- /dev/null +++ b/API-Domains.md @@ -0,0 +1,57 @@ +# Domains +## Get list of domains +`GET /api/domains?query=foo&sort=id-asc,name-desc,type-asc,records-asc` + +### Response +```json +{ + "pages": { + "current": 21, + "total": 42 + }, + "results": [ + { + "id": 1, + "name": "example.com", + "type": "MASTER", + "records": 21 + } + ] +} +``` + +## Create new domain +`POST /api/domains` + +### Body +```json +{ + "name": "example.com", + "type": "MASTER" +} +``` + +### Response +```json +{ + "id": 21 + "name": "example.com", + "type": "MASTER" +} +``` + +## Delete domain +`DELETE /api/domains/{id}` + +## Get single domain +`GET /api/domains/{id}` + +### Response +```json +{ + "id": 1, + "name": "example.com", + "type": "MASTER", + "records": 21 +} +``` \ No newline at end of file