annotate docs/api/api.rst @ 3549:e4a4006faceb beta

no_cache version of scm is now a function
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 19 Mar 2013 23:43:40 +0100
parents 08e8115585bd
children b44979649915
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 .. _api:
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2
2095
Marcin Kuzminski <marcin@python-works.com>
parents: 2010
diff changeset
3 ===
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 API
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 ===
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 Starting from RhodeCode version 1.2 a simple API was implemented.
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
9 There's a single schema for calling all api methods. API is implemented
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
10 with JSON protocol both ways. An url to send API request to RhodeCode is
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
11 <your_server>/_admin/api
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12
1839
9da24750f563 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 1812
diff changeset
13 API ACCESS FOR WEB VIEWS
9da24750f563 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 1812
diff changeset
14 ++++++++++++++++++++++++
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
16 API access can also be turned on for each web view in RhodeCode that is
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
17 decorated with `@LoginRequired` decorator. To enable API access simple change
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
18 the standard login decorator to `@LoginRequired(api_access=True)`.
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
19 After this change, a rhodecode view can be accessed without login by adding a
1911
0bd97250cd36 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 1909
diff changeset
20 GET parameter `?api_key=<api_key>` to url. By default this is only
1812
320dec24fb9a Added instruction on enabling the API access to web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1810
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: 1810
diff changeset
22
320dec24fb9a Added instruction on enabling the API access to web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1810
diff changeset
23
1839
9da24750f563 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 1812
diff changeset
24 API ACCESS
9da24750f563 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 1812
diff changeset
25 ++++++++++
9da24750f563 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 1812
diff changeset
26
1708
fee9895fa46e changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents: 1592
diff changeset
27 All clients are required to send JSON-RPC spec JSON data::
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
29 {
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
30 "id:"<id>",
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
31 "api_key":"<api_key>",
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
32 "method":"<method_name>",
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
33 "args":{"<arg_key>":"<arg_val>"}
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
34 }
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
35
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
36 Example call for autopulling remotes repos using curl::
1708
fee9895fa46e changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents: 1592
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"}}'
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
38
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
39 Simply provide
1708
fee9895fa46e changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents: 1592
diff changeset
40 - *id* A value of any type, which is used to match the response with the request that it is replying to.
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
41 - *api_key* for access and permission validation.
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
42 - *method* is name of method to call
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
43 - *args* is an key:value list of arguments to pass to method
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
44
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
45 .. note::
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
46
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
47 api_key can be found in your user account page
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
48
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
49
1708
fee9895fa46e changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents: 1592
diff changeset
50 RhodeCode API will return always a JSON-RPC response::
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
51
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
52 {
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
53 "id":<id>, # matching id sent by request
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
54 "result": "<result>"|null, # JSON formatted result, null if any errors
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
55 "error": "null"|<error_message> # JSON formatted error (if any)
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
56 }
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
57
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
58 All responses from API will be `HTTP/1.0 200 OK`, if there's an error while
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
59 calling api *error* key from response will contain failure description
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
60 and result will be null.
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
61
2379
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
62
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
63 API CLIENT
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
64 ++++++++++
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
65
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
66 From version 1.4 RhodeCode adds a script that allows to easily
2379
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
67 communicate with API. After installing RhodeCode a `rhodecode-api` script
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
68 will be available.
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
69
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
70 To get started quickly simply run::
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
71
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
72 rhodecode-api _create_config --apikey=<youapikey> --apihost=<rhodecode host>
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
73
2379
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
74 This will create a file named .config in the directory you executed it storing
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
75 json config file with credentials. You can skip this step and always provide
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
76 both of the arguments to be able to communicate with server
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
77
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
78
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
79 after that simply run any api command for example get_repo::
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
80
2379
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
81 rhodecode-api get_repo
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
82
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
83 calling {"api_key": "<apikey>", "id": 75, "args": {}, "method": "get_repo"} to http://127.0.0.1:5000
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
84 rhodecode said:
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
85 {'error': 'Missing non optional `repoid` arg in JSON DATA',
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
86 'id': 75,
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
87 'result': None}
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
88
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
89 Ups looks like we forgot to add an argument
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
90
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
91 Let's try again now giving the repoid as parameters::
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
92
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
93 rhodecode-api get_repo repoid:rhodecode
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
94
2379
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
95 calling {"api_key": "<apikey>", "id": 39, "args": {"repoid": "rhodecode"}, "method": "get_repo"} to http://127.0.0.1:5000
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
96 rhodecode said:
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
97 {'error': None,
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
98 'id': 39,
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
99 'result': <json data...>}
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
100
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
101
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
102
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
103 API METHODS
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
104 +++++++++++
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
105
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
106
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
107 pull
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
108 ----
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
109
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
110 Pulls given repo from remote location. Can be used to automatically keep
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
111 remote repos up to date. This command can be executed only using api_key
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
112 belonging to user with admin rights
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
113
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
114 INPUT::
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
115
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
116 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
117 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
118 method : "pull"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
119 args : {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
120 "repoid" : "<reponame or repo_id>"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
121 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
122
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
123 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
124
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
125 id : <id_given_in_input>
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
126 result : "Pulled from `<reponame>`"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
127 error : null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
128
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
129
2697
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
130 rescan_repos
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
131 ------------
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
132
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
133 Dispatch rescan repositories action. If remove_obsolete is set
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
134 RhodeCode will delete repos that are in database but not in the filesystem.
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
135 This command can be executed only using api_key belonging to user with admin
2697
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
136 rights.
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
137
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
138 INPUT::
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
139
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
140 id : <id_for_response>
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
141 api_key : "<api_key>"
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
142 method : "rescan_repos"
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
143 args : {
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
144 "remove_obsolete" : "<boolean = Optional(False)>"
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
145 }
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
146
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
147 OUTPUT::
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
148
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
149 id : <id_given_in_input>
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
150 result : "{'added': [<list of names of added repos>],
2697
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
151 'removed': [<list of names of removed repos>]}"
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
152 error : null
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
153
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
154
3235
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
155 invalidate_cache
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
156 ----------------
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
157
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
158 Invalidate cache for repository.
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
159 This command can be executed only using api_key belonging to user with admin
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
160 rights or regular user that have write or admin or write access to repository.
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
161
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
162 INPUT::
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
163
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
164 id : <id_for_response>
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
165 api_key : "<api_key>"
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
166 method : "invalidate_cache"
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
167 args : {
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
168 "repoid" : "<reponame or repo_id>"
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
169 }
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
170
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
171 OUTPUT::
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
172
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
173 id : <id_given_in_input>
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
174 result : "Cache for repository `<reponame>` was invalidated: invalidated cache keys: <list_of_cache_keys>"
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
175 error : null
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
176
2737
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
177 lock
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
178 ----
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
179
3161
3563c47e52fd Implemented API calls for non-admin users for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 3127
diff changeset
180 Set locking state on given repository by given user. If userid param is skipped
3457
08e8115585bd calling lock function without lock attribute, will return lock state
Marcin Kuzminski <marcin@python-works.com>
parents: 3410
diff changeset
181 , then it is set to id of user whos calling this method. If locked param is skipped
08e8115585bd calling lock function without lock attribute, will return lock state
Marcin Kuzminski <marcin@python-works.com>
parents: 3410
diff changeset
182 then function shows current lock state of given repo.
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
183 This command can be executed only using api_key belonging to user with admin
3161
3563c47e52fd Implemented API calls for non-admin users for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 3127
diff changeset
184 rights or regular user that have admin or write access to repository.
2737
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
185
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
186 INPUT::
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
187
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
188 id : <id_for_response>
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
189 api_key : "<api_key>"
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
190 method : "lock"
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
191 args : {
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
192 "repoid" : "<reponame or repo_id>"
3161
3563c47e52fd Implemented API calls for non-admin users for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 3127
diff changeset
193 "userid" : "<user_id or username = Optional(=apiuser)>",
3457
08e8115585bd calling lock function without lock attribute, will return lock state
Marcin Kuzminski <marcin@python-works.com>
parents: 3410
diff changeset
194 "locked" : "<bool true|false = Optional(=None)>"
2737
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
195 }
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
196
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
197 OUTPUT::
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
198
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
199 id : <id_given_in_input>
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
200 result : "User `<username>` set lock state for repo `<reponame>` to `true|false`"
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
201 error : null
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
202
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
203
3126
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
204 show_ip
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
205 -------
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
206
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
207 Shows IP address as seen from RhodeCode server, together with all
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
208 defined IP addresses for given user.
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
209 This command can be executed only using api_key belonging to user with admin
3126
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
210 rights.
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
211
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
212 INPUT::
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
213
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
214 id : <id_for_response>
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
215 api_key : "<api_key>"
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
216 method : "show_ip"
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
217 args : {
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
218 "userid" : "<user_id or username>",
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
219 }
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
220
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
221 OUTPUT::
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
222
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
223 id : <id_given_in_input>
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
224 result : {
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
225 "ip_addr_server": <ip_from_clien>",
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
226 "user_ips": [
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
227 {
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
228 "ip_addr": "<ip_with_mask>",
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
229 "ip_range": ["<start_ip>", "<end_ip>"],
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
230 },
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
231 ...
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
232 ]
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
233 }
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
234
3126
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
235 error : null
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
236
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
237
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
238 get_user
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
239 --------
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
240
2010
14dffcfebb02 API get_user and get_repo methods can fetch by id or names
Marcin Kuzminski <marcin@python-works.com>
parents: 2009
diff changeset
241 Get's an user by username or user_id, Returns empty result if user is not found.
3162
a0a8f38e8fb8 API method get_user can be executed by non-admin users ref #539
Marcin Kuzminski <marcin@python-works.com>
parents: 3161
diff changeset
242 If userid param is skipped it is set to id of user who is calling this method.
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
243 This command can be executed only using api_key belonging to user with admin
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
244 rights, or regular users that cannot specify different userid than theirs
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
245
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
246
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
247 INPUT::
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
248
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
249 id : <id_for_response>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
250 api_key : "<api_key>"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
251 method : "get_user"
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
252 args : {
3162
a0a8f38e8fb8 API method get_user can be executed by non-admin users ref #539
Marcin Kuzminski <marcin@python-works.com>
parents: 3161
diff changeset
253 "userid" : "<username or user_id Optional(=apiuser)>"
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
254 }
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
255
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
256 OUTPUT::
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
257
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
258 id : <id_given_in_input>
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
259 result: None if user does not exist or
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
260 {
3127
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
261 "user_id" : "<user_id>",
3213
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
262 "api_key" : "<api_key>",
3127
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
263 "username" : "<username>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
264 "firstname": "<firstname>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
265 "lastname" : "<lastname>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
266 "email" : "<email>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
267 "emails": "<list_of_all_additional_emails>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
268 "ip_addresses": "<list_of_ip_addresses_for_user>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
269 "active" : "<bool>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
270 "admin" :  "<bool>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
271 "ldap_dn" : "<ldap_dn>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
272 "last_login": "<last_login>",
2151
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
273 "permissions": {
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
274 "global": ["hg.create.repository",
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
275 "repository.read",
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
276 "hg.register.manual_activate"],
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
277 "repositories": {"repo1": "repository.none"},
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
278 "repositories_groups": {"Group1": "group.read"}
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
279 },
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
280 }
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
281
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
282 error: null
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
283
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
284
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
285 get_users
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
286 ---------
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
287
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
288 Lists all existing users. This command can be executed only using api_key
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
289 belonging to user with admin rights.
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
290
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
291
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
292 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
293
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
294 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
295 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
296 method : "get_users"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
297 args : { }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
298
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
299 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
300
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
301 id : <id_given_in_input>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
302 result: [
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
303 {
3127
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
304 "user_id" : "<user_id>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
305 "username" : "<username>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
306 "firstname": "<firstname>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
307 "lastname" : "<lastname>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
308 "email" : "<email>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
309 "emails": "<list_of_all_additional_emails>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
310 "ip_addresses": "<list_of_ip_addresses_for_user>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
311 "active" : "<bool>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
312 "admin" :  "<bool>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
313 "ldap_dn" : "<ldap_dn>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
314 "last_login": "<last_login>",
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
315 },
3267
7b74079beec9 coding style: fix trailing and leading spaces and tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3235
diff changeset
316 …
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
317 ]
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
318 error: null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
319
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
320
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
321 create_user
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
322 -----------
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
323
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
324 Creates new user. This command can
1909
f2bd5b0c1094 create user api_doc update
Marcin Kuzminski <marcin@python-works.com>
parents: 1843
diff changeset
325 be executed only using api_key belonging to user with admin rights.
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
326
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
327
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
328 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
329
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
330 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
331 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
332 method : "create_user"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
333 args : {
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
334 "username" : "<username>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
335 "email" : "<useremail>",
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
336 "password" : "<password>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
337 "firstname" : "<firstname> = Optional(None)",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
338 "lastname" : "<lastname> = Optional(None)",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
339 "active" : "<bool> = Optional(True)",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
340 "admin" : "<bool> = Optional(False)",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
341 "ldap_dn" : "<ldap_dn> = Optional(None)"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
342 }
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
343
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
344 OUTPUT::
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
345
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
346 id : <id_given_in_input>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
347 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
348 "msg" : "created new user `<username>`",
2365
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
349 "user": {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
350 "user_id" : "<user_id>",
2365
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
351 "username" : "<username>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
352 "firstname": "<firstname>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
353 "lastname" : "<lastname>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
354 "email" : "<email>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
355 "emails": "<list_of_all_additional_emails>",
2365
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
356 "active" : "<bool>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
357 "admin" :  "<bool>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
358 "ldap_dn" : "<ldap_dn>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
359 "last_login": "<last_login>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
360 },
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
361 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
362 error: null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
363
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
364
2002
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
365 update_user
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
366 -----------
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
367
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
368 updates given user if such user exists. This command can
2002
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
369 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: 1989
diff changeset
370
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
371
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
372 INPUT::
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
373
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
374 id : <id_for_response>
2002
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
375 api_key : "<api_key>"
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
376 method : "update_user"
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
377 args : {
2009
b63adad7c4af API updates
Marcin Kuzminski <marcin@python-works.com>
parents: 2006
diff changeset
378 "userid" : "<user_id or username>",
3162
a0a8f38e8fb8 API method get_user can be executed by non-admin users ref #539
Marcin Kuzminski <marcin@python-works.com>
parents: 3161
diff changeset
379 "username" : "<username> = Optional(None)",
a0a8f38e8fb8 API method get_user can be executed by non-admin users ref #539
Marcin Kuzminski <marcin@python-works.com>
parents: 3161
diff changeset
380 "email" : "<useremail> = Optional(None)",
a0a8f38e8fb8 API method get_user can be executed by non-admin users ref #539
Marcin Kuzminski <marcin@python-works.com>
parents: 3161
diff changeset
381 "password" : "<password> = Optional(None)",
a0a8f38e8fb8 API method get_user can be executed by non-admin users ref #539
Marcin Kuzminski <marcin@python-works.com>
parents: 3161
diff changeset
382 "firstname" : "<firstname> = Optional(None)",
a0a8f38e8fb8 API method get_user can be executed by non-admin users ref #539
Marcin Kuzminski <marcin@python-works.com>
parents: 3161
diff changeset
383 "lastname" : "<lastname> = Optional(None)",
a0a8f38e8fb8 API method get_user can be executed by non-admin users ref #539
Marcin Kuzminski <marcin@python-works.com>
parents: 3161
diff changeset
384 "active" : "<bool> = Optional(None)",
a0a8f38e8fb8 API method get_user can be executed by non-admin users ref #539
Marcin Kuzminski <marcin@python-works.com>
parents: 3161
diff changeset
385 "admin" : "<bool> = Optional(None)",
a0a8f38e8fb8 API method get_user can be executed by non-admin users ref #539
Marcin Kuzminski <marcin@python-works.com>
parents: 3161
diff changeset
386 "ldap_dn" : "<ldap_dn> = Optional(None)"
2002
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
387 }
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
388
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
389 OUTPUT::
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
390
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
391 id : <id_given_in_input>
2002
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
392 result: {
2507
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
393 "msg" : "updated user ID:<userid> <username>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
394 "user": {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
395 "user_id" : "<user_id>",
2507
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
396 "username" : "<username>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
397 "firstname": "<firstname>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
398 "lastname" : "<lastname>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
399 "email" : "<email>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
400 "emails": "<list_of_all_additional_emails>",
2507
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
401 "active" : "<bool>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
402 "admin" :  "<bool>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
403 "ldap_dn" : "<ldap_dn>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
404 "last_login": "<last_login>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
405 },
2365
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
406 }
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
407 error: null
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
408
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
409
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
410 delete_user
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
411 -----------
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
412
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
413
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
414 deletes givenuser if such user exists. This command can
2365
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
415 be executed only using api_key belonging to user with admin rights.
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
416
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
417
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
418 INPUT::
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
419
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
420 id : <id_for_response>
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
421 api_key : "<api_key>"
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
422 method : "delete_user"
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
423 args : {
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
424 "userid" : "<user_id or username>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
425 }
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
426
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
427 OUTPUT::
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
428
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
429 id : <id_given_in_input>
2365
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
430 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
431 "msg" : "deleted user ID:<userid> <username>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
432 "user": null
2002
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
433 }
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
434 error: null
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
435
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
436
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
437 get_users_group
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
438 ---------------
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
439
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
440 Gets an existing user group. This command can be executed only using api_key
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
441 belonging to user with admin rights.
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
442
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
443
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
444 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
445
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
446 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
447 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
448 method : "get_users_group"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
449 args : {
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
450 "usersgroupid" : "<user group id or name>"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
451 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
452
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
453 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
454
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
455 id : <id_given_in_input>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
456 result : None if group not exist
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
457 {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
458 "users_group_id" : "<id>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
459 "group_name" : "<groupname>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
460 "active": "<bool>",
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
461 "members" : [
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
462 {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
463 "user_id" : "<user_id>",
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
464 "username" : "<username>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
465 "firstname": "<firstname>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
466 "lastname" : "<lastname>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
467 "email" : "<email>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
468 "emails": "<list_of_all_additional_emails>",
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
469 "active" : "<bool>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
470 "admin" :  "<bool>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
471 "ldap_dn" : "<ldap_dn>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
472 "last_login": "<last_login>",
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
473 },
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
474 …
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
475 ]
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
476 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
477 error : null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
478
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
479
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
480 get_users_groups
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
481 ----------------
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
482
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
483 Lists all existing user groups. This command can be executed only using
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
484 api_key belonging to user with admin rights.
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
485
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
486
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
487 INPUT::
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
488
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
489 id : <id_for_response>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
490 api_key : "<api_key>"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
491 method : "get_users_groups"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
492 args : { }
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
493
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
494 OUTPUT::
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
495
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
496 id : <id_given_in_input>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
497 result : [
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
498 {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
499 "users_group_id" : "<id>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
500 "group_name" : "<groupname>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
501 "active": "<bool>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
502 },
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
503 …
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
504 ]
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
505 error : null
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
506
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
507
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
508 create_users_group
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
509 ------------------
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
510
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
511 Creates new user group. This command can be executed only using api_key
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
512 belonging to user with admin rights
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
513
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
514
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
515 INPUT::
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
516
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
517 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
518 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
519 method : "create_users_group"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
520 args: {
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
521 "group_name": "<groupname>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
522 "active":"<bool> = Optional(True)"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
523 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
524
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
525 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
526
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
527 id : <id_given_in_input>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
528 result: {
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
529 "msg": "created new user group `<groupname>`",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
530 "users_group": {
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
531 "users_group_id" : "<id>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
532 "group_name" : "<groupname>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
533 "active": "<bool>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
534 },
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
535 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
536 error: null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
537
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
538
1793
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
539 add_user_to_users_group
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
540 -----------------------
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
541
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
542 Adds a user to a user group. If user exists in that group success will be
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
543 `false`. This command can be executed only using api_key
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
544 belonging to user with admin rights
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
545
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
546
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
547 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
548
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
549 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
550 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
551 method : "add_user_users_group"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
552 args: {
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
553 "usersgroupid" : "<user group id or name>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
554 "userid" : "<user_id or username>",
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
555 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
556
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
557 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
558
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
559 id : <id_given_in_input>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
560 result: {
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
561 "success": True|False # depends on if member is in group
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
562 "msg": "added member `<username>` to user group `<groupname>` |
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
563 User is already in that group"
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
564 }
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
565 error: null
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
566
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
567
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
568 remove_user_from_users_group
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
569 ----------------------------
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
570
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
571 Removes a user from a user group. If user is not in given group success will
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
572 be `false`. This command can be executed only
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
573 using api_key belonging to user with admin rights
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
574
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
575
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
576 INPUT::
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
577
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
578 id : <id_for_response>
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
579 api_key : "<api_key>"
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
580 method : "remove_user_from_users_group"
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
581 args: {
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
582 "usersgroupid" : "<user group id or name>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
583 "userid" : "<user_id or username>",
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
584 }
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
585
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
586 OUTPUT::
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
587
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
588 id : <id_given_in_input>
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
589 result: {
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
590 "success": True|False, # depends on if member is in group
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
591 "msg": "removed member <username> from user group <groupname> |
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
592 User wasn't in group"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
593 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
594 error: null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
595
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
596
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
597 get_repo
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
598 --------
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
599
2146
ee45677c4edc Api docs fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2143
diff changeset
600 Gets an existing repository by it's name or repository_id. Members will return
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
601 either users_group or user associated to that repository. This command can be
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
602 executed only using api_key belonging to user with admin
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
603 rights or regular user that have at least read access to repository.
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
604
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
605
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
606 INPUT::
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
607
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
608 id : <id_for_response>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
609 api_key : "<api_key>"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
610 method : "get_repo"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
611 args: {
2010
14dffcfebb02 API get_user and get_repo methods can fetch by id or names
Marcin Kuzminski <marcin@python-works.com>
parents: 2009
diff changeset
612 "repoid" : "<reponame or repo_id>"
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
613 }
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
614
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
615 OUTPUT::
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
616
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
617 id : <id_given_in_input>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
618 result: None if repository does not exist or
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
619 {
3115
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
620 "repo_id" : "<repo_id>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
621 "repo_name" : "<reponame>"
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
622 "repo_type" : "<repo_type>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
623 "clone_uri" : "<clone_uri>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
624 "enable_downloads": "<bool>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
625 "enable_locking": "<bool>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
626 "enable_statistics": "<bool>",
3115
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
627 "private": "<bool>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
628 "created_on" : "<date_time_created>",
3115
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
629 "description" : "<description>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
630 "landing_rev": "<landing_rev>",
3174
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
631 "last_changeset": {
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
632 "author": "<full_author>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
633 "date": "<date_time_of_commit>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
634 "message": "<commit_message>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
635 "raw_id": "<raw_id>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
636 "revision": "<numeric_revision>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
637 "short_id": "<short_id>"
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
638 }
3115
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
639 "owner": "<repo_owner>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
640 "fork_of": "<name_of_fork_parent>",
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
641 "members" : [
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
642 {
3213
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
643 "type": "user",
3174
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
644 "user_id" : "<user_id>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
645 "username" : "<username>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
646 "firstname": "<firstname>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
647 "lastname" : "<lastname>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
648 "email" : "<email>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
649 "emails": "<list_of_all_additional_emails>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
650 "active" : "<bool>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
651 "admin" :  "<bool>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
652 "ldap_dn" : "<ldap_dn>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
653 "last_login": "<last_login>",
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
654 "permission" : "repository.(read|write|admin)"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
655 },
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
656 …
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
657 {
3213
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
658 "type": "users_group",
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
659 "id" : "<usersgroupid>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
660 "name" : "<usersgroupname>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
661 "active": "<bool>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
662 "permission" : "repository.(read|write|admin)"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
663 },
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
664 …
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
665 ]
3213
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
666 "followers": [
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
667 {
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
668 "user_id" : "<user_id>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
669 "username" : "<username>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
670 "firstname": "<firstname>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
671 "lastname" : "<lastname>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
672 "email" : "<email>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
673 "emails": "<list_of_all_additional_emails>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
674 "ip_addresses": "<list_of_ip_addresses_for_user>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
675 "active" : "<bool>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
676 "admin" :  "<bool>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
677 "ldap_dn" : "<ldap_dn>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
678 "last_login": "<last_login>",
3213
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
679 },
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
680 …
3213
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
681 ]
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
682 }
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
683 error: null
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
684
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
685
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
686 get_repos
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
687 ---------
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
688
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
689 Lists all existing repositories. This command can be executed only using
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
690 api_key belonging to user with admin rights or regular user that have
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
691 admin, write or read access to repository.
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
692
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
693
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
694 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
695
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
696 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
697 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
698 method : "get_repos"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
699 args: { }
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
700
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
701 OUTPUT::
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
702
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
703 id : <id_given_in_input>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
704 result: [
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
705 {
3115
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
706 "repo_id" : "<repo_id>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
707 "repo_name" : "<reponame>"
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
708 "repo_type" : "<repo_type>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
709 "clone_uri" : "<clone_uri>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
710 "private": : "<bool>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
711 "created_on" : "<datetimecreated>",
3115
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
712 "description" : "<description>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
713 "landing_rev": "<landing_rev>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
714 "owner": "<repo_owner>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
715 "fork_of": "<name_of_fork_parent>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
716 "enable_downloads": "<bool>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
717 "enable_locking": "<bool>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
718 "enable_statistics": "<bool>",
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
719 },
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
720 …
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
721 ]
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
722 error: null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
723
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
724
1810
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
725 get_repo_nodes
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
726 --------------
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
727
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
728 returns a list of nodes and it's children in a flat list for a given path
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
729 at given revision. It's possible to specify ret_type to show only `files` or
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
730 `dirs`. This command can be executed only using api_key belonging to user
1810
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
731 with admin rights
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
732
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
733
1810
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
734 INPUT::
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
735
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
736 id : <id_for_response>
1810
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
737 api_key : "<api_key>"
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
738 method : "get_repo_nodes"
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
739 args: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
740 "repoid" : "<reponame or repo_id>"
1810
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
741 "revision" : "<revision>",
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
742 "root_path" : "<root_path>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
743 "ret_type" : "<ret_type> = Optional('all')"
1810
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
744 }
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
745
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
746 OUTPUT::
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
747
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
748 id : <id_given_in_input>
1810
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
749 result: [
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
750 {
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
751 "name" : "<name>"
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
752 "type" : "<type>",
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
753 },
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
754 …
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
755 ]
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
756 error: null
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
757
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
758
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
759 create_repo
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
760 -----------
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
761
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
762 Creates a repository. If repository name contains "/", all needed repository
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
763 groups will be created. For example "foo/bar/baz" will create groups
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
764 "foo", "bar" (with "foo" as parent), and create "baz" repository with
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
765 "bar" as group. This command can be executed only using api_key belonging to user with admin
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
766 rights or regular user that have create repository permission. Regular users
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
767 cannot specify owner parameter
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
768
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
769
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
770 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
771
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
772 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
773 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
774 method : "create_repo"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
775 args: {
3115
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
776 "repo_name" : "<reponame>",
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
777 "owner" : "<onwer_name_or_id = Optional(=apiuser)>",
3115
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
778 "repo_type" : "<repo_type> = Optional('hg')",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
779 "description" : "<description> = Optional('')",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
780 "private" : "<bool> = Optional(False)",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
781 "clone_uri" : "<clone_uri> = Optional(None)",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
782 "landing_rev" : "<landing_rev> = Optional('tip')",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
783 "enable_downloads": "<bool> = Optional(False)",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
784 "enable_locking": "<bool> = Optional(False)",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
785 "enable_statistics": "<bool> = Optional(False)",
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
786 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
787
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
788 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
789
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
790 id : <id_given_in_input>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
791 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
792 "msg": "Created new repository `<reponame>`",
2378
04ef27ce939e API: create_repo returns now repo object after creation
Marcin Kuzminski <marcin@python-works.com>
parents: 2365
diff changeset
793 "repo": {
3115
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
794 "repo_id" : "<repo_id>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
795 "repo_name" : "<reponame>"
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
796 "repo_type" : "<repo_type>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
797 "clone_uri" : "<clone_uri>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
798 "private": : "<bool>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
799 "created_on" : "<datetimecreated>",
3115
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
800 "description" : "<description>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
801 "landing_rev": "<landing_rev>",
3122
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
802 "owner": "<username or user_id>",
3115
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
803 "fork_of": "<name_of_fork_parent>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
804 "enable_downloads": "<bool>",
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
805 "enable_locking": "<bool>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
806 "enable_statistics": "<bool>",
2378
04ef27ce939e API: create_repo returns now repo object after creation
Marcin Kuzminski <marcin@python-works.com>
parents: 2365
diff changeset
807 },
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
808 }
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
809 error: null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
810
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
811
3122
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
812 fork_repo
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
813 ---------
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
814
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
815 Creates a fork of given repo. In case of using celery this will
3122
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
816 immidiatelly return success message, while fork is going to be created
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
817 asynchronous. This command can be executed only using api_key belonging to
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
818 user with admin rights or regular user that have fork permission, and at least
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
819 read access to forking repository. Regular users cannot specify owner parameter.
3122
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
820
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
821
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
822 INPUT::
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
823
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
824 id : <id_for_response>
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
825 api_key : "<api_key>"
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
826 method : "fork_repo"
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
827 args: {
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
828 "repoid" : "<reponame or repo_id>",
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
829 "fork_name": "<forkname>",
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
830 "owner": "<username or user_id = Optional(=apiuser)>",
3122
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
831 "description": "<description>",
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
832 "copy_permissions": "<bool>",
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
833 "private": "<bool>",
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
834 "landing_rev": "<landing_rev>"
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
835
3122
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
836 }
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
837
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
838 OUTPUT::
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
839
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
840 id : <id_given_in_input>
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
841 result: {
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
842 "msg": "Created fork of `<reponame>` as `<forkname>`",
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
843 "success": true
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
844 }
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
845 error: null
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
846
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
847
2003
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
848 delete_repo
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
849 -----------
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
850
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
851 Deletes a repository. This command can be executed only using api_key belonging to user with admin
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
852 rights or regular user that have admin access to repository.
2003
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
853
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
854
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
855 INPUT::
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
856
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
857 id : <id_for_response>
2003
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
858 api_key : "<api_key>"
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
859 method : "delete_repo"
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
860 args: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
861 "repoid" : "<reponame or repo_id>"
2003
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
862 }
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
863
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
864 OUTPUT::
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
865
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
866 id : <id_given_in_input>
2003
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
867 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
868 "msg": "Deleted repository `<reponame>`",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
869 "success": true
2003
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
870 }
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
871 error: null
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
872
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
873
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
874 grant_user_permission
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
875 ---------------------
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
876
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
877 Grant permission for user on given repository, or update existing one
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
878 if found. This command can be executed only using api_key belonging to user
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
879 with admin rights.
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
880
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
881
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
882 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
883
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
884 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
885 api_key : "<api_key>"
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
886 method : "grant_user_permission"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
887 args: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
888 "repoid" : "<reponame or repo_id>"
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
889 "userid" : "<username or user_id>"
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
890 "perm" : "(repository.(none|read|write|admin))",
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
891 }
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
892
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
893 OUTPUT::
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
894
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
895 id : <id_given_in_input>
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
896 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
897 "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
898 "success": true
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
899 }
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
900 error: null
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
901
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
902
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
903 revoke_user_permission
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
904 ----------------------
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
905
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
906 Revoke permission for user on given repository. This command can be executed
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
907 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: 1950
diff changeset
908
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
909
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
910 INPUT::
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
911
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
912 id : <id_for_response>
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
913 api_key : "<api_key>"
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
914 method : "revoke_user_permission"
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
915 args: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
916 "repoid" : "<reponame or repo_id>"
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
917 "userid" : "<username or user_id>"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
918 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
919
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
920 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
921
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
922 id : <id_given_in_input>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
923 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
924 "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
925 "success": true
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
926 }
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
927 error: null
1793
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
928
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
929
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
930 grant_users_group_permission
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
931 ----------------------------
1793
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
932
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
933 Grant permission for user group on given repository, or update
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
934 existing one if found. This command can be executed only using
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
935 api_key belonging to user with admin rights.
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
936
1793
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
937
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
938 INPUT::
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
939
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
940 id : <id_for_response>
1793
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
941 api_key : "<api_key>"
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
942 method : "grant_users_group_permission"
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
943 args: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
944 "repoid" : "<reponame or repo_id>"
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
945 "usersgroupid" : "<user group id or name>"
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
946 "perm" : "(repository.(none|read|write|admin))",
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
947 }
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
948
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
949 OUTPUT::
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
950
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
951 id : <id_given_in_input>
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
952 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
953 "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
954 "success": true
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
955 }
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
956 error: null
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
957
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
958
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
959 revoke_users_group_permission
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
960 -----------------------------
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
961
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
962 Revoke permission for user group on given repository.This command can be
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
963 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: 1950
diff changeset
964
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
965 INPUT::
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
966
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
967 id : <id_for_response>
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
968 api_key : "<api_key>"
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
969 method : "revoke_users_group_permission"
1793
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
970 args: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
971 "repoid" : "<reponame or repo_id>"
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
972 "usersgroupid" : "<user group id or name>"
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
973 }
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
974
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
975 OUTPUT::
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
976
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
977 id : <id_given_in_input>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
978 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
979 "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
980 "success": true
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
981 }
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
982 error: null