From 871d2c313f02716bed9b4a11aa9588a4163fb2ab Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Mon, 29 Jan 2018 18:40:15 +0200 Subject: [PATCH] Update REST API documentation [ci skip] #661 --- doc/repp-doc.md | 3 ++- doc/repp/v1/nameservers.md | 50 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 doc/repp/v1/nameservers.md diff --git a/doc/repp-doc.md b/doc/repp-doc.md index 8eab257ab..0ba0ec548 100644 --- a/doc/repp-doc.md +++ b/doc/repp-doc.md @@ -17,4 +17,5 @@ Main communication specification through Restful EPP (REPP): [Contact related functions](repp/v1/contact.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) diff --git a/doc/repp/v1/nameservers.md b/doc/repp/v1/nameservers.md new file mode 100644 index 000000000..1f47dc312 --- /dev/null +++ b/doc/repp/v1/nameservers.md @@ -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" + } + ] +} +```