From fc2a4eaa9bcda7ead07d29f8ecd5a27c645aec7f Mon Sep 17 00:00:00 2001 From: Maciej Szlosarczyk Date: Fri, 24 Aug 2018 13:48:20 +0300 Subject: [PATCH] Update API documentation for registry locks --- doc/registrant-api.md | 2 +- .../v1/{domain_lock.md => registry_lock.md} | 34 ++++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) rename doc/registrant-api/v1/{domain_lock.md => registry_lock.md} (87%) diff --git a/doc/registrant-api.md b/doc/registrant-api.md index c6f063a91..b475733f4 100644 --- a/doc/registrant-api.md +++ b/doc/registrant-api.md @@ -7,5 +7,5 @@ Main communication specification through Registrant API: [Authentication](registrant-api/v1/authentication.md) [Domains](registrant-api/v1/domain.md) -[Domain Lock](registrant-api/v1/domain_lock.md) +[Registry Lock](registrant-api/v1/registry_lock.md) [Contacts](registrant-api/v1/contact.md) diff --git a/doc/registrant-api/v1/domain_lock.md b/doc/registrant-api/v1/registry_lock.md similarity index 87% rename from doc/registrant-api/v1/domain_lock.md rename to doc/registrant-api/v1/registry_lock.md index 7e24e2827..b8d440554 100644 --- a/doc/registrant-api/v1/domain_lock.md +++ b/doc/registrant-api/v1/registry_lock.md @@ -1,4 +1,4 @@ -# Domain locks +# Registry lock ## POST api/v1/registrant/domains/$UUID/registry_lock @@ -59,12 +59,12 @@ Content-Type: application/json #### Response for failure ``` -HTTP/1.1 400 +HTTP/1.1 422 Content-Type: application/json { "errors": [ - { "base": "domain cannot be locked" } + { "base": "Domain cannot be locked" } ] } @@ -76,11 +76,23 @@ Content-Type: application/json { "errors": [ - { "base": "domain does not exist" } + { "base": "Domain not found" } ] } ``` +``` +HTTP/1.1 401 +Content-Type: application/json + +{ + "errors": [ + { "base": ["Only administrative contacts can manage registry locks"] } + ] +} + +``` + ## DELETE api/v1/registrant/domains/$UUID/registry_lock @@ -156,7 +168,19 @@ Content-Type: application/json { "errors": [ - { "base": "domain does not exist" } + { "base": "Domain not found" } + ] +} + +``` + +``` +HTTP/1.1 401 +Content-Type: application/json + +{ + "errors": [ + { "base": ["Only administrative contacts can manage registry locks"] } ] }