Created API Domains (markdown)
parent
1f4bed81cf
commit
9f92ab57a0
57
API-Domains.md
Normal file
57
API-Domains.md
Normal file
|
@ -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
|
||||||
|
}
|
||||||
|
```
|
Loading…
Reference in a new issue