Feature #3813

Query API for project details

Added by Stas SUSHKOV almost 12 years ago. Updated over 8 years ago.

Status:ClosedStart date:2009-09-03
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Projects
Target version:-
Resolution:Invalid

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.

History

#1 Updated by Alexey Palazhchenko over 11 years ago

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

#2 Updated by Stas SUSHKOV over 11 years ago

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:
  1. RedMine aliases
    17 * * * * root (cd /etc/postfix && make -ks )

This solved the problem.
Thanks a lot, you inspired me!

#3 Updated by Stas SUSHKOV over 11 years ago

  • Status changed from New to Resolved

#4 Updated by Alexey Palazhchenko over 11 years ago

Also see #296

#5 Updated by Etienne Massip over 8 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Also available in: Atom PDF