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