diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-25 04:38:39 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-25 04:38:39 +0000 |
commit | 3af2ac9df06fb698d502d43e8ac5ad6eb9ac2839 (patch) | |
tree | c30af47639ea190de1afdf1b712efc6d06b463b1 /doc | |
parent | fae7b3519a12f7203d97224bc16936e061575ad1 (diff) | |
parent | d9b946fb3edb3288b6ae39c8882b287639a75cbb (diff) | |
download | gitlab-ce-3af2ac9df06fb698d502d43e8ac5ad6eb9ac2839.tar.gz |
Merge branch 'wip-documentation' into 'master'
Add return value example to ssh key creation
See merge request !307
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/users.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/api/users.md b/doc/api/users.md index b30a31deccc..71fa62bdd65 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -322,6 +322,31 @@ Parameters: - `title` (required) - new SSH Key's title - `key` (required) - new SSH key +```json +{ + "created_at": "2015-01-21T17:44:33.512Z", + "key": "ssh-dss AAAAB3NzaC1kc3MAAACBAMLrhYgI3atfrSD6KDas1b/3n6R/HP+bLaHHX6oh+L1vg31mdUqK0Ac/NjZoQunavoyzqdPYhFz9zzOezCrZKjuJDS3NRK9rspvjgM0xYR4d47oNZbdZbwkI4cTv/gcMlquRy0OvpfIvJtjtaJWMwTLtM5VhRusRuUlpH99UUVeXAAAAFQCVyX+92hBEjInEKL0v13c/egDCTQAAAIEAvFdWGq0ccOPbw4f/F8LpZqvWDydAcpXHV3thwb7WkFfppvm4SZte0zds1FJ+Hr8Xzzc5zMHe6J4Nlay/rP4ewmIW7iFKNBEYb/yWa+ceLrs+TfR672TaAgO6o7iSRofEq5YLdwgrwkMmIawa21FrZ2D9SPao/IwvENzk/xcHu7YAAACAQFXQH6HQnxOrw4dqf0NqeKy1tfIPxYYUZhPJfo9O0AmBW2S36pD2l14kS89fvz6Y1g8gN/FwFnRncMzlLY/hX70FSc/3hKBSbH6C6j8hwlgFKfizav21eS358JJz93leOakJZnGb8XlWvz1UJbwCsnR2VEY8Dz90uIk1l/UqHkA= loic@call", + "title": "ABC", + "id": 4 +} +``` + +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 |