Mercurial > kallithea
comparison docs/api/api.rst @ 2365:b902baeaa494 beta
API, added delete_user method.
- create_user now also returns new user object data as get_user
- updated docs
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 31 May 2012 18:42:49 +0200 |
parents | 347b00545b60 |
children | 04ef27ce939e |
comparison
equal
deleted
inserted
replaced
2360:c15c3430df74 | 2365:b902baeaa494 |
---|---|
185 | 185 |
186 OUTPUT:: | 186 OUTPUT:: |
187 | 187 |
188 result: { | 188 result: { |
189 "id" : "<new_user_id>", | 189 "id" : "<new_user_id>", |
190 "msg" : "created new user <username>" | 190 "msg" : "created new user <username>", |
191 "user": { | |
192 "id" : "<id>", | |
193 "username" : "<username>", | |
194 "firstname": "<firstname>", | |
195 "lastname" : "<lastname>", | |
196 "email" : "<email>", | |
197 "active" : "<bool>", | |
198 "admin" : "<bool>", | |
199 "ldap_dn" : "<ldap_dn>", | |
200 "last_login": "<last_login>", | |
201 }, | |
191 } | 202 } |
192 error: null | 203 error: null |
193 | 204 |
194 | 205 |
195 update_user | 206 update_user |
196 ----------- | 207 ----------- |
197 | 208 |
198 updates current one if such user exists. This command can | 209 updates given user if such user exists. This command can |
199 be executed only using api_key belonging to user with admin rights. | 210 be executed only using api_key belonging to user with admin rights. |
200 | 211 |
201 | 212 |
202 INPUT:: | 213 INPUT:: |
203 | 214 |
218 | 229 |
219 OUTPUT:: | 230 OUTPUT:: |
220 | 231 |
221 result: { | 232 result: { |
222 "id" : "<edited_user_id>", | 233 "id" : "<edited_user_id>", |
223 "msg" : "updated user <username>" | 234 "msg" : "updated user ID:<userid> <username>" |
235 } | |
236 error: null | |
237 | |
238 | |
239 delete_user | |
240 ----------- | |
241 | |
242 | |
243 deletes givenuser if such user exists. This command can | |
244 be executed only using api_key belonging to user with admin rights. | |
245 | |
246 | |
247 INPUT:: | |
248 | |
249 id : <id_for_response> | |
250 api_key : "<api_key>" | |
251 method : "delete_user" | |
252 args : { | |
253 "userid" : "<user_id or username>", | |
254 } | |
255 | |
256 OUTPUT:: | |
257 | |
258 result: { | |
259 "id" : "<edited_user_id>", | |
260 "msg" : "deleted user ID:<userid> <username>" | |
224 } | 261 } |
225 error: null | 262 error: null |
226 | 263 |
227 | 264 |
228 get_users_group | 265 get_users_group |