Feature #3813
closed
Query API for project details
Added by Stas SUSHKOV about 15 years ago.
Updated almost 12 years ago.
Description
I couldn't find a way to query from redMine the projects It has.
This could be nice to have for automatic generation of, let's say, repositories and /etc/alias aliases for RedmineReceivingEmails.
Something like
wget http://host/api/get/projects/* =>
a csv structured file, or a json or an xml
Thank you in advance.
Stas SUSHKOV wrote:
I couldn't find a way to query from redMine the projects It has.
This could be nice to have for automatic generation of, let's say, repositories and /etc/alias aliases for RedmineReceivingEmails.
Something like
wget http://host/api/get/projects/* =>
a csv structured file, or a json or an xml
Thank you in advance.
First, you should patch old parts of Redmine like this: http://github.com/AlekSi/redmine/commit/cdb01b06d6978f918d29c5b72d9e144319bc8316
Don't forget to make your patches available to others. ;)
Second, do
wget http://host/projects.xml
Thank you Aleksey.
Look what I did.
Because to parse xml files is a pain in bash, I set the output to be yaml.
Here's the patch I obtained:
http://gist.github.com/194800
After this I created my bash script which is like this one:
http://gist.github.com/194798
And also created a Makefile:
http://gist.github.com/194799
The line in crontab should look like this:
- RedMine aliases
17 * * * * root (cd /etc/postfix && make -ks )
This solved the problem.
Thanks a lot, you inspired me!
- Status changed from New to Resolved
- Status changed from Resolved to Closed
- Resolution set to Invalid
Also available in: Atom
PDF