Example for get function
parent
dff7e5e19b
commit
e35668d5ec
|
@ -13,11 +13,29 @@
|
||||||
|
|
||||||
# API Functions
|
# API Functions
|
||||||
## Domains
|
## 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
|
### Create
|
||||||
* [TODO] create(name, type) -> id
|
* [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
|
### Update
|
||||||
* [TODO] set type(id, type)
|
* [TODO] set type(id, type)
|
||||||
### Delete
|
### Delete
|
||||||
|
|
Loading…
Reference in a new issue