annotate docs/api/api.rst @ 3437:deb51ab04891 beta

home: don't crash in branch_tag_switcher when an invalid repo name is given
author Mads Kiilerich <madski@unity3d.com>
date Thu, 28 Feb 2013 17:52:44 +0100
parents 5f1850e4712a
children 08e8115585bd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 .. _api:
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2
2095
Marcin Kuzminski <marcin@python-works.com>
parents: 2010
diff changeset
3 ===
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 API
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 ===
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 Starting from RhodeCode version 1.2 a simple API was implemented.
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
9 There's a single schema for calling all api methods. API is implemented
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
10 with JSON protocol both ways. An url to send API request to RhodeCode is
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
11 <your_server>/_admin/api
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12
1839
9da24750f563 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 1812
diff changeset
13 API ACCESS FOR WEB VIEWS
9da24750f563 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 1812
diff changeset
14 ++++++++++++++++++++++++
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
16 API access can also be turned on for each web view in RhodeCode that is
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
17 decorated with `@LoginRequired` decorator. To enable API access simple change
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
18 the standard login decorator to `@LoginRequired(api_access=True)`.
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
19 After this change, a rhodecode view can be accessed without login by adding a
1911
0bd97250cd36 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 1909
diff changeset
20 GET parameter `?api_key=<api_key>` to url. By default this is only
1812
320dec24fb9a Added instruction on enabling the API access to web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1810
diff changeset
21 enabled on RSS/ATOM feed views.
320dec24fb9a Added instruction on enabling the API access to web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1810
diff changeset
22
320dec24fb9a Added instruction on enabling the API access to web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1810
diff changeset
23
1839
9da24750f563 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 1812
diff changeset
24 API ACCESS
9da24750f563 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 1812
diff changeset
25 ++++++++++
9da24750f563 docs update
Marcin Kuzminski <marcin@python-works.com>
parents: 1812
diff changeset
26
1708
fee9895fa46e changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents: 1592
diff changeset
27 All clients are required to send JSON-RPC spec JSON data::
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
29 {
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
30 "id:"<id>",
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
31 "api_key":"<api_key>",
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
32 "method":"<method_name>",
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
33 "args":{"<arg_key>":"<arg_val>"}
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
34 }
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
35
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
36 Example call for autopulling remotes repos using curl::
1708
fee9895fa46e changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents: 1592
diff changeset
37 curl https://server.com/_admin/api -X POST -H 'content-type:text/plain' --data-binary '{"id":1,"api_key":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull","args":{"repo":"CPython"}}'
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
38
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
39 Simply provide
1708
fee9895fa46e changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents: 1592
diff changeset
40 - *id* A value of any type, which is used to match the response with the request that it is replying to.
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
41 - *api_key* for access and permission validation.
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
42 - *method* is name of method to call
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
43 - *args* is an key:value list of arguments to pass to method
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
44
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
45 .. note::
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
46
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
47 api_key can be found in your user account page
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
48
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
49
1708
fee9895fa46e changed API to match fully JSON-RPC specs
Marcin Kuzminski <marcin@python-works.com>
parents: 1592
diff changeset
50 RhodeCode API will return always a JSON-RPC response::
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
51
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
52 {
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
53 "id":<id>, # matching id sent by request
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
54 "result": "<result>"|null, # JSON formatted result, null if any errors
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
55 "error": "null"|<error_message> # JSON formatted error (if any)
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
56 }
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
57
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
58 All responses from API will be `HTTP/1.0 200 OK`, if there's an error while
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
59 calling api *error* key from response will contain failure description
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
60 and result will be null.
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
61
2379
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
62
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
63 API CLIENT
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
64 ++++++++++
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
65
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
66 From version 1.4 RhodeCode adds a script that allows to easily
2379
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
67 communicate with API. After installing RhodeCode a `rhodecode-api` script
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
68 will be available.
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
69
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
70 To get started quickly simply run::
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
71
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
72 rhodecode-api _create_config --apikey=<youapikey> --apihost=<rhodecode host>
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
73
2379
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
74 This will create a file named .config in the directory you executed it storing
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
75 json config file with credentials. You can skip this step and always provide
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
76 both of the arguments to be able to communicate with server
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
77
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
78
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
79 after that simply run any api command for example get_repo::
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
80
2379
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
81 rhodecode-api get_repo
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
82
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
83 calling {"api_key": "<apikey>", "id": 75, "args": {}, "method": "get_repo"} to http://127.0.0.1:5000
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
84 rhodecode said:
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
85 {'error': 'Missing non optional `repoid` arg in JSON DATA',
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
86 'id': 75,
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
87 'result': None}
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
88
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
89 Ups looks like we forgot to add an argument
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
90
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
91 Let's try again now giving the repoid as parameters::
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
92
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
93 rhodecode-api get_repo repoid:rhodecode
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
94
2379
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
95 calling {"api_key": "<apikey>", "id": 39, "args": {"repoid": "rhodecode"}, "method": "get_repo"} to http://127.0.0.1:5000
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
96 rhodecode said:
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
97 {'error': None,
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
98 'id': 39,
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
99 'result': <json data...>}
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
100
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
101
7ac09514a178 created rhodecode-api binary script for working with api via cli
Marcin Kuzminski <marcin@python-works.com>
parents: 2378
diff changeset
102
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
103 API METHODS
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
104 +++++++++++
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
105
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
106
1446
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
107 pull
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
108 ----
eab0cf9ab8bf API docs
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
109
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
110 Pulls given repo from remote location. Can be used to automatically keep
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
111 remote repos up to date. This command can be executed only using api_key
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
112 belonging to user with admin rights
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
113
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
114 INPUT::
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
115
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
116 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
117 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
118 method : "pull"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
119 args : {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
120 "repoid" : "<reponame or repo_id>"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
121 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
122
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
123 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
124
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
125 id : <id_given_in_input>
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
126 result : "Pulled from `<reponame>`"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
127 error : null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
128
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
129
2697
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
130 rescan_repos
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
131 ------------
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
132
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
133 Dispatch rescan repositories action. If remove_obsolete is set
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
134 RhodeCode will delete repos that are in database but not in the filesystem.
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
135 This command can be executed only using api_key belonging to user with admin
2697
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
136 rights.
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
137
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
138 INPUT::
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
139
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
140 id : <id_for_response>
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
141 api_key : "<api_key>"
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
142 method : "rescan_repos"
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
143 args : {
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
144 "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
145 }
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
146
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
147 OUTPUT::
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
148
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
149 id : <id_given_in_input>
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
150 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
151 '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
152 error : null
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
153
4565e655ea2a API: Added option to rescann repositories via api call
Marcin Kuzminski <marcin@python-works.com>
parents: 2531
diff changeset
154
3235
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
155 invalidate_cache
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
156 ----------------
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
157
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
158 Invalidate cache for repository.
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
159 This command can be executed only using api_key belonging to user with admin
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
160 rights or regular user that have write or admin or write access to repository.
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
161
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
162 INPUT::
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
163
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
164 id : <id_for_response>
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
165 api_key : "<api_key>"
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
166 method : "invalidate_cache"
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
167 args : {
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
168 "repoid" : "<reponame or repo_id>"
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
169 }
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
170
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
171 OUTPUT::
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
172
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
173 id : <id_given_in_input>
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
174 result : "Cache for repository `<reponame>` was invalidated: invalidated cache keys: <list_of_cache_keys>"
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
175 error : null
d6029dacbcc4 API invalidate_cache function ref #733
Marcin Kuzminski <marcin@python-works.com>
parents: 3224
diff changeset
176
2737
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
177 lock
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
178 ----
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
179
3161
3563c47e52fd Implemented API calls for non-admin users for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 3127
diff changeset
180 Set locking state on given repository by given user. If userid param is skipped
3563c47e52fd Implemented API calls for non-admin users for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 3127
diff changeset
181 , then it is set to id of user whos calling this method.
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
182 This command can be executed only using api_key belonging to user with admin
3161
3563c47e52fd Implemented API calls for non-admin users for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 3127
diff changeset
183 rights or regular user that have admin or write access to repository.
2737
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
184
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
185 INPUT::
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
186
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
187 id : <id_for_response>
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
188 api_key : "<api_key>"
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
189 method : "lock"
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
190 args : {
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
191 "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
192 "userid" : "<user_id or username = Optional(=apiuser)>",
2737
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
193 "locked" : "<bool true|false>"
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
194 }
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
195
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
196 OUTPUT::
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
197
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
198 id : <id_given_in_input>
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
199 result : "User `<username>` set lock state for repo `<reponame>` to `true|false`"
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
200 error : null
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
201
e21cb7b1a4a5 added API call for locking/unlocking repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2697
diff changeset
202
3126
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
203 show_ip
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
204 -------
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 Shows IP address as seen from RhodeCode server, together with all
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
207 defined IP addresses for given user.
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
208 This command can be executed only using api_key belonging to user with admin
3126
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
209 rights.
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 INPUT::
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
212
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
213 id : <id_for_response>
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
214 api_key : "<api_key>"
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
215 method : "show_ip"
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
216 args : {
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
217 "userid" : "<user_id or username>",
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
218 }
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
219
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
220 OUTPUT::
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
221
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
222 id : <id_given_in_input>
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
223 result : {
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
224 "ip_addr_server": <ip_from_clien>",
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
225 "user_ips": [
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
226 {
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
227 "ip_addr": "<ip_with_mask>",
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
228 "ip_range": ["<start_ip>", "<end_ip>"],
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
229 },
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
230 ...
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
231 ]
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
232 }
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
233
3126
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
234 error : null
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
235
703070153bc1 added API method for checking IP
Marcin Kuzminski <marcin@python-works.com>
parents: 3122
diff changeset
236
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
237 get_user
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
238 --------
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
239
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
240 Get's an user by username or user_id, Returns empty result if user is not found.
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
241 If userid param is skipped it is set to id of user who is calling this method.
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
242 This command can be executed only using api_key belonging to user with admin
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
243 rights, or regular users that cannot specify different userid than theirs
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
244
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
245
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
246 INPUT::
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
247
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
248 id : <id_for_response>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
249 api_key : "<api_key>"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
250 method : "get_user"
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
251 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
252 "userid" : "<username or user_id Optional(=apiuser)>"
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
253 }
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
254
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
255 OUTPUT::
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
256
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
257 id : <id_given_in_input>
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
258 result: None if user does not exist or
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
259 {
3127
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
260 "user_id" : "<user_id>",
3213
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
261 "api_key" : "<api_key>",
3127
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
262 "username" : "<username>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
263 "firstname": "<firstname>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
264 "lastname" : "<lastname>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
265 "email" : "<email>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
266 "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
267 "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
268 "active" : "<bool>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
269 "admin" :  "<bool>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
270 "ldap_dn" : "<ldap_dn>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
271 "last_login": "<last_login>",
2151
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
272 "permissions": {
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
273 "global": ["hg.create.repository",
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
274 "repository.read",
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
275 "hg.register.manual_activate"],
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
276 "repositories": {"repo1": "repository.none"},
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
277 "repositories_groups": {"Group1": "group.read"}
12ceeda33339 #404 API extensions for showing permission for users
Marcin Kuzminski <marcin@python-works.com>
parents: 2146
diff changeset
278 },
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
279 }
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
280
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
281 error: null
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
282
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
283
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
284 get_users
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
285 ---------
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
286
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
287 Lists all existing users. This command can be executed only using api_key
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
288 belonging to user with admin rights.
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
289
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
290
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
291 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
292
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
293 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
294 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
295 method : "get_users"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
296 args : { }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
297
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
298 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
299
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
300 id : <id_given_in_input>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
301 result: [
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
302 {
3127
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
303 "user_id" : "<user_id>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
304 "username" : "<username>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
305 "firstname": "<firstname>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
306 "lastname" : "<lastname>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
307 "email" : "<email>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
308 "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
309 "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
310 "active" : "<bool>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
311 "admin" :  "<bool>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
312 "ldap_dn" : "<ldap_dn>",
71ce052f8b6b add ipaddresses to repo data on API calls
Marcin Kuzminski <marcin@python-works.com>
parents: 3126
diff changeset
313 "last_login": "<last_login>",
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
314 },
3267
7b74079beec9 coding style: fix trailing and leading spaces and tabs
Mads Kiilerich <madski@unity3d.com>
parents: 3235
diff changeset
315 …
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
316 ]
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
317 error: null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
318
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
319
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
320 create_user
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
321 -----------
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
322
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
323 Creates new user. This command can
1909
f2bd5b0c1094 create user api_doc update
Marcin Kuzminski <marcin@python-works.com>
parents: 1843
diff changeset
324 be executed only using api_key belonging to user with admin rights.
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
325
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
326
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
327 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
328
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
329 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
330 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
331 method : "create_user"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
332 args : {
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
333 "username" : "<username>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
334 "email" : "<useremail>",
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
335 "password" : "<password>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
336 "firstname" : "<firstname> = Optional(None)",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
337 "lastname" : "<lastname> = Optional(None)",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
338 "active" : "<bool> = Optional(True)",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
339 "admin" : "<bool> = Optional(False)",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
340 "ldap_dn" : "<ldap_dn> = Optional(None)"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
341 }
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
342
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
343 OUTPUT::
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
344
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
345 id : <id_given_in_input>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
346 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
347 "msg" : "created new user `<username>`",
2365
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
348 "user": {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
349 "user_id" : "<user_id>",
2365
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
350 "username" : "<username>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
351 "firstname": "<firstname>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
352 "lastname" : "<lastname>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
353 "email" : "<email>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
354 "emails": "<list_of_all_additional_emails>",
2365
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
355 "active" : "<bool>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
356 "admin" :  "<bool>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
357 "ldap_dn" : "<ldap_dn>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
358 "last_login": "<last_login>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
359 },
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
360 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
361 error: null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
362
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
363
2002
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
364 update_user
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
365 -----------
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
366
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
367 updates given user if such user exists. This command can
2002
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
368 be executed only using api_key belonging to user with admin rights.
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
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
371 INPUT::
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
372
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
373 id : <id_for_response>
2002
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
374 api_key : "<api_key>"
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
375 method : "update_user"
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
376 args : {
2009
b63adad7c4af API updates
Marcin Kuzminski <marcin@python-works.com>
parents: 2006
diff changeset
377 "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
378 "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
379 "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
380 "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
381 "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
382 "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
383 "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
384 "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
385 "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
386 }
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
387
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
388 OUTPUT::
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
389
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
390 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
391 result: {
2507
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
392 "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
393 "user": {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
394 "user_id" : "<user_id>",
2507
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
395 "username" : "<username>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
396 "firstname": "<firstname>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
397 "lastname" : "<lastname>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
398 "email" : "<email>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
399 "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
400 "active" : "<bool>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
401 "admin" :  "<bool>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
402 "ldap_dn" : "<ldap_dn>",
374693af2849 API: update_user returns new updated user data
Marcin Kuzminski <marcin@python-works.com>
parents: 2506
diff changeset
403 "last_login": "<last_login>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
404 },
2365
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 error: null
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
407
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
408
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
409 delete_user
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
410 -----------
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
411
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
412
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
413 deletes givenuser if such user exists. This command can
2365
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
414 be executed only using api_key belonging to user with admin rights.
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
415
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
416
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
417 INPUT::
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
418
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
419 id : <id_for_response>
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
420 api_key : "<api_key>"
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
421 method : "delete_user"
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
422 args : {
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
423 "userid" : "<user_id or username>",
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
424 }
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
425
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
426 OUTPUT::
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
427
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
428 id : <id_given_in_input>
2365
b902baeaa494 API, added delete_user method.
Marcin Kuzminski <marcin@python-works.com>
parents: 2338
diff changeset
429 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
430 "msg" : "deleted user ID:<userid> <username>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
431 "user": null
2002
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
432 }
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
433 error: null
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
434
bdc0ad168006 API added explicit method for updating user account
Marcin Kuzminski <marcin@python-works.com>
parents: 1989
diff changeset
435
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
436 get_users_group
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
437 ---------------
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
438
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
439 Gets an existing user group. This command can be executed only using api_key
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
440 belonging to user with admin rights.
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
441
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
442
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
443 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
444
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
445 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
446 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
447 method : "get_users_group"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
448 args : {
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
449 "usersgroupid" : "<user group id or name>"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
450 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
451
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
452 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
453
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
454 id : <id_given_in_input>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
455 result : None if group not exist
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
456 {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
457 "users_group_id" : "<id>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
458 "group_name" : "<groupname>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
459 "active": "<bool>",
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
460 "members" : [
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
461 {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
462 "user_id" : "<user_id>",
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
463 "username" : "<username>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
464 "firstname": "<firstname>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
465 "lastname" : "<lastname>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
466 "email" : "<email>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
467 "emails": "<list_of_all_additional_emails>",
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
468 "active" : "<bool>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
469 "admin" :  "<bool>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
470 "ldap_dn" : "<ldap_dn>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
471 "last_login": "<last_login>",
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
472 },
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
473 …
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
474 ]
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
475 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
476 error : null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
477
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
478
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
479 get_users_groups
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
480 ----------------
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
481
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
482 Lists all existing user groups. This command can be executed only using
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
483 api_key belonging to user with admin rights.
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
484
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
485
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
486 INPUT::
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
487
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
488 id : <id_for_response>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
489 api_key : "<api_key>"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
490 method : "get_users_groups"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
491 args : { }
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
492
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
493 OUTPUT::
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
494
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
495 id : <id_given_in_input>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
496 result : [
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
497 {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
498 "users_group_id" : "<id>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
499 "group_name" : "<groupname>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
500 "active": "<bool>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
501 },
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
502 …
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
503 ]
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
504 error : null
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
505
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
506
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
507 create_users_group
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
508 ------------------
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
509
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
510 Creates new user group. This command can be executed only using api_key
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
511 belonging to user with admin rights
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
512
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
513
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
514 INPUT::
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
515
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
516 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
517 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
518 method : "create_users_group"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
519 args: {
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
520 "group_name": "<groupname>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
521 "active":"<bool> = Optional(True)"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
522 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
523
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
524 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
525
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
526 id : <id_given_in_input>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
527 result: {
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
528 "msg": "created new user group `<groupname>`",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
529 "users_group": {
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
530 "users_group_id" : "<id>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
531 "group_name" : "<groupname>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
532 "active": "<bool>",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
533 },
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
534 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
535 error: null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
536
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
537
1793
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
538 add_user_to_users_group
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
539 -----------------------
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
540
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
541 Adds a user to a user group. If user exists in that group success will be
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
542 `false`. This command can be executed only using api_key
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
543 belonging to user with admin rights
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
544
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
545
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
546 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
547
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
548 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
549 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
550 method : "add_user_users_group"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
551 args: {
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
552 "usersgroupid" : "<user group id or name>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
553 "userid" : "<user_id or username>",
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
554 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
555
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
556 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
557
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
558 id : <id_given_in_input>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
559 result: {
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
560 "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
561 "msg": "added member `<username>` to user group `<groupname>` |
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
562 User is already in that group"
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
563 }
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
564 error: null
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
565
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
566
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
567 remove_user_from_users_group
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
568 ----------------------------
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
569
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
570 Removes a user from a user group. If user is not in given group success will
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
571 be `false`. This command can be executed only
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
572 using api_key belonging to user with admin rights
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
573
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
574
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
575 INPUT::
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
576
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
577 id : <id_for_response>
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
578 api_key : "<api_key>"
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
579 method : "remove_user_from_users_group"
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
580 args: {
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
581 "usersgroupid" : "<user group id or name>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
582 "userid" : "<user_id or username>",
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
583 }
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
584
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
585 OUTPUT::
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
586
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
587 id : <id_given_in_input>
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
588 result: {
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
589 "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
590 "msg": "removed member <username> from user group <groupname> |
1989
0f87c784756e API changes
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
591 User wasn't in group"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
592 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
593 error: null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
594
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
595
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
596 get_repo
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
597 --------
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
598
2146
ee45677c4edc Api docs fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2143
diff changeset
599 Gets an existing repository by it's name or repository_id. Members will return
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
600 either users_group or user associated to that repository. This command can be
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
601 executed only using api_key belonging to user with admin
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
602 rights or regular user that have at least read access to repository.
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
603
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
604
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
605 INPUT::
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
606
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
607 id : <id_for_response>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
608 api_key : "<api_key>"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
609 method : "get_repo"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
610 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
611 "repoid" : "<reponame or repo_id>"
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
612 }
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
613
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
614 OUTPUT::
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
615
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
616 id : <id_given_in_input>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
617 result: None if repository does not exist or
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
618 {
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
619 "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
620 "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
621 "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
622 "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
623 "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
624 "enable_locking": "<bool>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
625 "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
626 "private": "<bool>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
627 "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
628 "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
629 "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
630 "last_changeset": {
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
631 "author": "<full_author>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
632 "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
633 "message": "<commit_message>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
634 "raw_id": "<raw_id>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
635 "revision": "<numeric_revision>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
636 "short_id": "<short_id>"
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
637 }
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
638 "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
639 "fork_of": "<name_of_fork_parent>",
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
640 "members" : [
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
641 {
3213
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
642 "type": "user",
3174
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
643 "user_id" : "<user_id>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
644 "username" : "<username>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
645 "firstname": "<firstname>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
646 "lastname" : "<lastname>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
647 "email" : "<email>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
648 "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
649 "active" : "<bool>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
650 "admin" :  "<bool>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
651 "ldap_dn" : "<ldap_dn>",
37c0ac5fe42f added last_changeset information in get_repo API function
Marcin Kuzminski <marcin@python-works.com>
parents: 3163
diff changeset
652 "last_login": "<last_login>",
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
653 "permission" : "repository.(read|write|admin)"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
654 },
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
655 …
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
656 {
3213
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
657 "type": "users_group",
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
658 "id" : "<usersgroupid>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
659 "name" : "<usersgroupname>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
660 "active": "<bool>",
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
661 "permission" : "repository.(read|write|admin)"
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
662 },
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
663 …
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
664 ]
3213
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
665 "followers": [
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
666 {
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
667 "user_id" : "<user_id>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
668 "username" : "<username>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
669 "firstname": "<firstname>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
670 "lastname" : "<lastname>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
671 "email" : "<email>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
672 "emails": "<list_of_all_additional_emails>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
673 "ip_addresses": "<list_of_ip_addresses_for_user>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
674 "active" : "<bool>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
675 "admin" :  "<bool>",
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
676 "ldap_dn" : "<ldap_dn>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
677 "last_login": "<last_login>",
3213
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
678 },
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
679 …
3213
f5dcee2b3153 updated api docs
Marcin Kuzminski <marcin@python-works.com>
parents: 3174
diff changeset
680 ]
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
681 }
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
682 error: null
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
683
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
684
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
685 get_repos
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
686 ---------
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
687
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
688 Lists all existing repositories. This command can be executed only using
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
689 api_key belonging to user with admin rights or regular user that have
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
690 admin, write or read access to repository.
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
691
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
692
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
693 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
694
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
695 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
696 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
697 method : "get_repos"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
698 args: { }
1500
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
699
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
700 OUTPUT::
256e729a94cd Extended API
Marcin Kuzminski <marcin@python-works.com>
parents: 1491
diff changeset
701
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
702 id : <id_given_in_input>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
703 result: [
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
704 {
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
705 "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
706 "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
707 "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
708 "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
709 "private": : "<bool>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
710 "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
711 "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
712 "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
713 "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
714 "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
715 "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
716 "enable_locking": "<bool>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
717 "enable_statistics": "<bool>",
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
718 },
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
719 …
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
720 ]
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
721 error: null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
722
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
723
1810
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
724 get_repo_nodes
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
725 --------------
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
726
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
727 returns a list of nodes and it's children in a flat list for a given path
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
728 at given revision. It's possible to specify ret_type to show only `files` or
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
729 `dirs`. This command can be executed only using api_key belonging to user
1810
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
730 with admin rights
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
731
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
732
1810
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
733 INPUT::
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
734
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
735 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
736 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
737 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
738 args: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
739 "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
740 "revision" : "<revision>",
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
741 "root_path" : "<root_path>",
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
742 "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
743 }
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
744
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
745 OUTPUT::
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
746
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
747 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
748 result: [
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
749 {
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
750 "name" : "<name>"
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
751 "type" : "<type>",
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
752 },
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
753 …
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
754 ]
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
755 error: null
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
756
203af05539e0 implements #330 api method for listing nodes at particular revision
Marcin Kuzminski <marcin@python-works.com>
parents: 1793
diff changeset
757
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
758 create_repo
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
759 -----------
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
760
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
761 Creates a repository. If repository name contains "/", all needed repository
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
762 groups will be created. For example "foo/bar/baz" will create groups
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
763 "foo", "bar" (with "foo" as parent), and create "baz" repository with
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
764 "bar" as group. This command can be executed only using api_key belonging to user with admin
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
765 rights or regular user that have create repository permission. Regular users
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
766 cannot specify owner parameter
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
767
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
768
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
769 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
770
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
771 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
772 api_key : "<api_key>"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
773 method : "create_repo"
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
774 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
775 "repo_name" : "<reponame>",
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
776 "owner" : "<onwer_name_or_id = Optional(=apiuser)>",
3115
ebd76deee70d Default parameters are now also used for creating repos using API calls, and initial repo scanner
Marcin Kuzminski <marcin@python-works.com>
parents: 2903
diff changeset
777 "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
778 "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
779 "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
780 "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
781 "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
782 "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
783 "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
784 "enable_statistics": "<bool> = Optional(False)",
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
785 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
786
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
787 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
788
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
789 id : <id_given_in_input>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
790 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
791 "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
792 "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
793 "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
794 "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
795 "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
796 "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
797 "private": : "<bool>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
798 "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
799 "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
800 "landing_rev": "<landing_rev>",
3122
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
801 "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
802 "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
803 "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
804 "enable_locking": "<bool>",
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
805 "enable_statistics": "<bool>",
2378
04ef27ce939e API: create_repo returns now repo object after creation
Marcin Kuzminski <marcin@python-works.com>
parents: 2365
diff changeset
806 },
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
807 }
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
808 error: null
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
809
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
810
3122
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
811 fork_repo
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
812 ---------
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
813
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
814 Creates a fork of given repo. In case of using celery this will
3122
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
815 immidiatelly return success message, while fork is going to be created
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
816 asynchronous. This command can be executed only using api_key belonging to
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
817 user with admin rights or regular user that have fork permission, and at least
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
818 read access to forking repository. 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
819
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
820
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
821 INPUT::
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
822
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
823 id : <id_for_response>
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
824 api_key : "<api_key>"
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
825 method : "fork_repo"
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
826 args: {
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
827 "repoid" : "<reponame or repo_id>",
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
828 "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
829 "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
830 "description": "<description>",
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
831 "copy_permissions": "<bool>",
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
832 "private": "<bool>",
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
833 "landing_rev": "<landing_rev>"
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
834
3122
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
835 }
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
836
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
837 OUTPUT::
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
838
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
839 id : <id_given_in_input>
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
840 result: {
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
841 "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
842 "success": true
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
843 }
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
844 error: null
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
845
4ef6a7ed5e3e #699: fix missing fork docs for API
Marcin Kuzminski <marcin@python-works.com>
parents: 3115
diff changeset
846
2003
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
847 delete_repo
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
848 -----------
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
849
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
850 Deletes a repository. This command can be executed only using api_key belonging to user with admin
3163
28571535dd61 API methods create_repo, fork_repo, delete_repo, get_repo, get_repos
Marcin Kuzminski <marcin@python-works.com>
parents: 3162
diff changeset
851 rights or regular user that have admin access to repository.
2003
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
852
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
853
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
854 INPUT::
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
855
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
856 id : <id_for_response>
2003
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
857 api_key : "<api_key>"
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
858 method : "delete_repo"
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
859 args: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
860 "repoid" : "<reponame or repo_id>"
2003
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
861 }
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
862
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
863 OUTPUT::
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
864
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
865 id : <id_given_in_input>
2003
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
866 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
867 "msg": "Deleted repository `<reponame>`",
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
868 "success": true
2003
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
869 }
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
870 error: null
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
871
7dfcdf4c7dd2 implements #361 API method for deleting repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 2002
diff changeset
872
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
873 grant_user_permission
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
874 ---------------------
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
875
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
876 Grant permission for user on given repository, or update existing one
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
877 if found. This command can be executed only using api_key belonging to user
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
878 with admin rights.
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
879
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
880
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
881 INPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
882
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
883 id : <id_for_response>
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
884 api_key : "<api_key>"
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
885 method : "grant_user_permission"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
886 args: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
887 "repoid" : "<reponame or repo_id>"
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
888 "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
889 "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
890 }
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
891
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
892 OUTPUT::
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
893
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
894 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
895 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
896 "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
897 "success": true
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
898 }
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
899 error: null
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
900
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
901
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
902 revoke_user_permission
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
903 ----------------------
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
904
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
905 Revoke permission for user on given repository. This command can be executed
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
906 only using api_key belonging to user with admin rights.
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
907
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
908
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
909 INPUT::
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
910
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
911 id : <id_for_response>
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
912 api_key : "<api_key>"
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
913 method : "revoke_user_permission"
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
914 args: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
915 "repoid" : "<reponame or repo_id>"
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
916 "userid" : "<username or user_id>"
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
917 }
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
918
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
919 OUTPUT::
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
920
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
921 id : <id_given_in_input>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
922 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
923 "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
924 "success": true
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
925 }
1592
8628c8706bf8 [API] Update doc
Nicolas VINOT <aeris@imirhil.fr>
parents: 1500
diff changeset
926 error: null
1793
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
927
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
928
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
929 grant_users_group_permission
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
930 ----------------------------
1793
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
931
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
932 Grant permission for user group on given repository, or update
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
933 existing one if found. This command can be executed only using
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
934 api_key belonging to user with admin rights.
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
935
1793
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
936
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
937 INPUT::
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
938
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
939 id : <id_for_response>
1793
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
940 api_key : "<api_key>"
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
941 method : "grant_users_group_permission"
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
942 args: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
943 "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
944 "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
945 "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
946 }
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
947
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
948 OUTPUT::
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
949
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
950 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
951 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
952 "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
953 "success": true
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
954 }
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
955 error: null
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
956
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
957
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
958 revoke_users_group_permission
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
959 -----------------------------
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
960
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
961 Revoke permission for user group on given repository.This command can be
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
962 executed only using api_key belonging to user with admin rights.
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
963
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
964 INPUT::
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
965
2143
c1f1f0661090 API docs improvement.
Marcin Kuzminski <marcin@python-works.com>
parents: 2095
diff changeset
966 id : <id_for_response>
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
967 api_key : "<api_key>"
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
968 method : "revoke_users_group_permission"
1793
631caf880b87 implements #329
Marcin Kuzminski <marcin@python-works.com>
parents: 1708
diff changeset
969 args: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
970 "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
971 "usersgroupid" : "<user group id or name>"
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
972 }
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
973
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
974 OUTPUT::
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1950
diff changeset
975
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
976 id : <id_given_in_input>
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
977 result: {
2531
d80a68e2ebcc return proper id from users_group
Marcin Kuzminski <marcin@python-works.com>
parents: 2507
diff changeset
978 "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
979 "success": true
1843
0771f0f5ab28 api review
Marcin Kuzminski <marcin@python-works.com>
parents: 1839
diff changeset
980 }
3224
8b8edfc25856 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3213
diff changeset
981 error: null