Update REST API documentation [ci skip]

#661
This commit is contained in:
Artur Beljajev 2018-01-29 18:40:15 +02:00
parent 9dffe962b6
commit 871d2c313f
2 changed files with 52 additions and 1 deletions

View file

@ -17,4 +17,5 @@ Main communication specification through Restful EPP (REPP):
[Contact related functions](repp/v1/contact.md) [Contact related functions](repp/v1/contact.md)
[Domain related functions](repp/v1/domain.md) [Domain related functions](repp/v1/domain.md)
[Account related functions](repp/v1/account.md) [Account related functions](repp/v1/account.md)
[Nameservers](repp/v1/nameservers.md)

View file

@ -0,0 +1,50 @@
# Nameservers
## PUT /repp/v1/nameservers
Replaces nameservers
#### Request
```
PUT /repp/v1/nameservers
Accept: application/json
Content-Type: application/json
Authorization: Basic dGVzdDp0ZXN0dGVzdA==
{
"data":{
"nameservers":[
{
"hostname":"ns1.example.com",
"ipv4":"192.0.2.1"
"ipv6":"2001:DB8::1"
},
{
"hostname":"ns2.example.com",
"ipv4":"192.0.2.1"
"ipv6":"2001:DB8::1"
}
]
}
}
```
#### Response on success
```
HTTP/1.1 204
```
#### Response on failure
```
HTTP/1.1 400
Content-Type: application/json
{
"errors":[
{
"title":"ns1.example.com does not exist"
},
{
"title":"192.0.2.1 is not a valid IPv4 address"
}
]
}
```