Mercurial > kallithea
annotate docs/api/api.rst @ 5425:5ae8e644aa88
docs: spelling, grammar, content and typography
author | Søren Løvborg <sorenl@unity3d.com> |
---|---|
date | Tue, 18 Aug 2015 11:47:19 +0200 |
parents | e268da9b748f |
children | fbbe80e3322b |
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 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
10 ``<your_server>/_admin/api``. |
4879
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 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
19 RSS/Atom feed views are enabled. Other views are |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
20 only available if they have been whitelisted. 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 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
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 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
36 third-party services like code review, or build farms that can 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 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
53 curl https://example.com/_admin/api -X POST -H 'content-type:text/plain' \ |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
54 --data-binary '{"id":1,"api_key":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull","args":{"repo":"CPython"}}' |
1500 | 55 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
56 In general, provide |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
57 - *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
|
58 - *api_key*, for authentication and permission validation. |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
59 - *method*, the name of the method to call -- a list of available methods can be found below. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
60 - *args*, the arguments to pass to the method. |
1592 | 61 |
1446 | 62 .. note:: |
1592 | 63 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
64 api_key can be found or set on the user account page. |
1592 | 65 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
66 The response to the JSON-RPC API call will always be a JSON structure:: |
1592 | 67 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
68 { |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
69 "id": <id>, # the id that was used in the request |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
70 "result": <result>|null, # JSON formatted result (null on error) |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
71 "error": null|<error_message> # JSON formatted error (null on success) |
1446 | 72 } |
73 | |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
74 All responses from the API will be ``HTTP/1.0 200 OK``. If an error occurs, |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
75 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
|
76 *result* will be null. |
1446 | 77 |
2379
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
78 |
4902 | 79 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
|
80 ++++++++++ |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
81 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
82 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
|
83 way to call the JSON-RPC API. |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
84 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
85 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
|
86 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
87 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
|
88 |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
89 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
|
90 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
|
91 {'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
|
92 'id': 75, |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
93 'result': None} |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
94 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
95 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
|
96 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
|
97 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4189
diff
changeset
|
98 kallithea-api get_repo repoid:myrepo |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
99 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4189
diff
changeset
|
100 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
|
101 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
|
102 {'error': None, |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
103 'id': 39, |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
104 '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
|
105 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
106 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
|
107 |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
108 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
|
109 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
110 This will create a ``~/.config/kallithea`` with the specified hostname and API key |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
111 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
|
112 |
7ac09514a178
created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents:
2378
diff
changeset
|
113 |
4902 | 114 API methods |
1446 | 115 +++++++++++ |
116 | |
1592 | 117 |
1446 | 118 pull |
119 ---- | |
120 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
121 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
|
122 remote repos up to date. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
123 This command can only be executed using the api_key of a user with admin rights. |
1500 | 124 |
125 INPUT:: | |
126 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
127 id : <id_for_response> |
1592 | 128 api_key : "<api_key>" |
129 method : "pull" | |
130 args : { | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
131 "repoid" : "<reponame or repo_id>" |
1592 | 132 } |
133 | |
134 OUTPUT:: | |
135 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
136 id : <id_given_in_input> |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
137 result : "Pulled from `<reponame>`" |
1592 | 138 error : null |
139 | |
140 | |
2697
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
141 rescan_repos |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
142 ------------ |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
143 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
144 Rescan repositories. If ``remove_obsolete`` is set, |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
145 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
|
146 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
|
147 |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
148 INPUT:: |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
149 |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
150 id : <id_for_response> |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
151 api_key : "<api_key>" |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
152 method : "rescan_repos" |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
153 args : { |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
154 "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
|
155 } |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
156 |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
157 OUTPUT:: |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
158 |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
159 id : <id_given_in_input> |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
160 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
|
161 '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
|
162 error : null |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
163 |
4565e655ea2a
API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents:
2531
diff
changeset
|
164 |
3235
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
165 invalidate_cache |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
166 ---------------- |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
167 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
168 Invalidate the cache for a repository. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
169 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
|
170 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
|
171 |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
172 INPUT:: |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
173 |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
174 id : <id_for_response> |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
175 api_key : "<api_key>" |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
176 method : "invalidate_cache" |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
177 args : { |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
178 "repoid" : "<reponame or repo_id>" |
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 |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
181 OUTPUT:: |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
182 |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
183 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
|
184 result : "Caches of repository `<reponame>`" |
3235
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
185 error : null |
d6029dacbcc4
API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
186 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
187 |
2737
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
188 lock |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
189 ---- |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
190 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
191 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
|
192 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
|
193 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
|
194 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
|
195 |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
196 INPUT:: |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
197 |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
198 id : <id_for_response> |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
199 api_key : "<api_key>" |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
200 method : "lock" |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
201 args : { |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
202 "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
|
203 "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
|
204 "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
|
205 } |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
206 |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
207 OUTPUT:: |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
208 |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
209 id : <id_given_in_input> |
3809
647fb653048e
make the password optional in API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3808
diff
changeset
|
210 result : { |
3808
2feb58495f34
locking API returns objects instead of string messages.
Marcin Kuzminski <marcin@python-works.com>
parents:
3777
diff
changeset
|
211 "repo": "<reponame>", |
2feb58495f34
locking API returns objects instead of string messages.
Marcin Kuzminski <marcin@python-works.com>
parents:
3777
diff
changeset
|
212 "locked": "<bool true|false>", |
2feb58495f34
locking API returns objects instead of string messages.
Marcin Kuzminski <marcin@python-works.com>
parents:
3777
diff
changeset
|
213 "locked_since": "<float lock_time>", |
2feb58495f34
locking API returns objects instead of string messages.
Marcin Kuzminski <marcin@python-works.com>
parents:
3777
diff
changeset
|
214 "locked_by": "<username>", |
2feb58495f34
locking API returns objects instead of string messages.
Marcin Kuzminski <marcin@python-works.com>
parents:
3777
diff
changeset
|
215 "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
|
216 } |
2737
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
217 error : null |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
218 |
e21cb7b1a4a5
added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2697
diff
changeset
|
219 |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
220 get_ip |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
221 ------ |
3126
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
222 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
223 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
|
224 defined IP addresses for given user. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
225 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
|
226 |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
227 INPUT:: |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
228 |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
229 id : <id_for_response> |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
230 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
231 method : "get_ip" |
3126
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
232 args : { |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
233 "userid" : "<user_id or username>", |
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 |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
236 OUTPUT:: |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
237 |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
238 id : <id_given_in_input> |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
239 result : { |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
240 "ip_addr_server": <ip_from_clien>", |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
241 "user_ips": [ |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
242 { |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
243 "ip_addr": "<ip_with_mask>", |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
244 "ip_range": ["<start_ip>", "<end_ip>"], |
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 ] |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
248 } |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
249 |
3126
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
250 error : null |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
251 |
703070153bc1
added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents:
3122
diff
changeset
|
252 |
1843 | 253 get_user |
254 -------- | |
255 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
256 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
|
257 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
|
258 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
|
259 Regular users can only speicy their own userid. |
1843 | 260 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
261 |
1843 | 262 INPUT:: |
263 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
264 id : <id_for_response> |
1843 | 265 api_key : "<api_key>" |
266 method : "get_user" | |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
267 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
|
268 "userid" : "<username or user_id Optional(=apiuser)>" |
1843 | 269 } |
270 | |
271 OUTPUT:: | |
272 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
273 id : <id_given_in_input> |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
274 result: None if user does not exist or |
1843 | 275 { |
3127
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
276 "user_id" : "<user_id>", |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
277 "api_key" : "<api_key>", |
3127
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
278 "username" : "<username>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
279 "firstname": "<firstname>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
280 "lastname" : "<lastname>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
281 "email" : "<email>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
282 "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
|
283 "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
|
284 "active" : "<bool>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
285 "admin" :Â "<bool>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
286 "ldap_dn" : "<ldap_dn>", |
71ce052f8b6b
add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3126
diff
changeset
|
287 "last_login": "<last_login>", |
2151
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
288 "permissions": { |
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
289 "global": ["hg.create.repository", |
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
290 "repository.read", |
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
291 "hg.register.manual_activate"], |
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
292 "repositories": {"repo1": "repository.none"}, |
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
293 "repositories_groups": {"Group1": "group.read"} |
12ceeda33339
#404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents:
2146
diff
changeset
|
294 }, |
1843 | 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 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
336 .. _create-user: |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
337 |
1592 | 338 create_user |
339 ----------- | |
340 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
341 Create new user. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
342 This command can only be executed using the api_key of a user with admin rights. |
1592 | 343 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
344 |
1592 | 345 INPUT:: |
346 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
347 id : <id_for_response> |
1592 | 348 api_key : "<api_key>" |
349 method : "create_user" | |
350 args : { | |
351 "username" : "<username>", | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
352 "email" : "<useremail>", |
3809
647fb653048e
make the password optional in API calls
Marcin Kuzminski <marcin@python-works.com>
parents:
3808
diff
changeset
|
353 "password" : "<password = Optional(None)>", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
354 "firstname" : "<firstname> = Optional(None)", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
355 "lastname" : "<lastname> = Optional(None)", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
356 "active" : "<bool> = Optional(True)", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
357 "admin" : "<bool> = Optional(False)", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
358 "ldap_dn" : "<ldap_dn> = Optional(None)" |
1592 | 359 } |
1500 | 360 |
361 OUTPUT:: | |
362 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
363 id : <id_given_in_input> |
1592 | 364 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
365 "msg" : "created new user `<username>`", |
2365
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
366 "user": { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
367 "user_id" : "<user_id>", |
2365
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
368 "username" : "<username>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
369 "firstname": "<firstname>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
370 "lastname" : "<lastname>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
371 "email" : "<email>", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
372 "emails": "<list_of_all_additional_emails>", |
2365
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
373 "active" : "<bool>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
374 "admin" :Â "<bool>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
375 "ldap_dn" : "<ldap_dn>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
376 "last_login": "<last_login>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
377 }, |
1592 | 378 } |
379 error: null | |
380 | |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
381 Example:: |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
382 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
383 kallithea-api create_user username:bent email:bent@example.com firstname:Bent lastname:Bentsen extern_type:ldap extern_name:uid=bent,dc=example,dc=com |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5274
diff
changeset
|
384 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
385 |
2002
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
386 update_user |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
387 ----------- |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
388 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
389 Update the given user if such user exists. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
390 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
|
391 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
392 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
393 INPUT:: |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
394 |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
395 id : <id_for_response> |
2002
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
396 api_key : "<api_key>" |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
397 method : "update_user" |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
398 args : { |
2009 | 399 "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
|
400 "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
|
401 "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
|
402 "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
|
403 "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
|
404 "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
|
405 "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
|
406 "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
|
407 "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
|
408 } |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
409 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
410 OUTPUT:: |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
411 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
412 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
|
413 result: { |
2507
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
414 "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
|
415 "user": { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
416 "user_id" : "<user_id>", |
3940
3a608d72a86f
api.rst edited online with Bitbucket
Ton Plomp <tcplomp@gmail.com>
parents:
3809
diff
changeset
|
417 "api_key" : "<api_key>", |
2507
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
418 "username" : "<username>", |
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
419 "firstname": "<firstname>", |
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
420 "lastname" : "<lastname>", |
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
421 "email" : "<email>", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
422 "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
|
423 "active" : "<bool>", |
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
424 "admin" :Â "<bool>", |
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
425 "ldap_dn" : "<ldap_dn>", |
374693af2849
API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents:
2506
diff
changeset
|
426 "last_login": "<last_login>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
427 }, |
2365
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
428 } |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
429 error: null |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
430 |
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 delete_user |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
433 ----------- |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
434 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
435 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
|
436 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
|
437 |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
438 |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
439 INPUT:: |
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 id : <id_for_response> |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
442 api_key : "<api_key>" |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
443 method : "delete_user" |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
444 args : { |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
445 "userid" : "<user_id or username>", |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
446 } |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
447 |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
448 OUTPUT:: |
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
449 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
450 id : <id_given_in_input> |
2365
b902baeaa494
API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents:
2338
diff
changeset
|
451 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
452 "msg" : "deleted user ID:<userid> <username>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
453 "user": null |
2002
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
454 } |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
455 error: null |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
456 |
bdc0ad168006
API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents:
1989
diff
changeset
|
457 |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
458 get_user_group |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
459 -------------- |
1592 | 460 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
461 Get an existing user group. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
462 This command can only be executed using the api_key of a user with admin rights. |
1592 | 463 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
464 |
1592 | 465 INPUT:: |
466 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
467 id : <id_for_response> |
1592 | 468 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
469 method : "get_user_group" |
1592 | 470 args : { |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
471 "usergroupid" : "<user group id or name>" |
1592 | 472 } |
473 | |
474 OUTPUT:: | |
475 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
476 id : <id_given_in_input> |
1592 | 477 result : None if group not exist |
478 { | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
479 "users_group_id" : "<id>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
480 "group_name" : "<groupname>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
481 "active": "<bool>", |
1592 | 482 "members" : [ |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
483 { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
484 "user_id" : "<user_id>", |
3940
3a608d72a86f
api.rst edited online with Bitbucket
Ton Plomp <tcplomp@gmail.com>
parents:
3809
diff
changeset
|
485 "api_key" : "<api_key>", |
1843 | 486 "username" : "<username>", |
487 "firstname": "<firstname>", | |
488 "lastname" : "<lastname>", | |
489 "email" : "<email>", | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
490 "emails": "<list_of_all_additional_emails>", |
1843 | 491 "active" : "<bool>", |
492 "admin" :Â "<bool>", | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
493 "ldap_dn" : "<ldap_dn>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
494 "last_login": "<last_login>", |
1843 | 495 }, |
496 … | |
497 ] | |
1592 | 498 } |
499 error : null | |
500 | |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
501 |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
502 get_user_groups |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
503 --------------- |
1843 | 504 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
505 List all existing user groups. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
506 This command can only be executed using the api_key of a user with admin rights. |
1843 | 507 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
508 |
1843 | 509 INPUT:: |
510 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
511 id : <id_for_response> |
1843 | 512 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
513 method : "get_user_groups" |
1843 | 514 args : { } |
515 | |
516 OUTPUT:: | |
517 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
518 id : <id_given_in_input> |
1843 | 519 result : [ |
520 { | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
521 "users_group_id" : "<id>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
522 "group_name" : "<groupname>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
523 "active": "<bool>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
524 }, |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
525 … |
1843 | 526 ] |
527 error : null | |
528 | |
529 | |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
530 create_user_group |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
531 ----------------- |
1500 | 532 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
533 Create a new user group. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
534 This command can only be executed using the api_key of a user with admin rights. |
1500 | 535 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
536 |
1500 | 537 INPUT:: |
538 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
539 id : <id_for_response> |
1592 | 540 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
541 method : "create_user_group" |
1592 | 542 args: { |
3714
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3641
diff
changeset
|
543 "group_name": "<groupname>", |
5274
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
544 "owner" : "<owner_name_or_id = Optional(=apiuser)>", |
3714
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3641
diff
changeset
|
545 "active": "<bool> = Optional(True)" |
1592 | 546 } |
547 | |
548 OUTPUT:: | |
549 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
550 id : <id_given_in_input> |
1592 | 551 result: { |
3410
5f1850e4712a
"Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents:
3267
diff
changeset
|
552 "msg": "created new user group `<groupname>`", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
553 "users_group": { |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
554 "users_group_id" : "<id>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
555 "group_name" : "<groupname>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
556 "active": "<bool>", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
557 }, |
1592 | 558 } |
559 error: null | |
560 | |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
561 |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
562 add_user_to_user_group |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
563 ---------------------- |
1592 | 564 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
565 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
|
566 ``false``. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
567 This command can only be executed using the api_key of a user with admin rights. |
1592 | 568 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
569 |
1592 | 570 INPUT:: |
571 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
572 id : <id_for_response> |
1592 | 573 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
574 method : "add_user_user_group" |
1592 | 575 args: { |
3410
5f1850e4712a
"Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents:
3267
diff
changeset
|
576 "usersgroupid" : "<user group id or name>", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
577 "userid" : "<user_id or username>", |
1592 | 578 } |
579 | |
580 OUTPUT:: | |
581 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
582 id : <id_given_in_input> |
1592 | 583 result: { |
1989 | 584 "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
|
585 "msg": "added member `<username>` to a user group `<groupname>` | |
1989 | 586 User is already in that group" |
587 } | |
588 error: null | |
589 | |
590 | |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
591 remove_user_from_user_group |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
592 --------------------------- |
1989 | 593 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
594 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
|
595 be ``false``. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
596 This command can only be executed using the api_key of a user with admin rights. |
1989 | 597 |
598 | |
599 INPUT:: | |
600 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
601 id : <id_for_response> |
1989 | 602 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
603 method : "remove_user_from_user_group" |
1989 | 604 args: { |
3410
5f1850e4712a
"Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents:
3267
diff
changeset
|
605 "usersgroupid" : "<user group id or name>", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
606 "userid" : "<user_id or username>", |
1989 | 607 } |
608 | |
609 OUTPUT:: | |
610 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
611 id : <id_given_in_input> |
1989 | 612 result: { |
613 "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
|
614 "msg": "removed member <username> from user group <groupname> | |
1989 | 615 User wasn't in group" |
1592 | 616 } |
617 error: null | |
618 | |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
619 |
1843 | 620 get_repo |
621 -------- | |
622 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
623 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
|
624 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
|
625 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
|
626 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
|
627 |
1843 | 628 INPUT:: |
629 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
630 id : <id_for_response> |
1843 | 631 api_key : "<api_key>" |
632 method : "get_repo" | |
633 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
|
634 "repoid" : "<reponame or repo_id>" |
1843 | 635 } |
636 | |
637 OUTPUT:: | |
638 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
639 id : <id_given_in_input> |
1843 | 640 result: None if repository does not exist or |
641 { | |
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
|
642 "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
|
643 "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
|
644 "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
|
645 "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
|
646 "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
|
647 "enable_locking": "<bool>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
648 "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
|
649 "private": "<bool>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
650 "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
|
651 "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
|
652 "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
|
653 "last_changeset": { |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
654 "author": "<full_author>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
655 "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
|
656 "message": "<commit_message>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
657 "raw_id": "<raw_id>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
658 "revision": "<numeric_revision>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
659 "short_id": "<short_id>" |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
660 } |
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
|
661 "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
|
662 "fork_of": "<name_of_fork_parent>", |
1843 | 663 "members" : [ |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
664 { |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
665 "type": "user", |
3174
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
666 "user_id" : "<user_id>", |
3940
3a608d72a86f
api.rst edited online with Bitbucket
Ton Plomp <tcplomp@gmail.com>
parents:
3809
diff
changeset
|
667 "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
|
668 "username" : "<username>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
669 "firstname": "<firstname>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
670 "lastname" : "<lastname>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
671 "email" : "<email>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
672 "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
|
673 "active" : "<bool>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
674 "admin" :Â "<bool>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
675 "ldap_dn" : "<ldap_dn>", |
37c0ac5fe42f
added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents:
3163
diff
changeset
|
676 "last_login": "<last_login>", |
1843 | 677 "permission" : "repository.(read|write|admin)" |
678 }, | |
679 … | |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
680 { |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
681 "type": "users_group", |
1843 | 682 "id" : "<usersgroupid>", |
683 "name" : "<usersgroupname>", | |
684 "active": "<bool>", | |
685 "permission" : "repository.(read|write|admin)" | |
686 }, | |
687 … | |
688 ] | |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
689 "followers": [ |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
690 { |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
691 "user_id" : "<user_id>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
692 "username" : "<username>", |
3940
3a608d72a86f
api.rst edited online with Bitbucket
Ton Plomp <tcplomp@gmail.com>
parents:
3809
diff
changeset
|
693 "api_key" : "<api_key>", |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
694 "firstname": "<firstname>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
695 "lastname" : "<lastname>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
696 "email" : "<email>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
697 "emails": "<list_of_all_additional_emails>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
698 "ip_addresses": "<list_of_ip_addresses_for_user>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
699 "active" : "<bool>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
700 "admin" :Â "<bool>", |
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
701 "ldap_dn" : "<ldap_dn>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
702 "last_login": "<last_login>", |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
703 }, |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
704 … |
3213
f5dcee2b3153
updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents:
3174
diff
changeset
|
705 ] |
1843 | 706 } |
707 error: null | |
708 | |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
709 |
1592 | 710 get_repos |
711 --------- | |
712 | |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
713 List all existing repositories. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
714 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
|
715 or that of a regular user with at least read access to the repository. |
1592 | 716 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
717 |
1592 | 718 INPUT:: |
719 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
720 id : <id_for_response> |
1592 | 721 api_key : "<api_key>" |
722 method : "get_repos" | |
723 args: { } | |
1500 | 724 |
725 OUTPUT:: | |
726 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
727 id : <id_given_in_input> |
1592 | 728 result: [ |
729 { | |
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 "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
|
731 "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
|
732 "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
|
733 "clone_uri" : "<clone_uri>", |
5274
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
734 "private" : "<bool>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
735 "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
|
736 "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
|
737 "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
|
738 "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
|
739 "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
|
740 "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
|
741 "enable_locking": "<bool>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
742 "enable_statistics": "<bool>", |
1592 | 743 }, |
744 … | |
745 ] | |
746 error: null | |
747 | |
748 | |
1810
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
749 get_repo_nodes |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
750 -------------- |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
751 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
752 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
|
753 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
|
754 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
|
755 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
756 |
1810
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
757 INPUT:: |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
758 |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
759 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
|
760 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
|
761 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
|
762 args: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
763 "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
|
764 "revision" : "<revision>", |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
765 "root_path" : "<root_path>", |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
766 "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
|
767 } |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
768 |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
769 OUTPUT:: |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
770 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
771 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
|
772 result: [ |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
773 { |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
774 "name" : "<name>" |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
775 "type" : "<type>", |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
776 }, |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
777 … |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
778 ] |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
779 error: null |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
780 |
203af05539e0
implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents:
1793
diff
changeset
|
781 |
1592 | 782 create_repo |
783 ----------- | |
784 | |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
785 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
|
786 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
|
787 "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
|
788 "bar" as group. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
789 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
|
790 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
|
791 Regular users cannot specify owner parameter. |
1592 | 792 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
793 |
1592 | 794 INPUT:: |
795 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
796 id : <id_for_response> |
1592 | 797 api_key : "<api_key>" |
798 method : "create_repo" | |
799 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
|
800 "repo_name" : "<reponame>", |
5274
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
801 "owner" : "<owner_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
|
802 "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
|
803 "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
|
804 "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
|
805 "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
|
806 "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
|
807 "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
|
808 "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
|
809 "enable_statistics": "<bool> = Optional(False)", |
1592 | 810 } |
811 | |
812 OUTPUT:: | |
813 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
814 id : <id_given_in_input> |
1843 | 815 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
816 "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
|
817 "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
|
818 "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
|
819 "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
|
820 "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
|
821 "clone_uri" : "<clone_uri>", |
5274
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
822 "private" : "<bool>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
823 "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
|
824 "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
|
825 "landing_rev": "<landing_rev>", |
3122
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
826 "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
|
827 "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
|
828 "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
|
829 "enable_locking": "<bool>", |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
830 "enable_statistics": "<bool>", |
2378
04ef27ce939e
API: create_repo returns now repo object after creation
Marcin Kuzminski <marcin@python-works.com>
parents:
2365
diff
changeset
|
831 }, |
1843 | 832 } |
1592 | 833 error: null |
834 | |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
835 |
5274
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
836 update_repo |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
837 ----------- |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
838 |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
839 Update a repository. |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
840 This command can only be executed using the api_key of a user with admin rights, |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
841 or that of a regular user with create repository permission. |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
842 Regular users cannot specify owner parameter. |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
843 |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
844 |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
845 INPUT:: |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
846 |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
847 id : <id_for_response> |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
848 api_key : "<api_key>" |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
849 method : "update_repo" |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
850 args: { |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
851 "repoid" : "<reponame or repo_id>" |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
852 "name" : "<reponame> = Optional('')", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
853 "group" : "<group_id> = Optional(None)", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
854 "owner" : "<owner_name_or_id = Optional(=apiuser)>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
855 "description" : "<description> = Optional('')", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
856 "private" : "<bool> = Optional(False)", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
857 "clone_uri" : "<clone_uri> = Optional(None)", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
858 "landing_rev" : "<landing_rev> = Optional('tip')", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
859 "enable_downloads": "<bool> = Optional(False)", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
860 "enable_locking": "<bool> = Optional(False)", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
861 "enable_statistics": "<bool> = Optional(False)", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
862 } |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
863 |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
864 OUTPUT:: |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
865 |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
866 id : <id_given_in_input> |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
867 result: { |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
868 "msg": "updated repo ID:repo_id `<reponame>`", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
869 "repository": { |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
870 "repo_id" : "<repo_id>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
871 "repo_name" : "<reponame>" |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
872 "repo_type" : "<repo_type>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
873 "clone_uri" : "<clone_uri>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
874 "private": "<bool>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
875 "created_on" : "<datetimecreated>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
876 "description" : "<description>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
877 "landing_rev": "<landing_rev>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
878 "owner": "<username or user_id>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
879 "fork_of": "<name_of_fork_parent>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
880 "enable_downloads": "<bool>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
881 "enable_locking": "<bool>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
882 "enable_statistics": "<bool>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
883 "last_changeset": { |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
884 "author": "<full_author>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
885 "date": "<date_time_of_commit>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
886 "message": "<commit_message>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
887 "raw_id": "<raw_id>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
888 "revision": "<numeric_revision>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
889 "short_id": "<short_id>" |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
890 } |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
891 "locked_by": "<username>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
892 "locked_date": "<float lock_time>", |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
893 }, |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
894 } |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
895 error: null |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
896 |
e268da9b748f
docs: add documentation for update_repo API
Mads Kiilerich <madski@unity3d.com>
parents:
5222
diff
changeset
|
897 |
3122
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
898 fork_repo |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
899 --------- |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
900 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
901 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
|
902 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
|
903 asynchronously. |
5222
6620542597d3
api: check repo create permissions for update_repo and fork_repo as for create-repo
Mads Kiilerich <madski@unity3d.com>
parents:
4955
diff
changeset
|
904 This command can only be executed using the api_key of a user with admin |
6620542597d3
api: check repo create permissions for update_repo and fork_repo as for create-repo
Mads Kiilerich <madski@unity3d.com>
parents:
4955
diff
changeset
|
905 rights, or with the global fork permission, by a regular user with create |
6620542597d3
api: check repo create permissions for update_repo and fork_repo as for create-repo
Mads Kiilerich <madski@unity3d.com>
parents:
4955
diff
changeset
|
906 repository permission and at least read access to the repository. |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
907 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
|
908 |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
909 |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
910 INPUT:: |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
911 |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
912 id : <id_for_response> |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
913 api_key : "<api_key>" |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
914 method : "fork_repo" |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
915 args: { |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
916 "repoid" : "<reponame or repo_id>", |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
917 "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
|
918 "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
|
919 "description": "<description>", |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
920 "copy_permissions": "<bool>", |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
921 "private": "<bool>", |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
922 "landing_rev": "<landing_rev>" |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
923 |
3122
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
924 } |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
925 |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
926 OUTPUT:: |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
927 |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
928 id : <id_given_in_input> |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
929 result: { |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
930 "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
|
931 "success": true |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
932 } |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
933 error: null |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
934 |
4ef6a7ed5e3e
#699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents:
3115
diff
changeset
|
935 |
2003
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
936 delete_repo |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
937 ----------- |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
938 |
4879
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
939 Delete a repository. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
940 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
|
941 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
|
942 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
|
943 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
944 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
945 INPUT:: |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
946 |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
947 id : <id_for_response> |
2003
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
948 api_key : "<api_key>" |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
949 method : "delete_repo" |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
950 args: { |
3641
b44979649915
recursive forks detach
Marcin Kuzminski <marcin@python-works.com>
parents:
3457
diff
changeset
|
951 "repoid" : "<reponame or repo_id>", |
b44979649915
recursive forks detach
Marcin Kuzminski <marcin@python-works.com>
parents:
3457
diff
changeset
|
952 "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
|
953 } |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
954 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
955 OUTPUT:: |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
956 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
957 id : <id_given_in_input> |
2003
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
958 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
959 "msg": "Deleted repository `<reponame>`", |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
960 "success": true |
2003
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
961 } |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
962 error: null |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
963 |
7dfcdf4c7dd2
implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
2002
diff
changeset
|
964 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
965 grant_user_permission |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
966 --------------------- |
1592 | 967 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
968 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
|
969 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
|
970 |
1592 | 971 |
972 INPUT:: | |
973 | |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
974 id : <id_for_response> |
1592 | 975 api_key : "<api_key>" |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
976 method : "grant_user_permission" |
1592 | 977 args: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
978 "repoid" : "<reponame or repo_id>" |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
979 "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
|
980 "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
|
981 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
982 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
983 OUTPUT:: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
984 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
985 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
|
986 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
987 "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
|
988 "success": true |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
989 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
990 error: null |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
991 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
992 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
993 revoke_user_permission |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
994 ---------------------- |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
995 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
996 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
|
997 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
|
998 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
999 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1000 INPUT:: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1001 |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
1002 id : <id_for_response> |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1003 api_key : "<api_key>" |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1004 method : "revoke_user_permission" |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1005 args: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
1006 "repoid" : "<reponame or repo_id>" |
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
1007 "userid" : "<username or user_id>" |
1592 | 1008 } |
1009 | |
1010 OUTPUT:: | |
1011 | |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
1012 id : <id_given_in_input> |
1843 | 1013 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
1014 "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
|
1015 "success": true |
1843 | 1016 } |
1592 | 1017 error: null |
1793
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
1018 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1019 |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
1020 grant_user_group_permission |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
1021 --------------------------- |
1793
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
1022 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
1023 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
|
1024 existing one if found. |
599fba9967a4
docs: improve the API documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4493
diff
changeset
|
1025 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
|
1026 |
1793
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
1027 |
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
1028 INPUT:: |
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
1029 |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
1030 id : <id_for_response> |
1793
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
1031 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
1032 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
|
1033 args: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
1034 "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
|
1035 "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
|
1036 "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
|
1037 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1038 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1039 OUTPUT:: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1040 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
1041 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
|
1042 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
1043 "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
|
1044 "success": true |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1045 } |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1046 error: null |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
1047 |
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
1048 |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
1049 revoke_user_group_permission |
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
1050 ---------------------------- |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1051 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4902
diff
changeset
|
1052 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
|
1053 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
|
1054 |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1055 INPUT:: |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1056 |
2143
c1f1f0661090
API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
1057 id : <id_for_response> |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1058 api_key : "<api_key>" |
4493
88b9cc4ba52f
Corrected method names in documentation, to match API
Rasmus Selsmark <rasmuss@unity3d.com>
parents:
4192
diff
changeset
|
1059 method : "revoke_user_group_permission" |
1793
631caf880b87
implements #329
Marcin Kuzminski <marcin@python-works.com>
parents:
1708
diff
changeset
|
1060 args: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
1061 "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
|
1062 "usersgroupid" : "<user group id or name>" |
1843 | 1063 } |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1064 |
1843 | 1065 OUTPUT:: |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1950
diff
changeset
|
1066 |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
1067 id : <id_given_in_input> |
1843 | 1068 result: { |
2531
d80a68e2ebcc
return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents:
2507
diff
changeset
|
1069 "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
|
1070 "success": true |
1843 | 1071 } |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3213
diff
changeset
|
1072 error: null |