Mercurial > kallithea
annotate docs/api/api.rst @ 5070:6c631f531a06
changelog_summary: show changeset status label rather than raw status
Instead of showing the changeset status as e.g. under_review, use 'Under
Review', like all other similar code.
author | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> |
---|---|
date | Wed, 22 Apr 2015 22:10:11 +0200 |
parents | 4e6dfdb3fa01 |
children | 6620542597d3 |
rev | line source |
---|---|
1446 | 1 .. _api: |
2 | |
2095 | 3 === |
1446 | 4 API |
5 === | |
6 | |
7 | |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
8 Kallithea has a simple JSON RPC API with a single schema for calling all API |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
9 methods. Everything is available by sending JSON encoded http(s) requests to |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
10 <your_server>/_admin/api . |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
11 |
1446 | 12 |
4902 | 13 API access for web views |
1839 | 14 ++++++++++++++++++++++++ |
1446 | 15 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4189
diff
changeset
|
16 API access can also be turned on for each web view in Kallithea that is |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
17 decorated with the ``@LoginRequired`` decorator. Some views use |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
18 ``@LoginRequired(api_access=True)`` and are always available. By default only |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
19 RSS/ATOM feed views are enabled. Other views are |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
20 only available if they have been white listed. Edit the |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
21 ``api_access_controllers_whitelist`` option in your .ini file and define views |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
22 that should have API access enabled. |
3769
6a820dcbcb99
update docs about the API access whitelist option
Marcin Kuzminski <marcin@python-works.com>
parents:
3759
diff
changeset
|
23 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
24 For example, to enable API access to patch/diff raw file and archive:: |
3769
6a820dcbcb99
update docs about the API access whitelist option
Marcin Kuzminski <marcin@python-works.com>
parents:
3759
diff
changeset
|
25 |
3777 | 26 api_access_controllers_whitelist = |
3769
6a820dcbcb99
update docs about the API access whitelist option
Marcin Kuzminski <marcin@python-works.com>
parents:
3759
diff
changeset
|
27 ChangesetController:changeset_patch, |
6a820dcbcb99
update docs about the API access whitelist option
Marcin Kuzminski <marcin@python-works.com>
parents:
3759
diff
changeset
|
28 ChangesetController:changeset_raw, |
6a820dcbcb99
update docs about the API access whitelist option
Marcin Kuzminski <marcin@python-works.com>
parents:
3759
diff
changeset
|
29 FilesController:raw, |
6a820dcbcb99
update docs about the API access whitelist option
Marcin Kuzminski <marcin@python-works.com>
parents:
3759
diff
changeset
|
30 FilesController:archivefile |
6a820dcbcb99
update docs about the API access whitelist option
Marcin Kuzminski <marcin@python-works.com>
parents:
3759
diff
changeset
|
31 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
32 After this change, a Kallithea view can be accessed without login by adding a |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
33 GET parameter ``?api_key=<api_key>`` to the URL. |
3769
6a820dcbcb99
update docs about the API access whitelist option
Marcin Kuzminski <marcin@python-works.com>
parents:
3759
diff
changeset
|
34 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
35 Exposing raw diffs is a good way to integrate with |
3769
6a820dcbcb99
update docs about the API access whitelist option
Marcin Kuzminski <marcin@python-works.com>
parents:
3759
diff
changeset
|
36 3rd party services like code review, or build farms that could download archives. |
1812
320dec24fb9a
Added instruction on enabling the API access to web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
37 |
320dec24fb9a
Added instruction on enabling the API access to web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1810
diff
changeset
|
38 |
4902 | 39 API access |
1839 | 40 ++++++++++ |
41 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
42 Clients must send JSON encoded JSON-RPC requests:: |
1446 | 43 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
44 { |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
45 "id: "<id>", |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
46 "api_key": "<api_key>", |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
47 "method": "<method_name>", |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
48 "args": {"<arg_key>": "<arg_val>"} |
1446 | 49 } |
50 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
51 For example, to pull to a local "CPython" mirror using curl:: |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
52 |
1708
fee9895fa46e
changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents:
1592
diff
changeset
|
53 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 | 54 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
55 In general, provide |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
56 - *id*, a value of any type, can be used to match the response with the request that it is replying to. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
57 - *api_key*, for authentication and permission validation. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
58 - *method*, the name of the method to call - a list of available methods can be found below. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
59 - *args*, the arguments to pass to the method. |
1592 | 60 |
1446 | 61 .. note:: |
1592 | 62 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
63 api_key can be found or set on the user account page |
1592 | 64 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
65 The response to the JSON-RPC API call will always be a JSON structure:: |
1592 | 66 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
67 { |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
68 "id":<id>, # the id that was used in the request |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
69 "result": "<result>"|null, # JSON formatted result, null if any errors |
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
70 "error": "null"|<error_message> # JSON formatted error (if any) |
1446 | 71 } |
72 | |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
73 All responses from API will be ``HTTP/1.0 200 OK``. If there is an error, |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
74 the reponse will have a failure description in *error* and |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
75 *result* will be null. |
1446 | 76 |
2379
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
77 |
4902 | 78 API client |
2379
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
79 ++++++++++ |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
80 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
81 Kallithea comes with a ``kallithea-api`` command line tool providing a convenient |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
82 way to call the JSON-RPC API. |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
83 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
84 For example, to call ``get_repo``:: |
2379
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
85 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
86 kallithea-api --apihost=<your.kallithea.server.url> --apikey=<yourapikey> get_repo |
2379
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
87 |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
88 calling {"api_key": "<apikey>", "id": 75, "args": {}, "method": "get_repo"} to http://127.0.0.1:5000 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4189
diff
changeset
|
89 Kallithea said: |
2379
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
90 {'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
|
91 'id': 75, |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
92 'result': None} |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
93 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
94 Oops, looks like we forgot to add an argument. Let's try again, now |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
95 providing the ``repoid`` as a parameter:: |
2379
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
96 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4189
diff
changeset
|
97 kallithea-api get_repo repoid:myrepo |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
98 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4189
diff
changeset
|
99 calling {"api_key": "<apikey>", "id": 39, "args": {"repoid": "myrepo"}, "method": "get_repo"} to http://127.0.0.1:5000 |
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4189
diff
changeset
|
100 Kallithea said: |
2379
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
101 {'error': None, |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
102 'id': 39, |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
103 '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
|
104 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
105 To avoid specifying ``apihost`` and ``apikey`` every time, run:: |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
106 |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
107 kallithea-api --save-config --apihost=<your.kallithea.server.url> --apikey=<yourapikey> |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
108 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
109 This will create a ``~/.config/kallithea`` with the specified hostname and apikey |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
110 so you don't have to specify them every time. |
2379
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
111 |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
112 |
4902 | 113 API methods |
1446 | 114 +++++++++++ |
115 | |
1592 | 116 |
1446 | 117 pull |
118 ---- | |
119 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
120 Pull the given repo from remote location. Can be used to automatically keep |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
121 remote repos up to date. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
122 This command can only be executed using the api_key of a user with admin rights. |
1500 | 123 |
124 INPUT:: | |
125 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
126 id : <id_for_response> |
1592 | 127 api_key : "<api_key>" |
128 method : "pull" | |
129 args : { | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
130 "repoid" : "<reponame or repo_id>" |
1592 | 131 } |
132 | |
133 OUTPUT:: | |
134 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
135 id : <id_given_in_input> |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
136 result : "Pulled from `<reponame>`" |
1592 | 137 error : null |
138 | |
139 | |
2697
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
140 rescan_repos |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
141 ------------ |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
142 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
143 Rescan repositories. If ``remove_obsolete`` is set, |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
144 Kallithea will delete repos that are in the database but not in the filesystem. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
145 This command can only be executed using the api_key of a user with admin rights. |
2697
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 INPUT:: |
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_for_response> |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
150 api_key : "<api_key>" |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
151 method : "rescan_repos" |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
152 args : { |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
153 "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
|
154 } |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
155 |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
156 OUTPUT:: |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
157 |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
158 id : <id_given_in_input> |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
159 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
|
160 '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
|
161 error : null |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
162 |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
163 |
3235
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
164 invalidate_cache |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
165 ---------------- |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
166 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
167 Invalidate the cache for a repository. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
168 This command can only be executed using the api_key of a user with admin rights, |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
169 or that of a regular user with admin or write access to the repository. |
3235
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 INPUT:: |
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_for_response> |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
174 api_key : "<api_key>" |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
175 method : "invalidate_cache" |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
176 args : { |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
177 "repoid" : "<reponame or repo_id>" |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
178 } |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
179 |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
180 OUTPUT:: |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
181 |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
182 id : <id_given_in_input> |
3759
12ca667b69b6
api: don't report invalidated cache_keys after invalidating a repo
Mads Kiilerich <madski@unity3d.com>
parents:
3714
diff
changeset
|
183 result : "Caches of repository `<reponame>`" |
3235
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
184 error : null |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
185 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
186 |
2737
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
187 lock |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
188 ---- |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
189 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
190 Set the locking state on the given repository by the given user. |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
191 If the param ``userid`` is skipped, it is set to the ID of the user who is calling this method. |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
192 If param ``locked`` is skipped, the current lock state of the repository is returned. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
193 This command can only be executed using the api_key of a user with admin rights, or that of a regular user with admin or write access to the repository. |
2737
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
194 |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
195 INPUT:: |
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 id : <id_for_response> |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
198 api_key : "<api_key>" |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
199 method : "lock" |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
200 args : { |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
201 "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
|
202 "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
|
203 "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
|
204 } |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
205 |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
206 OUTPUT:: |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
207 |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
208 id : <id_given_in_input> |
3809
647fb653048e
make the password optional in API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3808
diff
changeset
|
209 result : { |
3808
2feb58495f34
locking API returns objects instead of string messages.
Marcin Kuzminski <marcin@python-works.com>
parents:
3777
diff
changeset
|
210 "repo": "<reponame>", |
2feb58495f34
locking API returns objects instead of string messages.
Marcin Kuzminski <marcin@python-works.com>
parents:
3777
diff
changeset
|
211 "locked": "<bool true|false>", |
2feb58495f34
locking API returns objects instead of string messages.
Marcin Kuzminski <marcin@python-works.com>
parents:
3777
diff
changeset
|
212 "locked_since": "<float lock_time>", |
2feb58495f34
locking API returns objects instead of string messages.
Marcin Kuzminski <marcin@python-works.com>
parents:
3777
diff
changeset
|
213 "locked_by": "<username>", |
2feb58495f34
locking API returns objects instead of string messages.
Marcin Kuzminski <marcin@python-works.com>
parents:
3777
diff
changeset
|
214 "msg": "User `<username>` set lock state for repo `<reponame>` to `<false|true>`" |
3809
647fb653048e
make the password optional in API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3808
diff
changeset
|
215 } |
2737
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
216 error : null |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
217 |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
218 |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
219 get_ip |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
220 ------ |
3126
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
221 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
222 Return IP address as seen from Kallithea server, together with all |
3126
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
223 defined IP addresses for given user. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
224 This command can only be executed using the api_key of a user with admin rights. |
3126
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
225 |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
226 INPUT:: |
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 id : <id_for_response> |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
229 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
230 method : "get_ip" |
3126
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
231 args : { |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
232 "userid" : "<user_id or username>", |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
233 } |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
234 |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
235 OUTPUT:: |
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 id : <id_given_in_input> |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
238 result : { |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
239 "ip_addr_server": <ip_from_clien>", |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
240 "user_ips": [ |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
241 { |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
242 "ip_addr": "<ip_with_mask>", |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
243 "ip_range": ["<start_ip>", "<end_ip>"], |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
244 }, |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
245 ... |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
246 ] |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
247 } |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
248 |
3126
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
249 error : null |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
250 |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
251 |
1843 | 252 get_user |
253 -------- | |
254 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
255 Get a user by username or userid. The result is empty if user can't be found. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
256 If userid param is skipped, it is set to id of user who is calling this method. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
257 Any userid can be specified when the command is executed using the api_key of a user with admin rights. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
258 Regular users can only speicy their own userid. |
1843 | 259 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
260 |
1843 | 261 INPUT:: |
262 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
263 id : <id_for_response> |
1843 | 264 api_key : "<api_key>" |
265 method : "get_user" | |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
266 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
|
267 "userid" : "<username or user_id Optional(=apiuser)>" |
1843 | 268 } |
269 | |
270 OUTPUT:: | |
271 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
272 id : <id_given_in_input> |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
273 result: None if user does not exist or |
1843 | 274 { |
3127
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
275 "user_id" : "<user_id>", |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
276 "api_key" : "<api_key>", |
3127
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
277 "username" : "<username>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
278 "firstname": "<firstname>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
279 "lastname" : "<lastname>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
280 "email" : "<email>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
281 "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
|
282 "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
|
283 "active" : "<bool>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
284 "admin" :Â "<bool>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
285 "ldap_dn" : "<ldap_dn>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
286 "last_login": "<last_login>", |
2151
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
287 "permissions": { |
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
288 "global": ["hg.create.repository", |
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
289 "repository.read", |
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
290 "hg.register.manual_activate"], |
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
291 "repositories": {"repo1": "repository.none"}, |
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
292 "repositories_groups": {"Group1": "group.read"} |
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
293 }, |
1843 | 294 } |
295 | |
296 error: null | |
297 | |
298 | |
1592 | 299 get_users |
300 --------- | |
301 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
302 List all existing users. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
303 This command can only be executed using the api_key of a user with admin rights. |
1592 | 304 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
305 |
1592 | 306 INPUT:: |
307 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
308 id : <id_for_response> |
1592 | 309 api_key : "<api_key>" |
310 method : "get_users" | |
311 args : { } | |
312 | |
313 OUTPUT:: | |
314 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
315 id : <id_given_in_input> |
1592 | 316 result: [ |
317 { | |
3127
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
318 "user_id" : "<user_id>", |
3940
3a608d72a86f
api.rst edited online with Bitbucket
Ton Plomp <tcplomp@gmail.com>
parents:
3809
diff
changeset
|
319 "api_key" : "<api_key>", |
3127
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
320 "username" : "<username>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
321 "firstname": "<firstname>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
322 "lastname" : "<lastname>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
323 "email" : "<email>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
324 "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
|
325 "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
|
326 "active" : "<bool>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
327 "admin" :Â "<bool>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
328 "ldap_dn" : "<ldap_dn>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
329 "last_login": "<last_login>", |
1592 | 330 }, |
3267
7b74079beec9
coding style: fix trailing and leading spaces and tabs
Mads Kiilerich <madski@unity3d.com>
parents:
3235
diff
changeset
|
331 … |
1592 | 332 ] |
333 error: null | |
334 | |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
335 |
1592 | 336 create_user |
337 ----------- | |
338 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
339 Create new user. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
340 This command can only be executed using the api_key of a user with admin rights. |
1592 | 341 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
342 |
1592 | 343 INPUT:: |
344 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
345 id : <id_for_response> |
1592 | 346 api_key : "<api_key>" |
347 method : "create_user" | |
348 args : { | |
349 "username" : "<username>", | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
350 "email" : "<useremail>", |
3809
647fb653048e
make the password optional in API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3808
diff
changeset
|
351 "password" : "<password = Optional(None)>", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
352 "firstname" : "<firstname> = Optional(None)", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
353 "lastname" : "<lastname> = Optional(None)", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
354 "active" : "<bool> = Optional(True)", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
355 "admin" : "<bool> = Optional(False)", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
356 "ldap_dn" : "<ldap_dn> = Optional(None)" |
1592 | 357 } |
1500 | 358 |
359 OUTPUT:: | |
360 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
361 id : <id_given_in_input> |
1592 | 362 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
363 "msg" : "created new user `<username>`", |
2365
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
364 "user": { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
365 "user_id" : "<user_id>", |
2365
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
366 "username" : "<username>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
367 "firstname": "<firstname>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
368 "lastname" : "<lastname>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
369 "email" : "<email>", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
370 "emails": "<list_of_all_additional_emails>", |
2365
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
371 "active" : "<bool>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
372 "admin" :Â "<bool>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
373 "ldap_dn" : "<ldap_dn>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
374 "last_login": "<last_login>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
375 }, |
1592 | 376 } |
377 error: null | |
378 | |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
379 |
2002
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
380 update_user |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
381 ----------- |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
382 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
383 Update the given user if such user exists. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
384 This command can only be executed using the api_key of a user with admin rights. |
2002
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
385 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
386 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
387 INPUT:: |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
388 |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
389 id : <id_for_response> |
2002
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
390 api_key : "<api_key>" |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
391 method : "update_user" |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
392 args : { |
2009 | 393 "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
|
394 "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
|
395 "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
|
396 "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
|
397 "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
|
398 "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
|
399 "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
|
400 "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
|
401 "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
|
402 } |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
403 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
404 OUTPUT:: |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
405 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
406 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
|
407 result: { |
2507
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
408 "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
|
409 "user": { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
410 "user_id" : "<user_id>", |
3940
3a608d72a86f
api.rst edited online with Bitbucket
Ton Plomp <tcplomp@gmail.com>
parents:
3809
diff
changeset
|
411 "api_key" : "<api_key>", |
2507
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
412 "username" : "<username>", |
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
413 "firstname": "<firstname>", |
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
414 "lastname" : "<lastname>", |
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
415 "email" : "<email>", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
416 "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
|
417 "active" : "<bool>", |
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
418 "admin" :Â "<bool>", |
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
419 "ldap_dn" : "<ldap_dn>", |
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
420 "last_login": "<last_login>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
421 }, |
2365
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
422 } |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
423 error: null |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
424 |
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 delete_user |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
427 ----------- |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
428 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
429 Delete the given user if such a user exists. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
430 This command can only be executed using the api_key of a user with admin rights. |
2365
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
431 |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
432 |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
433 INPUT:: |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
434 |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
435 id : <id_for_response> |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
436 api_key : "<api_key>" |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
437 method : "delete_user" |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
438 args : { |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
439 "userid" : "<user_id or username>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
440 } |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
441 |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
442 OUTPUT:: |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
443 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
444 id : <id_given_in_input> |
2365
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
445 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
446 "msg" : "deleted user ID:<userid> <username>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
447 "user": null |
2002
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
448 } |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
449 error: null |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
450 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
451 |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
452 get_user_group |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
453 -------------- |
1592 | 454 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
455 Get an existing user group. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
456 This command can only be executed using the api_key of a user with admin rights. |
1592 | 457 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
458 |
1592 | 459 INPUT:: |
460 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
461 id : <id_for_response> |
1592 | 462 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
463 method : "get_user_group" |
1592 | 464 args : { |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
465 "usergroupid" : "<user group id or name>" |
1592 | 466 } |
467 | |
468 OUTPUT:: | |
469 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
470 id : <id_given_in_input> |
1592 | 471 result : None if group not exist |
472 { | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
473 "users_group_id" : "<id>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
474 "group_name" : "<groupname>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
475 "active": "<bool>", |
1592 | 476 "members" : [ |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
477 { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
478 "user_id" : "<user_id>", |
3940
3a608d72a86f
api.rst edited online with Bitbucket
Ton Plomp <tcplomp@gmail.com>
parents:
3809
diff
changeset
|
479 "api_key" : "<api_key>", |
1843 | 480 "username" : "<username>", |
481 "firstname": "<firstname>", | |
482 "lastname" : "<lastname>", | |
483 "email" : "<email>", | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
484 "emails": "<list_of_all_additional_emails>", |
1843 | 485 "active" : "<bool>", |
486 "admin" :Â "<bool>", | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
487 "ldap_dn" : "<ldap_dn>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
488 "last_login": "<last_login>", |
1843 | 489 }, |
490 … | |
491 ] | |
1592 | 492 } |
493 error : null | |
494 | |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
495 |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
496 get_user_groups |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
497 --------------- |
1843 | 498 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
499 List all existing user groups. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
500 This command can only be executed using the api_key of a user with admin rights. |
1843 | 501 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
502 |
1843 | 503 INPUT:: |
504 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
505 id : <id_for_response> |
1843 | 506 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
507 method : "get_user_groups" |
1843 | 508 args : { } |
509 | |
510 OUTPUT:: | |
511 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
512 id : <id_given_in_input> |
1843 | 513 result : [ |
514 { | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
515 "users_group_id" : "<id>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
516 "group_name" : "<groupname>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
517 "active": "<bool>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
518 }, |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
519 … |
1843 | 520 ] |
521 error : null | |
522 | |
523 | |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
524 create_user_group |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
525 ----------------- |
1500 | 526 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
527 Create a new user group. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
528 This command can only be executed using the api_key of a user with admin rights. |
1500 | 529 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
530 |
1500 | 531 INPUT:: |
532 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
533 id : <id_for_response> |
1592 | 534 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
535 method : "create_user_group" |
1592 | 536 args: { |
3714
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3641
diff
changeset
|
537 "group_name": "<groupname>", |
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3641
diff
changeset
|
538 "owner" : "<onwer_name_or_id = Optional(=apiuser)>", |
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3641
diff
changeset
|
539 "active": "<bool> = Optional(True)" |
1592 | 540 } |
541 | |
542 OUTPUT:: | |
543 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
544 id : <id_given_in_input> |
1592 | 545 result: { |
3410
5f1850e4712a
"Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents:
3267
diff
changeset
|
546 "msg": "created new user group `<groupname>`", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
547 "users_group": { |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
548 "users_group_id" : "<id>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
549 "group_name" : "<groupname>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
550 "active": "<bool>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
551 }, |
1592 | 552 } |
553 error: null | |
554 | |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
555 |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
556 add_user_to_user_group |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
557 ---------------------- |
1592 | 558 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
559 Adds a user to a user group. If the user already is in that group, success will be |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
560 ``false``. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
561 This command can only be executed using the api_key of a user with admin rights. |
1592 | 562 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
563 |
1592 | 564 INPUT:: |
565 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
566 id : <id_for_response> |
1592 | 567 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
568 method : "add_user_user_group" |
1592 | 569 args: { |
3410
5f1850e4712a
"Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents:
3267
diff
changeset
|
570 "usersgroupid" : "<user group id or name>", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
571 "userid" : "<user_id or username>", |
1592 | 572 } |
573 | |
574 OUTPUT:: | |
575 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
576 id : <id_given_in_input> |
1592 | 577 result: { |
1989 | 578 "success": True|False # depends on if member is in group |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
579 "msg": "added member `<username>` to a user group `<groupname>` | |
1989 | 580 User is already in that group" |
581 } | |
582 error: null | |
583 | |
584 | |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
585 remove_user_from_user_group |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
586 --------------------------- |
1989 | 587 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
588 Remove a user from a user group. If the user isn't in the given group, success will |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
589 be ``false``. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
590 This command can only be executed using the api_key of a user with admin rights. |
1989 | 591 |
592 | |
593 INPUT:: | |
594 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
595 id : <id_for_response> |
1989 | 596 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
597 method : "remove_user_from_user_group" |
1989 | 598 args: { |
3410
5f1850e4712a
"Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents:
3267
diff
changeset
|
599 "usersgroupid" : "<user group id or name>", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
600 "userid" : "<user_id or username>", |
1989 | 601 } |
602 | |
603 OUTPUT:: | |
604 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
605 id : <id_given_in_input> |
1989 | 606 result: { |
607 "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
|
608 "msg": "removed member <username> from user group <groupname> | |
1989 | 609 User wasn't in group" |
1592 | 610 } |
611 error: null | |
612 | |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
613 |
1843 | 614 get_repo |
615 -------- | |
616 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
617 Get an existing repository by its name or repository_id. Members will contain |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
618 either users_group or users associated to that repository. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
619 This command can only be executed using the api_key of a user with admin rights, |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
620 or that of a regular user with at least read access to the repository. |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
621 |
1843 | 622 INPUT:: |
623 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
624 id : <id_for_response> |
1843 | 625 api_key : "<api_key>" |
626 method : "get_repo" | |
627 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
|
628 "repoid" : "<reponame or repo_id>" |
1843 | 629 } |
630 | |
631 OUTPUT:: | |
632 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
633 id : <id_given_in_input> |
1843 | 634 result: None if repository does not exist or |
635 { | |
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
|
636 "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
|
637 "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
|
638 "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
|
639 "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
|
640 "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
|
641 "enable_locking": "<bool>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
642 "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
|
643 "private": "<bool>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
644 "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
|
645 "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
|
646 "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
|
647 "last_changeset": { |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
648 "author": "<full_author>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
649 "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
|
650 "message": "<commit_message>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
651 "raw_id": "<raw_id>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
652 "revision": "<numeric_revision>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
653 "short_id": "<short_id>" |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
654 } |
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
|
655 "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
|
656 "fork_of": "<name_of_fork_parent>", |
1843 | 657 "members" : [ |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
658 { |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
659 "type": "user", |
3174
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
660 "user_id" : "<user_id>", |
3940
3a608d72a86f
api.rst edited online with Bitbucket
Ton Plomp <tcplomp@gmail.com>
parents:
3809
diff
changeset
|
661 "api_key" : "<api_key>", |
3174
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
662 "username" : "<username>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
663 "firstname": "<firstname>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
664 "lastname" : "<lastname>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
665 "email" : "<email>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
666 "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
|
667 "active" : "<bool>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
668 "admin" :Â "<bool>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
669 "ldap_dn" : "<ldap_dn>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
670 "last_login": "<last_login>", |
1843 | 671 "permission" : "repository.(read|write|admin)" |
672 }, | |
673 … | |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
674 { |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
675 "type": "users_group", |
1843 | 676 "id" : "<usersgroupid>", |
677 "name" : "<usersgroupname>", | |
678 "active": "<bool>", | |
679 "permission" : "repository.(read|write|admin)" | |
680 }, | |
681 … | |
682 ] | |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
683 "followers": [ |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
684 { |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
685 "user_id" : "<user_id>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
686 "username" : "<username>", |
3940
3a608d72a86f
api.rst edited online with Bitbucket
Ton Plomp <tcplomp@gmail.com>
parents:
3809
diff
changeset
|
687 "api_key" : "<api_key>", |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
688 "firstname": "<firstname>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
689 "lastname" : "<lastname>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
690 "email" : "<email>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
691 "emails": "<list_of_all_additional_emails>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
692 "ip_addresses": "<list_of_ip_addresses_for_user>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
693 "active" : "<bool>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
694 "admin" :Â "<bool>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
695 "ldap_dn" : "<ldap_dn>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
696 "last_login": "<last_login>", |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
697 }, |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
698 … |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
699 ] |
1843 | 700 } |
701 error: null | |
702 | |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
703 |
1592 | 704 get_repos |
705 --------- | |
706 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
707 List all existing repositories. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
708 This command can only be executed using the api_key of a user with admin rights, |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
709 or that of a regular user with at least read access to the repository. |
1592 | 710 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
711 |
1592 | 712 INPUT:: |
713 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
714 id : <id_for_response> |
1592 | 715 api_key : "<api_key>" |
716 method : "get_repos" | |
717 args: { } | |
1500 | 718 |
719 OUTPUT:: | |
720 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
721 id : <id_given_in_input> |
1592 | 722 result: [ |
723 { | |
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
|
724 "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
|
725 "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
|
726 "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
|
727 "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
|
728 "private": : "<bool>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
729 "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
|
730 "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
|
731 "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
|
732 "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
|
733 "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
|
734 "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
|
735 "enable_locking": "<bool>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
736 "enable_statistics": "<bool>", |
1592 | 737 }, |
738 … | |
739 ] | |
740 error: null | |
741 | |
742 | |
1810
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
743 get_repo_nodes |
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 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
746 Return a list of files and directories for a given path at the given revision. |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
747 It is possible to specify ret_type to show only ``files`` or ``dirs``. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
748 This command can only be executed using the api_key of a user with admin rights. |
1810
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
749 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
750 |
1810
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
751 INPUT:: |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
752 |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
753 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
|
754 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
|
755 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
|
756 args: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
757 "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
|
758 "revision" : "<revision>", |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
759 "root_path" : "<root_path>", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
760 "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
|
761 } |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
762 |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
763 OUTPUT:: |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
764 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
765 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
|
766 result: [ |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
767 { |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
768 "name" : "<name>" |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
769 "type" : "<type>", |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
770 }, |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
771 … |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
772 ] |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
773 error: null |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
774 |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
775 |
1592 | 776 create_repo |
777 ----------- | |
778 | |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
779 Create a repository. If the repository name contains "/", all needed repository |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
780 groups will be created. For example "foo/bar/baz" will create repository groups |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
781 "foo", "bar" (with "foo" as parent), and create "baz" repository with |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
782 "bar" as group. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
783 This command can only be executed using the api_key of a user with admin rights, |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
784 or that of a regular user with create repository permission. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
785 Regular users cannot specify owner parameter. |
1592 | 786 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
787 |
1592 | 788 INPUT:: |
789 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
790 id : <id_for_response> |
1592 | 791 api_key : "<api_key>" |
792 method : "create_repo" | |
793 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
|
794 "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
|
795 "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
|
796 "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
|
797 "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
|
798 "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
|
799 "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
|
800 "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
|
801 "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
|
802 "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
|
803 "enable_statistics": "<bool> = Optional(False)", |
1592 | 804 } |
805 | |
806 OUTPUT:: | |
807 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
808 id : <id_given_in_input> |
1843 | 809 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
810 "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
|
811 "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
|
812 "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
|
813 "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
|
814 "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
|
815 "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
|
816 "private": : "<bool>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
817 "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
|
818 "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
|
819 "landing_rev": "<landing_rev>", |
3122
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
820 "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
|
821 "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
|
822 "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
|
823 "enable_locking": "<bool>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
824 "enable_statistics": "<bool>", |
2378
04ef27ce939e
API: create_repo returns now repo object after creation
Marcin Kuzminski <marcin@python-works.com>
parents:
2365
diff
changeset
|
825 }, |
1843 | 826 } |
1592 | 827 error: null |
828 | |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
829 |
3122
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
830 fork_repo |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
831 --------- |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
832 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
833 Create a fork of the given repo. If using Celery, this will |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
834 return success message immediately and a fork will be created |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
835 asynchronously. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
836 This command can only be executed using the api_key of a user with admin rights, |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
837 or that of a regular user with fork permission and at least read access to the repository. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
838 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
|
839 |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
840 |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
841 INPUT:: |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
842 |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
843 id : <id_for_response> |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
844 api_key : "<api_key>" |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
845 method : "fork_repo" |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
846 args: { |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
847 "repoid" : "<reponame or repo_id>", |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
848 "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
|
849 "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
|
850 "description": "<description>", |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
851 "copy_permissions": "<bool>", |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
852 "private": "<bool>", |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
853 "landing_rev": "<landing_rev>" |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
854 |
3122
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
855 } |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
856 |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
857 OUTPUT:: |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
858 |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
859 id : <id_given_in_input> |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
860 result: { |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
861 "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
|
862 "success": true |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
863 } |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
864 error: null |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
865 |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
866 |
2003
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
867 delete_repo |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
868 ----------- |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
869 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
870 Delete a repository. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
871 This command can only be executed using the api_key of a user with admin rights, |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
872 or that of a regular user with admin access to the repository. |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
873 When ``forks`` param is set it is possible to detach or delete forks of the deleted repository. |
2003
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
874 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
875 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
876 INPUT:: |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
877 |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
878 id : <id_for_response> |
2003
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
879 api_key : "<api_key>" |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
880 method : "delete_repo" |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
881 args: { |
3641
b44979649915
recursive forks detach
Marcin Kuzminski <marcin@python-works.com>
parents:
3457
diff
changeset
|
882 "repoid" : "<reponame or repo_id>", |
b44979649915
recursive forks detach
Marcin Kuzminski <marcin@python-works.com>
parents:
3457
diff
changeset
|
883 "forks" : "`delete` or `detach` = Optional(None)" |
2003
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
884 } |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
885 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
886 OUTPUT:: |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
887 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
888 id : <id_given_in_input> |
2003
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
889 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
890 "msg": "Deleted repository `<reponame>`", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
891 "success": true |
2003
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
892 } |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
893 error: null |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
894 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
895 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
896 grant_user_permission |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
897 --------------------- |
1592 | 898 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
899 Grant permission for a user on the given repository, or update the existing one if found. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
900 This command can only be executed using the api_key of a user with admin rights. |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
901 |
1592 | 902 |
903 INPUT:: | |
904 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
905 id : <id_for_response> |
1592 | 906 api_key : "<api_key>" |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
907 method : "grant_user_permission" |
1592 | 908 args: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
909 "repoid" : "<reponame or repo_id>" |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
910 "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
|
911 "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
|
912 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
913 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
914 OUTPUT:: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
915 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
916 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
|
917 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
918 "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
|
919 "success": true |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
920 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
921 error: null |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
922 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
923 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
924 revoke_user_permission |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
925 ---------------------- |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
926 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
927 Revoke permission for a user on the given repository. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
928 This command can only be executed using the api_key of a user with admin rights. |
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 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
931 INPUT:: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
932 |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
933 id : <id_for_response> |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
934 api_key : "<api_key>" |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
935 method : "revoke_user_permission" |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
936 args: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
937 "repoid" : "<reponame or repo_id>" |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
938 "userid" : "<username or user_id>" |
1592 | 939 } |
940 | |
941 OUTPUT:: | |
942 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
943 id : <id_given_in_input> |
1843 | 944 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
945 "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
|
946 "success": true |
1843 | 947 } |
1592 | 948 error: null |
1793
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
949 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
950 |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
951 grant_user_group_permission |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
952 --------------------------- |
1793
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
953 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
954 Grant permission for a user group on the given repository, or update the |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
955 existing one if found. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
956 This command can only be executed using the api_key of a user with admin rights. |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
957 |
1793
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
958 |
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
959 INPUT:: |
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
960 |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
961 id : <id_for_response> |
1793
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
962 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
963 method : "grant_user_group_permission" |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
964 args: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
965 "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
|
966 "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
|
967 "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
|
968 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
969 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
970 OUTPUT:: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
971 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
972 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
|
973 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
974 "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
|
975 "success": true |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
976 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
977 error: null |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
978 |
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
979 |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
980 revoke_user_group_permission |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
981 ---------------------------- |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
982 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
983 Revoke permission for a user group on the given repository. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
984 This command can only be executed using the api_key of a user with admin rights. |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
985 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
986 INPUT:: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
987 |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
988 id : <id_for_response> |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
989 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
990 method : "revoke_user_group_permission" |
1793
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
991 args: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
992 "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
|
993 "usersgroupid" : "<user group id or name>" |
1843 | 994 } |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
995 |
1843 | 996 OUTPUT:: |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
997 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
998 id : <id_given_in_input> |
1843 | 999 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
1000 "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
|
1001 "success": true |
1843 | 1002 } |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
1003 error: null |