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