annotate docs/api/api.rst @ 5425:5ae8e644aa88

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