Mercurial > public > src > rhodecode
annotate docs/api/api.rst @ 2244:ee45677c4edc beta
Api docs fixes
- return proper type instead of type_
- members return now also a type user or users_group
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 20 Mar 2012 23:26:02 +0200 |
parents | c1f1f0661090 |
children | 12ceeda33339 |
rev | line source |
---|---|
1526 | 1 .. _api: |
2 | |
2191 | 3 === |
1526 | 4 API |
5 === | |
6 | |
7 | |
8 Starting from RhodeCode version 1.2 a simple API was implemented. | |
1580 | 9 There's a single schema for calling all api methods. API is implemented |
1676 | 10 with JSON protocol both ways. An url to send API request in RhodeCode is |
1580 | 11 <your_server>/_admin/api |
1526 | 12 |
1924 | 13 API ACCESS FOR WEB VIEWS |
14 ++++++++++++++++++++++++ | |
1526 | 15 |
1996 | 16 API access can also be turned on for each web view in RhodeCode that is |
17 decorated with `@LoginRequired` decorator. To enable API access simple change | |
18 the standard login decorator to `@LoginRequired(api_access=True)`. | |
19 After this change, a rhodecode view can be accessed without login by adding a | |
20 GET parameter `?api_key=<api_key>` to url. By default this is only | |
1896
320dec24fb9a
Added instruction on enabling the API access to web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1895
diff
changeset
|
21 enabled on RSS/ATOM feed views. |
320dec24fb9a
Added instruction on enabling the API access to web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1895
diff
changeset
|
22 |
320dec24fb9a
Added instruction on enabling the API access to web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1895
diff
changeset
|
23 |
1924 | 24 API ACCESS |
25 ++++++++++ | |
26 | |
1793
fee9895fa46e
changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents:
1676
diff
changeset
|
27 All clients are required to send JSON-RPC spec JSON data:: |
1526 | 28 |
1793
fee9895fa46e
changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents:
1676
diff
changeset
|
29 { |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
30 "id:"<id>", |
1526 | 31 "api_key":"<api_key>", |
32 "method":"<method_name>", | |
33 "args":{"<arg_key>":"<arg_val>"} | |
34 } | |
35 | |
1580 | 36 Example call for autopulling remotes repos using curl:: |
1793
fee9895fa46e
changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents:
1676
diff
changeset
|
37 curl https://server.com/_admin/api -X POST -H 'content-type:text/plain' --data-binary '{"id":1,"api_key":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull","args":{"repo":"CPython"}}' |
1580 | 38 |
1676 | 39 Simply provide |
1793
fee9895fa46e
changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents:
1676
diff
changeset
|
40 - *id* A value of any type, which is used to match the response with the request that it is replying to. |
1580 | 41 - *api_key* for access and permission validation. |
42 - *method* is name of method to call | |
43 - *args* is an key:value list of arguments to pass to method | |
1676 | 44 |
1526 | 45 .. note:: |
1676 | 46 |
47 api_key can be found in your user account page | |
48 | |
49 | |
1793
fee9895fa46e
changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents:
1676
diff
changeset
|
50 RhodeCode API will return always a JSON-RPC response:: |
1676 | 51 |
1793
fee9895fa46e
changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents:
1676
diff
changeset
|
52 { |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
53 "id":<id>, # matching id sent by request |
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
54 "result": "<result>"|null, # JSON formatted result, null if any errors |
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
55 "error": "null"|<error_message> # JSON formatted error (if any) |
1526 | 56 } |
57 | |
58 All responses from API will be `HTTP/1.0 200 OK`, if there's an error while | |
1676 | 59 calling api *error* key from response will contain failure description |
1526 | 60 and result will be null. |
61 | |
62 API METHODS | |
63 +++++++++++ | |
64 | |
1676 | 65 |
1526 | 66 pull |
67 ---- | |
68 | |
1676 | 69 Pulls given repo from remote location. Can be used to automatically keep |
70 remote repos up to date. This command can be executed only using api_key | |
1580 | 71 belonging to user with admin rights |
72 | |
73 INPUT:: | |
74 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
75 id : <id_for_response> |
1676 | 76 api_key : "<api_key>" |
77 method : "pull" | |
78 args : { | |
1928 | 79 "repo_name" : "<reponame>" |
1676 | 80 } |
81 | |
82 OUTPUT:: | |
83 | |
1928 | 84 result : "Pulled from <reponame>" |
1676 | 85 error : null |
86 | |
87 | |
1928 | 88 get_user |
89 -------- | |
90 | |
2098
14dffcfebb02
API get_user and get_repo methods can fetch by id or names
Marcin Kuzminski <marcin@python-works.com>
parents:
2097
diff
changeset
|
91 Get's an user by username or user_id, Returns empty result if user is not found. |
1928 | 92 This command can be executed only using api_key belonging to user with admin |
93 rights. | |
94 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
95 |
1928 | 96 INPUT:: |
97 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
98 id : <id_for_response> |
1928 | 99 api_key : "<api_key>" |
100 method : "get_user" | |
101 args : { | |
2098
14dffcfebb02
API get_user and get_repo methods can fetch by id or names
Marcin Kuzminski <marcin@python-works.com>
parents:
2097
diff
changeset
|
102 "userid" : "<username or user_id>" |
1928 | 103 } |
104 | |
105 OUTPUT:: | |
106 | |
107 result: None if user does not exist or | |
108 { | |
109 "id" : "<id>", | |
110 "username" : "<username>", | |
111 "firstname": "<firstname>", | |
112 "lastname" : "<lastname>", | |
113 "email" : "<email>", | |
114 "active" : "<bool>", | |
115 "admin" :Â "<bool>", | |
2097 | 116 "ldap_dn" : "<ldap_dn>" |
1928 | 117 } |
118 | |
119 error: null | |
120 | |
121 | |
1676 | 122 get_users |
123 --------- | |
124 | |
125 Lists all existing users. This command can be executed only using api_key | |
126 belonging to user with admin rights. | |
127 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
128 |
1676 | 129 INPUT:: |
130 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
131 id : <id_for_response> |
1676 | 132 api_key : "<api_key>" |
133 method : "get_users" | |
134 args : { } | |
135 | |
136 OUTPUT:: | |
137 | |
138 result: [ | |
139 { | |
140 "id" : "<id>", | |
141 "username" : "<username>", | |
142 "firstname": "<firstname>", | |
143 "lastname" : "<lastname>", | |
144 "email" : "<email>", | |
145 "active" : "<bool>", | |
146 "admin" :Â "<bool>", | |
2097 | 147 "ldap_dn" : "<ldap_dn>" |
1676 | 148 }, |
149 … | |
150 ] | |
151 error: null | |
152 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
153 |
1676 | 154 create_user |
155 ----------- | |
156 | |
2090
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
157 Creates new user. This command can |
1994
f2bd5b0c1094
create user api_doc update
Marcin Kuzminski <marcin@python-works.com>
parents:
1928
diff
changeset
|
158 be executed only using api_key belonging to user with admin rights. |
1676 | 159 |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
160 |
1676 | 161 INPUT:: |
162 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
163 id : <id_for_response> |
1676 | 164 api_key : "<api_key>" |
165 method : "create_user" | |
166 args : { | |
167 "username" : "<username>", | |
168 "password" : "<password>", | |
2036
4ae17f819ee8
#344 optional firstname lastname on user creation
Marcin Kuzminski <marcin@python-works.com>
parents:
1996
diff
changeset
|
169 "email" : "<useremail>", |
4ae17f819ee8
#344 optional firstname lastname on user creation
Marcin Kuzminski <marcin@python-works.com>
parents:
1996
diff
changeset
|
170 "firstname" : "<firstname> = None", |
4ae17f819ee8
#344 optional firstname lastname on user creation
Marcin Kuzminski <marcin@python-works.com>
parents:
1996
diff
changeset
|
171 "lastname" : "<lastname> = None", |
1676 | 172 "active" : "<bool> = True", |
173 "admin" : "<bool> = False", | |
174 "ldap_dn" : "<ldap_dn> = None" | |
175 } | |
1580 | 176 |
177 OUTPUT:: | |
178 | |
1676 | 179 result: { |
1928 | 180 "id" : "<new_user_id>", |
1676 | 181 "msg" : "created new user <username>" |
182 } | |
183 error: null | |
184 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
185 |
2090
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
186 update_user |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
187 ----------- |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
188 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
189 updates current one if such user exists. This command can |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
190 be executed only using api_key belonging to user with admin rights. |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
191 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
192 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
193 INPUT:: |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
194 |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
195 id : <id_for_response> |
2090
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
196 api_key : "<api_key>" |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
197 method : "update_user" |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
198 args : { |
2097 | 199 "userid" : "<user_id or username>", |
2090
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
200 "username" : "<username>", |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
201 "password" : "<password>", |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
202 "email" : "<useremail>", |
2097 | 203 "firstname" : "<firstname>", |
204 "lastname" : "<lastname>", | |
205 "active" : "<bool>", | |
206 "admin" : "<bool>", | |
207 "ldap_dn" : "<ldap_dn>" | |
2090
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
208 } |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
209 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
210 OUTPUT:: |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
211 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
212 result: { |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
213 "id" : "<edited_user_id>", |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
214 "msg" : "updated user <username>" |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
215 } |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
216 error: null |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
217 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
2077
diff
changeset
|
218 |
1676 | 219 get_users_group |
220 --------------- | |
221 | |
222 Gets an existing users group. This command can be executed only using api_key | |
223 belonging to user with admin rights. | |
224 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
225 |
1676 | 226 INPUT:: |
227 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
228 id : <id_for_response> |
1676 | 229 api_key : "<api_key>" |
230 method : "get_users_group" | |
231 args : { | |
232 "group_name" : "<name>" | |
233 } | |
234 | |
235 OUTPUT:: | |
236 | |
237 result : None if group not exist | |
238 { | |
1928 | 239 "id" : "<id>", |
240 "group_name" : "<groupname>", | |
241 "active": "<bool>", | |
1676 | 242 "members" : [ |
1928 | 243 { "id" : "<userid>", |
244 "username" : "<username>", | |
245 "firstname": "<firstname>", | |
246 "lastname" : "<lastname>", | |
247 "email" : "<email>", | |
248 "active" : "<bool>", | |
249 "admin" :Â "<bool>", | |
250 "ldap" : "<ldap_dn>" | |
251 }, | |
252 … | |
253 ] | |
1676 | 254 } |
255 error : null | |
256 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
257 |
1928 | 258 get_users_groups |
259 ---------------- | |
260 | |
261 Lists all existing users groups. This command can be executed only using | |
262 api_key belonging to user with admin rights. | |
263 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
264 |
1928 | 265 INPUT:: |
266 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
267 id : <id_for_response> |
1928 | 268 api_key : "<api_key>" |
269 method : "get_users_groups" | |
270 args : { } | |
271 | |
272 OUTPUT:: | |
273 | |
274 result : [ | |
275 { | |
276 "id" : "<id>", | |
277 "group_name" : "<groupname>", | |
278 "active": "<bool>", | |
279 "members" : [ | |
280 { | |
281 "id" : "<userid>", | |
282 "username" : "<username>", | |
283 "firstname": "<firstname>", | |
284 "lastname" : "<lastname>", | |
285 "email" : "<email>", | |
286 "active" : "<bool>", | |
287 "admin" :Â "<bool>", | |
288 "ldap" : "<ldap_dn>" | |
289 }, | |
290 … | |
291 ] | |
292 } | |
293 ] | |
294 error : null | |
295 | |
296 | |
1580 | 297 create_users_group |
298 ------------------ | |
299 | |
1676 | 300 Creates new users group. This command can be executed only using api_key |
1580 | 301 belonging to user with admin rights |
302 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
303 |
1580 | 304 INPUT:: |
305 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
306 id : <id_for_response> |
1676 | 307 api_key : "<api_key>" |
308 method : "create_users_group" | |
309 args: { | |
1928 | 310 "group_name": "<groupname>", |
1676 | 311 "active":"<bool> = True" |
312 } | |
313 | |
314 OUTPUT:: | |
315 | |
316 result: { | |
317 "id": "<newusersgroupid>", | |
1928 | 318 "msg": "created new users group <groupname>" |
1676 | 319 } |
320 error: null | |
321 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
322 |
1878
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
323 add_user_to_users_group |
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
324 ----------------------- |
1676 | 325 |
2077 | 326 Adds a user to a users group. If user exists in that group success will be |
327 `false`. This command can be executed only using api_key | |
1676 | 328 belonging to user with admin rights |
329 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
330 |
1676 | 331 INPUT:: |
332 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
333 id : <id_for_response> |
1676 | 334 api_key : "<api_key>" |
335 method : "add_user_users_group" | |
336 args: { | |
337 "group_name" : "<groupname>", | |
1895
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
338 "username" : "<username>" |
1676 | 339 } |
340 | |
341 OUTPUT:: | |
342 | |
343 result: { | |
344 "id": "<newusersgroupmemberid>", | |
2077 | 345 "success": True|False # depends on if member is in group |
346 "msg": "added member <username> to users group <groupname> | | |
347 User is already in that group" | |
348 } | |
349 error: null | |
350 | |
351 | |
352 remove_user_from_users_group | |
353 ---------------------------- | |
354 | |
355 Removes a user from a users group. If user is not in given group success will | |
356 be `false`. This command can be executed only | |
357 using api_key belonging to user with admin rights | |
358 | |
359 | |
360 INPUT:: | |
361 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
362 id : <id_for_response> |
2077 | 363 api_key : "<api_key>" |
364 method : "remove_user_from_users_group" | |
365 args: { | |
366 "group_name" : "<groupname>", | |
367 "username" : "<username>" | |
368 } | |
369 | |
370 OUTPUT:: | |
371 | |
372 result: { | |
373 "success": True|False, # depends on if member is in group | |
374 "msg": "removed member <username> from users group <groupname> | | |
375 User wasn't in group" | |
1676 | 376 } |
377 error: null | |
378 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
379 |
1928 | 380 get_repo |
381 -------- | |
382 | |
2244 | 383 Gets an existing repository by it's name or repository_id. Members will return |
384 either users_group or user associated to that repository. This command can | |
2098
14dffcfebb02
API get_user and get_repo methods can fetch by id or names
Marcin Kuzminski <marcin@python-works.com>
parents:
2097
diff
changeset
|
385 be executed only using api_key belonging to user with admin rights. |
1928 | 386 |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
387 |
1928 | 388 INPUT:: |
389 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
390 id : <id_for_response> |
1928 | 391 api_key : "<api_key>" |
392 method : "get_repo" | |
393 args: { | |
2098
14dffcfebb02
API get_user and get_repo methods can fetch by id or names
Marcin Kuzminski <marcin@python-works.com>
parents:
2097
diff
changeset
|
394 "repoid" : "<reponame or repo_id>" |
1928 | 395 } |
396 | |
397 OUTPUT:: | |
398 | |
399 result: None if repository does not exist or | |
400 { | |
401 "id" : "<id>", | |
402 "repo_name" : "<reponame>" | |
403 "type" : "<type>", | |
404 "description" : "<description>", | |
405 "members" : [ | |
2244 | 406 { |
407 "type": "user", | |
408 "id" : "<userid>", | |
1928 | 409 "username" : "<username>", |
410 "firstname": "<firstname>", | |
411 "lastname" : "<lastname>", | |
412 "email" : "<email>", | |
413 "active" : "<bool>", | |
414 "admin" :Â "<bool>", | |
415 "ldap" : "<ldap_dn>", | |
416 "permission" : "repository.(read|write|admin)" | |
417 }, | |
418 … | |
2244 | 419 { |
420 "type": "users_group", | |
1928 | 421 "id" : "<usersgroupid>", |
422 "name" : "<usersgroupname>", | |
423 "active": "<bool>", | |
424 "permission" : "repository.(read|write|admin)" | |
425 }, | |
426 … | |
427 ] | |
428 } | |
429 error: null | |
430 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
431 |
1676 | 432 get_repos |
433 --------- | |
434 | |
435 Lists all existing repositories. This command can be executed only using api_key | |
436 belonging to user with admin rights | |
437 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
438 |
1676 | 439 INPUT:: |
440 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
441 id : <id_for_response> |
1676 | 442 api_key : "<api_key>" |
443 method : "get_repos" | |
444 args: { } | |
1580 | 445 |
446 OUTPUT:: | |
447 | |
1676 | 448 result: [ |
449 { | |
450 "id" : "<id>", | |
1928 | 451 "repo_name" : "<reponame>" |
1676 | 452 "type" : "<type>", |
453 "description" : "<description>" | |
454 }, | |
455 … | |
456 ] | |
457 error: null | |
458 | |
459 | |
1895
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
460 get_repo_nodes |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
461 -------------- |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
462 |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
463 returns a list of nodes and it's children in a flat list for a given path |
1928 | 464 at given revision. It's possible to specify ret_type to show only `files` or |
465 `dirs`. This command can be executed only using api_key belonging to user | |
1895
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
466 with admin rights |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
467 |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
468 |
1895
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
469 INPUT:: |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
470 |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
471 id : <id_for_response> |
1895
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
472 api_key : "<api_key>" |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
473 method : "get_repo_nodes" |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
474 args: { |
1928 | 475 "repo_name" : "<reponame>", |
1895
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
476 "revision" : "<revision>", |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
477 "root_path" : "<root_path>", |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
478 "ret_type" : "<ret_type>" = 'all' |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
479 } |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
480 |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
481 OUTPUT:: |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
482 |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
483 result: [ |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
484 { |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
485 "name" : "<name>" |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
486 "type" : "<type>", |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
487 }, |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
488 … |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
489 ] |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
490 error: null |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
491 |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1878
diff
changeset
|
492 |
1676 | 493 create_repo |
494 ----------- | |
495 | |
496 Creates a repository. This command can be executed only using api_key | |
497 belonging to user with admin rights. | |
498 If repository name contains "/", all needed repository groups will be created. | |
499 For example "foo/bar/baz" will create groups "foo", "bar" (with "foo" as parent), | |
500 and create "baz" repository with "bar" as group. | |
501 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
502 |
1676 | 503 INPUT:: |
504 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
505 id : <id_for_response> |
1676 | 506 api_key : "<api_key>" |
507 method : "create_repo" | |
508 args: { | |
1928 | 509 "repo_name" : "<reponame>", |
1676 | 510 "owner_name" : "<ownername>", |
511 "description" : "<description> = ''", | |
512 "repo_type" : "<type> = 'hg'", | |
2094
34d009e5147a
added clone_uri to API method for creating users
Marcin Kuzminski <marcin@python-works.com>
parents:
2091
diff
changeset
|
513 "private" : "<bool> = False", |
34d009e5147a
added clone_uri to API method for creating users
Marcin Kuzminski <marcin@python-works.com>
parents:
2091
diff
changeset
|
514 "clone_uri" : "<clone_uri> = None", |
1676 | 515 } |
516 | |
517 OUTPUT:: | |
518 | |
1928 | 519 result: { |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
520 "id": "<newrepoid>", |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
521 "msg": "Created new repository <reponame>", |
1928 | 522 } |
1676 | 523 error: null |
524 | |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
525 |
2091
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
526 delete_repo |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
527 ----------- |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
528 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
529 Deletes a repository. This command can be executed only using api_key |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
530 belonging to user with admin rights. |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
531 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
532 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
533 INPUT:: |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
534 |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
535 id : <id_for_response> |
2091
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
536 api_key : "<api_key>" |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
537 method : "delete_repo" |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
538 args: { |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
539 "repo_name" : "<reponame>", |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
540 } |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
541 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
542 OUTPUT:: |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
543 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
544 result: { |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
545 "msg": "Deleted repository <reponame>", |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
546 } |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
547 error: null |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
548 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2090
diff
changeset
|
549 |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
550 grant_user_permission |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
551 --------------------- |
1676 | 552 |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
553 Grant permission for user on given repository, or update existing one |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
554 if found. This command can be executed only using api_key belonging to user |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
555 with admin rights. |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
556 |
1676 | 557 |
558 INPUT:: | |
559 | |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
560 id : <id_for_response> |
1676 | 561 api_key : "<api_key>" |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
562 method : "grant_user_permission" |
1676 | 563 args: { |
564 "repo_name" : "<reponame>", | |
1928 | 565 "username" : "<username>", |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
566 "perm" : "(repository.(none|read|write|admin))", |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
567 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
568 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
569 OUTPUT:: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
570 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
571 result: { |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
572 "msg" : "Granted perm: <perm> for user: <username> in repo: <reponame>" |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
573 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
574 error: null |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
575 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
576 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
577 revoke_user_permission |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
578 ---------------------- |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
579 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
580 Revoke permission for user on given repository. This command can be executed |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
581 only using api_key belonging to user with admin rights. |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
582 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
583 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
584 INPUT:: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
585 |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
586 id : <id_for_response> |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
587 api_key : "<api_key>" |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
588 method : "revoke_user_permission" |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
589 args: { |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
590 "repo_name" : "<reponame>", |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
591 "username" : "<username>", |
1676 | 592 } |
593 | |
594 OUTPUT:: | |
595 | |
1928 | 596 result: { |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
597 "msg" : "Revoked perm for user: <suername> in repo: <reponame>" |
1928 | 598 } |
1676 | 599 error: null |
1878
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
600 |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
601 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
602 grant_users_group_permission |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
603 ---------------------------- |
1878
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
604 |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
605 Grant permission for users group on given repository, or update |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
606 existing one if found. This command can be executed only using |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
607 api_key belonging to user with admin rights. |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
608 |
1878
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
609 |
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
610 INPUT:: |
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
611 |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
612 id : <id_for_response> |
1878
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
613 api_key : "<api_key>" |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
614 method : "grant_users_group_permission" |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
615 args: { |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
616 "repo_name" : "<reponame>", |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
617 "group_name" : "<usersgroupname>", |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
618 "perm" : "(repository.(none|read|write|admin))", |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
619 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
620 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
621 OUTPUT:: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
622 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
623 result: { |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
624 "msg" : "Granted perm: <perm> for group: <usersgroupname> in repo: <reponame>" |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
625 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
626 error: null |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
627 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
628 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
629 revoke_users_group_permission |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
630 ----------------------------- |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
631 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
632 Revoke permission for users group on given repository.This command can be |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
633 executed only using api_key belonging to user with admin rights. |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
634 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
635 INPUT:: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
636 |
2241
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2191
diff
changeset
|
637 id : <id_for_response> |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
638 api_key : "<api_key>" |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
639 method : "revoke_users_group_permission" |
1878
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
640 args: { |
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
641 "repo_name" : "<reponame>", |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
642 "users_group" : "<usersgroupname>", |
1928 | 643 } |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
644 |
1928 | 645 OUTPUT:: |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
646 |
1928 | 647 result: { |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
648 "msg" : "Revoked perm for group: <usersgroupname> in repo: <reponame>" |
1928 | 649 } |
2070
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
2036
diff
changeset
|
650 error: null |