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