my problem is the following one: I would want to list all the projects which are present on a RhodeCode instance through Python package. However, I do not find the necessary information within the documentation. Is it someone would have a solution?
Asked
Active
Viewed 162 times
1 Answers
1
RhodeCode has a JSON-RPC api. You can use python requests lib to fetch all list of projects, read the JSON and then iterate over the results.
The JSON api call to make is get_repos. Check out RhodeCode docs on the API topic, and how to call it. Also if you need more detailed example how to call the API, look at the open-source CLI script here (all in Python):

marcinkuzminski
- 1,751
- 14
- 11
-
It is what I want, but however it stays a small detail. THE API asks for id of the repo in parameter. How I could list all id of the rests to use them then? Or simply, how I could get back id of the repo? – Antoine Gaia Oct 13 '16 at 07:22
-
just use method get_repos that returns full list – marcinkuzminski Oct 13 '16 at 07:33
-
List of all the project id in the instance ? – Antoine Gaia Oct 13 '16 at 07:53
-
What I want, it is a list of all id of the projects of the rhodecode instance, is it feasible via the API? – Antoine Gaia Oct 13 '16 at 09:54
-
yes, get_repos returns ALL projects you have permission to. Use super-admin api_key to get the total list of all projects – marcinkuzminski Dec 07 '16 at 21:05