https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-09-25T14:34:54ZRedmineRedmine - Feature #3813: Query API for project detailshttps://www.redmine.org/issues/3813?journal_id=111392009-09-25T14:34:54ZAlexey Palazhchenko
<ul></ul><p>Stas SUSHKOV wrote:</p>
<blockquote>
<p>I couldn't find a way to query from redMine the projects It has.<br />This could be nice to have for automatic generation of, let's say, repositories and /etc/alias aliases for <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/RedmineReceivingEmails">RedmineReceivingEmails</a>.</p>
<p>Something like <br /><code>wget http://host/api/get/projects/* =></code> a csv structured file, or a json or an xml</p>
<p>Thank you in advance.</p>
</blockquote>
<p>First, you should patch old parts of Redmine like this: <a class="external" href="http://github.com/AlekSi/redmine/commit/cdb01b06d6978f918d29c5b72d9e144319bc8316">http://github.com/AlekSi/redmine/commit/cdb01b06d6978f918d29c5b72d9e144319bc8316</a><br />Don't forget to make your patches available to others. ;)</p>
<p>Second, do<br /><pre>wget http://host/projects.xml</pre></p> Redmine - Feature #3813: Query API for project detailshttps://www.redmine.org/issues/3813?journal_id=111502009-09-27T14:34:29ZStas SUSHKOV
<ul></ul><p>Thank you Aleksey.<br />Look what I did.<br />Because to parse xml files is a pain in bash, I set the output to be yaml.<br />Here's the patch I obtained:<br /><a class="external" href="http://gist.github.com/194800">http://gist.github.com/194800</a></p>
<p>After this I created my bash script which is like this one:<br /><a class="external" href="http://gist.github.com/194798">http://gist.github.com/194798</a></p>
<p>And also created a Makefile:<br /><a class="external" href="http://gist.github.com/194799">http://gist.github.com/194799</a></p>
The line in crontab should look like this:
<ol>
<li>RedMine aliases<br />17 * * * * root (cd /etc/postfix && make -ks )</li>
</ol>
<p>This solved the problem.<br />Thanks a lot, you inspired me!</p> Redmine - Feature #3813: Query API for project detailshttps://www.redmine.org/issues/3813?journal_id=111512009-09-27T14:43:10ZStas SUSHKOV
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul> Redmine - Feature #3813: Query API for project detailshttps://www.redmine.org/issues/3813?journal_id=111532009-09-27T15:59:51ZAlexey Palazhchenko
<ul></ul><p>Also see <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: REST API (Closed)" href="https://www.redmine.org/issues/296">#296</a></p> Redmine - Feature #3813: Query API for project detailshttps://www.redmine.org/issues/3813?journal_id=433172012-12-10T09:59:24ZEtienne Massip
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Invalid</i></li></ul>