Commit d9b946fb authored by Loic Dachary's avatar Loic Dachary

Document ssh key creation error

Add the error code returned in the headers as well as an example of the
JSON informative message returned in the body.
Signed-off-by: default avatarLoic Dachary <loic@dachary.org>
parent 201b2f10
...@@ -331,6 +331,22 @@ Parameters: ...@@ -331,6 +331,22 @@ Parameters:
} }
``` ```
Will return created key with status `201 Created` on success. If an
error occurs a `400 Bad Request` is returned with a message explaining the error:
```json
{
"message": {
"fingerprint": [
"has already been taken"
],
"key": [
"has already been taken"
]
}
}
```
## Add SSH key for user ## Add SSH key for user
Create new key owned by specified user. Available only for admin Create new key owned by specified user. Available only for admin
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment