annotate docs/api/api.rst @ 4093:77193ad2ea61

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