annotate docs/api/api.rst @ 5081:154becd92f40

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