diff options
author | Loic Dachary <ldachary@redhat.com> | 2015-01-21 21:08:15 +0300 |
---|---|---|
committer | Loic Dachary <ldachary@redhat.com> | 2015-01-21 21:08:15 +0300 |
commit | d9b946fb3edb3288b6ae39c8882b287639a75cbb (patch) | |
tree | 57cfcafb0b708a4f6c3982963dd4ca5793b329ef /doc/api | |
parent | 201b2f1099c6c1a963455d54bacbe473c7e27f95 (diff) |
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: Loic Dachary <loic@dachary.org>
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/users.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/api/users.md b/doc/api/users.md index dd158f124de..71fa62bdd65 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -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 Create new key owned by specified user. Available only for admin |