MXS-1220: Use PUT to set/clear server

The correct method for set/clear endpoints is PUT, not POST, as the
resource always ends up in the desired state, regardless of its current
state.
This commit is contained in:
Markus Mäkelä
2017-06-30 16:04:37 +03:00
parent 30a40a090b
commit a8bfdac49c
3 changed files with 8 additions and 8 deletions

View File

@ -504,7 +504,7 @@ Status: 403 Forbidden
### Set server status
```
POST /v1/servers/:name/set
PUT /v1/servers/:name/set
```
The _:name_ in the URI must map to a server name with all whitespace replaced
@ -525,7 +525,7 @@ For example, to set the server _db-server-1_ into maintenance mode, a request to
the following URL must be made:
```
POST /v1/servers/db-server-1/set?status=maintenance
PUT /v1/servers/db-server-1/set?status=maintenance
```
#### Response