https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292007-03-23T08:34:00ZRedmineRedmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=6622007-03-23T08:34:00ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>No, i don't think it would be too early. Main model objects (projects, issues, ...) are stable enough. Even if they may be extended in the future.<br />Could you briefly specify what you expect from this API in terms of entry points ? (eg. fecth issues, create an issue, ...)</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=6612007-03-26T00:43:00ZAlessio Spadaro
<ul></ul><p>I think that a minimum requirement should be to have an API that give full access at the issue level. This means access issues (CRUD), all the related models at least in read only mode (issues categories, etc..) and query support. This should be fine for attaching a single project from an external entity and a good starting point to build other features once the API starts being used.</p>
<p>In other post (the one on the svn hooks) we briefly talk about security concerns, but thinking again it could be delayed (i.e. handled by the sysadmin). The only thing to consider is the user/s the service/s will be bound to</p>
<p>I hope to have some time to think about the issue and give a more detailed answer.</p>
<p>Regards</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=6602007-10-07T02:11:00ZTim Parkinson
<ul></ul><p>Can I also vote for an API please. I think it would open up a whole world of possibility for an already cool product.<br />I'm certainly thinking query, create and update issues. For instance I have in mind something that would allow feature items to be created from an RSpec file.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=12222008-02-11T16:31:47ZMaximilian Karasz
<ul></ul><p>It's only one of the minor points of the original request so i'm afraid i might be slightly off topic, but i have successfully connected Eclipse Mylyn with redmine via the Generic Web Repository Connector.<br />Even though it provides just a very basic integration with eclipse/mylyn i thought maybe the configuration would interest a couple of people since there is, to my knowledge, no dedicated connector for redmine yet. please contact me if you're interested in the configuration, maybe a wiki howto would be a good idea...</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=15752008-03-03T10:57:28ZMads Vestergaard
<ul></ul><p>Maximilian, this sounds interesting could you send me wome further details at mnv (at) coolsms.dk</p>
<p>Thanks in advance.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=15812008-03-04T02:27:10ZMark Gallop
<ul></ul><p>+! for me. A REST API would be a very useful feature.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=15872008-03-04T13:29:41ZMartin Herr
<ul></ul><p>+1 Would like to build an Redmine-AIR-Client based on the REST API :)</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=16432008-03-05T15:19:40ZDoug Raney
<ul></ul><p>+1 for REST API. Would like to see a SOAP 1.2 compliant interface. See issue <a class="issue tracker-2 status-5 priority-3 priority-lowest closed" title="Feature: Feature Request - Web Service Gateway (Closed)" href="https://www.redmine.org/issues/725">#725</a></p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=17062008-03-08T23:25:18ZChristopher Hlubek
<ul></ul><p>+1 for REST API</p>
<p>What about JSON format for usage in AJAX / RIA applications? I think it wouldn't take much more effort to add a JSON output as an supplement to XML and it would integrate nicer and more efficient in JavaScript driven applications.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=19252008-03-20T00:37:19ZJohn Z
<ul></ul><p>Seems like this issue has had a lot of feedback and there are a lot of votes for a REST API. Though I would normally also vote for REST, we've been relying on Mantis (<a class="external" href="http://www.mantisbt.org/">http://www.mantisbt.org/</a>) as our gateway issue management solution for years. Though Redmine wants to replace Mantis, we like it too much to use anything else for awhile. We have about 100 projects in Mantis now.</p>
<p>Our business process would be to receive issues into Mantis, evaluate them, then pass the ones to be worked into Redmine. Mantis has a SOAP API. So I guess we'd really like to see a SOAP API, or some other mechanism to pass selected issues to Redmine from Mantis.</p>
<p>Of course this might involve a REST service from Mantis..</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=23702008-04-18T17:02:20ZWes Billman
<ul></ul><p>+1 for REST API</p>
<p>would really like to see a mylyn connector for eclipse!!</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=25442008-05-01T07:46:31Zdop in
<ul></ul><p>+1 for REST API<br />a mylyn connector for eclipse should be so nice!</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=25652008-05-02T05:24:00ZKarl DeBisschop
<ul></ul><p>To the user who was able to set up the generic mylyn connector, Any chance of posting details?</p>
<p>I'd love to see a native connector - that seems to be the big thing that trac still has over redmine.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=26012008-05-03T17:58:26ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>I've just added an Howto on using the Mylyn generic connector: <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/HowTo_Mylyn">HowTo Mylyn</a></p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=26642008-05-07T12:54:31ZKarl DeBisschop
<ul></ul><p>Thanks for the HowTo. Unfortunately, it doesn't seem to work for me. I haven't found a way to diagnose the problem. I have a bit of a suspicion that the login isn't working because when I try to open the query in a browser it fails. But I don't have enough understanding of the mylyn connector to be sure that I'm interpreting that fact correctly.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=26652008-05-07T14:10:07ZBenjamin Eberlei
<ul></ul><p>Thank you very much for that HowTo, I guess the request for a fully featured Mylyn connector would have to go to the Mylyn development team.</p>
<p>I raise my hand for the REST/SOAP API though, because it would be very useful to integrate redmine into other applications in an consistent way. Propably now you would just access the Redmine Database structure and retrieve the information you need in another application. A consitently defined gateway would be much more useful.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=26792008-05-08T08:10:56ZAkira Matsuda
<ul></ul><p><strong>+1</strong> for REST API</p>
<p>I strongly long for this feature in order to replace my ugly sh script like this...<br /><pre>
ruby ${REDMINE_HOME}/script/runner "Issue.create :tracker_id => 3, :project => Project.find_by_identifier('${PROJECT_NAME}'), :sub
ject => '${SUBJECT}', :description => '${DESCRIPTION}', :author => User.find_by_login('${USER_NAME}'), :start_date => Time.now"
</pre></p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=26872008-05-08T16:00:14ZEric Davis
<ul></ul><p>I would love this feature also but looking at this from a development point of view, it's a huge undertaking. What might be a better way to make progress is to break it into smaller parts. Since it sounds like an issue API is a common request, I created <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: REST API for Issues (Closed)" href="https://www.redmine.org/issues/1214">#1214</a> for the issues API.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=27012008-05-11T03:58:10ZKarl DeBisschop
<ul></ul><p>I have posted a <a href="http://www.youtube.com/watch?v=il7L0ZH25ME" class="external">video on youtube</a> to go along with the <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/HowTo_Mylyn">HowTo Mylyn</a></p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=35422008-06-25T07:10:18ZRoger Hunwicks
<ul></ul><p>+1 for Mylyn integration here too.</p>
<p>We are using the Generic Web Connector, as per the wiki page (thanks for that) but proper integration would be better.</p>
<p>We evaluated Eventum before deciding on Redmine, and our approach to Mylyn integration was going to be to produce a XML-RPC interface that matched the Trac one (because it is open source) and then try to use the native Trac connector to talk to Eventum. We're not able to attempt this for Redmine because we are a PHP shop, but someone else might want to consider if this is feasible. We figured this approach was possible using our existing skills, whereas writing a native Mylyn connector wasn't.</p>
<p>We would also consider using a REST/SOAP/XML-RPC interface to write an integration between dotProject and Redmine (it currently has integrations for Eventum and Mantis) and between our existing in-house issue tracker and Redmine.</p>
<p>Thanks<br />Roger</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=35442008-06-25T07:39:18ZRoger Hunwicks
<ul></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>I've just added an Howto on using the Mylyn generic connector: <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/HowTo_Mylyn">HowTo Mylyn</a></p>
</blockquote>
<p>Please can you update this page:</p>
<p>If you are accessing Redmine via a subdirectory, e.g. <a class="external" href="http://server.company.com/redmine">http://server.company.com/redmine</a> (instead of <a class="external" href="http://redmine.company.com">http://redmine.company.com</a>) then the setup is slightly different:<br /><pre>
Server: http://www.company.com/directory -- Replace it with the URL of your Redmine instance
Query pattern: <td class="subject">.*?<a href="/directory/issues/show/(\d+)">(.+?)</a></td> -- replace /directory as required
</pre></p>
<p>Note the /directory in the query pattern, which must match the directory path you access Redmine at.</p>
<p>Thanks<br />Roger</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=36162008-06-29T09:40:53ZMarkus Knittig
<ul></ul><p>+1<br />I'm also very interested in an Mylyn connector. The Generic Web Connector doesn't have enough features for me and the Generic SQL Connector is not flexible enough. I would help to develop one, but before that a API is needed. Unfortunaly I'm a Ruby newbie, but maybe this can help: <a class="external" href="http://www.xml.com/pub/a/2006/04/19/rest-on-rails.html">http://www.xml.com/pub/a/2006/04/19/rest-on-rails.html</a></p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=36352008-06-29T22:37:53ZMarkus Knittig
<ul></ul><p>Here is another good link: <a class="external" href="http://www.b-simple.de/download/restful_rails_en.pdf">http://www.b-simple.de/download/restful_rails_en.pdf</a></p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=37462008-07-05T19:49:46ZMarkus Knittig
<ul><li><strong>File</strong> <a href="/attachments/729">rest.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/729/rest.diff">rest.diff</a> added</li></ul>So, I've played a bit with REST and Redmine. It was quite easy to set up even for me as a Ruby newbie. I successfully deleted projects and created a issue with curl. Problems:
<ul>
<li>REST doesn't like cookies. Some kind of token authentication would be good. Maybe extend the RSS key authentication?</li>
<li>Rendering single objects like projects are easy. But rendering e.g. issues with journals, timelogs and attachments as XML is tricky.</li>
<li>Haven't thought about querying custom fields, enumerations, etc.</li>
</ul> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=38742008-07-13T17:54:27ZMarkus Knittig
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>10</i></li></ul><p>Someone has already created a basic XML-RPC service for Redmine: <a class="external" href="http://sourceforge.net/projects/redmin-mylyncon/">http://sourceforge.net/projects/redmin-mylyncon/</a><br />I'm looking into that, because I don't think it's possible to get Redmine RESTful without some serious rewrites...</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=39142008-07-15T16:29:46ZEric Davis
<ul></ul><p>Markus Knittig wrote:</p>
<blockquote>
So, I've played a bit with REST and Redmine. It was quite easy to set up even for me as a Ruby newbie. I successfully deleted projects and created a issue with curl. Problems:
<ul>
<li>REST doesn't like cookies. Some kind of token authentication would be good. Maybe extend the RSS key authentication?</li>
<li>Rendering single objects like projects are easy. But rendering e.g. issues with journals, timelogs and attachments as XML is tricky.</li>
<li>Haven't thought about querying custom fields, enumerations, etc.</li>
</ul>
</blockquote>
<p>Looks like a good start. If I get some time I can try to lend a hand, I have a few years experience with REST and Ruby on Rails. The Redmine controllers are pretty <a href="http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model" class="external">fat</a> though so I'd see a lot of refactoring needed to get a good API interface. I'd image the API would be a good 1.0 feature with maybe a preview release in 0.9.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=43092008-08-12T18:35:05ZMarkus Knittig
<ul></ul><p>Eric Davis wrote:</p>
<blockquote>
<p>The Redmine controllers are pretty <a href="http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model" class="external">fat</a> though so I'd see a lot of refactoring needed to get a good API interface.</p>
</blockquote>
<p>ACK. What's your option on this: <a class="external" href="http://e-haitham.blogspot.com/2008/06/restful-rails-paramparsers-and-xml.html">http://e-haitham.blogspot.com/2008/06/restful-rails-paramparsers-and-xml.html</a><br />About authentication: I think <a href="http://oauth.net/" class="external">OAuth</a> looks like a good solution...</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=47782008-09-14T13:50:38ZMarkus Knittig
<ul><li><strong>% Done</strong> changed from <i>10</i> to <i>30</i></li></ul><p>So, I've forked Redmine from Eric on GitHub and have begun to work on a RESTful branch: <a class="external" href="http://github.com/mknittig/redmine/tree/restful">http://github.com/mknittig/redmine/tree/restful</a><br />It's still a bit buggy, but I'm making good progress...</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=47832008-09-15T01:24:26ZGerrit Kaiser
<ul></ul><p>I did some work on Redmine’s URL scheme that would help this. I made the URLs adhere to Rails’ (new) conventions as closely as possible (e.g. /project/ecookbook/{wiki}issues|activity} etc.</p>
<p>See Issue <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: RESTful URLs for everything (Closed)" href="https://www.redmine.org/issues/1901">#1901</a></p>
<p>(I can’t seem to add that issue as proper “related issue”. How come?)</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=47842008-09-15T07:39:05ZMarkus Knittig
<ul></ul><p>Gerrit Kaiser wrote:</p>
<blockquote>
<p>I did some work on Redmine’s URL scheme that would help this. I made the URLs adhere to Rails’ (new) conventions as closely as possible (e.g. /project/ecookbook/{wiki}issues|activity} etc.</p>
<p>See Issue <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: RESTful URLs for everything (Closed)" href="https://www.redmine.org/issues/1901">#1901</a></p>
</blockquote>
<p>Looks like a good start, but I think using <a href="http://api.rubyonrails.org/classes/ActionController/Resources.html" class="external">resources</a> instead of connect is a better solution. I might use some of your tests if you don't mind...</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=47872008-09-15T08:34:50ZGerrit Kaiser
<ul></ul><p>You’re welcome to grab whatever you like from the patch! But let’s think about it:</p>
<p>Sure using map.resources would greatly clean up the routes.rb file, but there would be no other gain than that.</p>
<p>On the other hand, using map.resources requires a complete refactoring of <strong>all</strong> of the controllers. Redmine doesn’t use named routes internally, relying on url_for params hashes everywhere instead. So using map.resources right away would also require you to check and possibly change <strong>all</strong> links and forms on the site, a daunting task especially considering Redmine’s spotty view test coverage.</p>
<p>Using equivalent conventional routes where appropriate like in my patch would allow you to create an external interface that is exactly like it should be. Then introducing named routes and using them everywhere, <em>then</em> refactoring the controllers (one by one) to follow Rails’s action conventions and <em>finally</em> switching to map.resources calls to generate the routes seems to me like a more viable migration path, especially considering the significant size of Redmine’s codebase.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=47902008-09-15T10:39:37ZMarkus Knittig
<ul></ul><p>Gerrit Kaiser wrote:</p>
<blockquote>
<p>You’re welcome to grab whatever you like from the patch! But let’s think about it:</p>
<p>Sure using map.resources would greatly clean up the routes.rb file, but there would be no other gain than that.</p>
</blockquote>
<p>You can use the path and url helpers that resources generates...</p>
<blockquote>
<p>On the other hand, using map.resources requires a complete refactoring of <strong>all</strong> of the controllers. Redmine doesn’t use named routes internally, relying on url_for params hashes everywhere instead. So using map.resources right away would also require you to check and possibly change <strong>all</strong> links and forms on the site, a daunting task especially considering Redmine’s spotty view test coverage.</p>
</blockquote>
<p>Good point...</p>
<blockquote>
<p>Using equivalent conventional routes where appropriate like in my patch would allow you to create an external interface that is exactly like it should be. Then introducing named routes and using them everywhere, <em>then</em> refactoring the controllers (one by one) to follow Rails’s action conventions and <em>finally</em> switching to map.resources calls to generate the routes seems to me like a more viable migration path, especially considering the significant size of Redmine’s codebase.</p>
</blockquote>
<p>Sound's like a good plan to me...</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=48032008-09-15T21:58:41ZEric Davis
<ul></ul><p>Markus Knittig wrote:</p>
<blockquote>
<p>So, I've forked Redmine from Eric on GitHub and have begun to work on a RESTful branch: <a class="external" href="http://github.com/mknittig/redmine/tree/restful">http://github.com/mknittig/redmine/tree/restful</a><br />It's still a bit buggy, but I'm making good progress...</p>
</blockquote>
<p>Once you get it to good working state, send me a pull request and I'll see about merging it into core (or as a branch of core). With such a large change, I'd like to make sure there is a lot of test coverage.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=50682008-10-07T18:31:38ZBrian Palmer
<ul></ul><p>Markus Knittig wrote:</p>
<blockquote>
<ul>
<li>REST doesn't like cookies. Some kind of token authentication would be good. Maybe extend the RSS key authentication?</li>
</ul>
</blockquote>
<p>Rather than token auth, why not just use HTTP BASIC auth? Rails 2.0 even has it baked in.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=52762008-10-24T21:02:58ZMarkus Knittig
<ul></ul><p>Eric Davis wrote:</p>
<blockquote>
<p>Once you get it to good working state, send me a pull request and I'll see about merging it into core (or as a branch of core). With such a large change, I'd like to make sure there is a lot of test coverage.</p>
</blockquote>
<p>I'm nearly ready with the principle work. Only two functional test fail ("ArgumentError: tried to create Proc object without a block") and I've no idea why, because they seem to work manually. Also the refactored controller code might sometimes be a bit hackish...<br />A branch would be fine. It should be merged when 0.8 is done.</p>
<p>Brian Palmer wrote:</p>
<blockquote>
<p>Rather than token auth, why not just use HTTP BASIC auth? Rails 2.0 even has it baked in.</p>
</blockquote>
<p>Yeah, that might be the simplest solution.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=52792008-10-25T04:01:16ZEric Davis
<ul></ul><p>Markus Knittig wrote:</p>
<blockquote>
<p>I'm nearly ready with the principle work. Only two functional test fail ("ArgumentError: tried to create Proc object without a block") and I've no idea why, because they seem to work manually. Also the refactored controller code might sometimes be a bit hackish...<br />A branch would be fine. It should be merged when 0.8 is done.</p>
</blockquote>
<p>Great, I'm following you on GitHub so let me know once it's ready for some more stressful testing.</p>
<p>Jean-Philippe, how close are we to 0.8? If we still have a lot of time, it might be good to pull in the REST code into trunk and let it stabilize there. If 0.8 is coming up soon, it might be best to keep the REST out until post-release.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=53812008-11-01T17:47:47ZMarkus Knittig
<ul><li><strong>% Done</strong> changed from <i>30</i> to <i>60</i></li></ul><p>So, finally all test pass, but there is still some refactoring to do. BTW: I've not refactored the wiki and the repository controllers and routes yet, because there routing is a bit complicated.<br />I'm playing around with <a href="http://selenium.openqa.org/" class="external">Selenium</a> for better test coverage (the current test methods don't really cover errors in views). Would it be OK to add the <a href="http://selenium-on-rails.openqa.org/" class="external">Selenium Rails Plugins</a> to Redmine?<br />I've also started a new branch restful-ext where I add XML output to Redmine (plus HTTP Basic Authentication for REST Clients).</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=55092008-11-11T07:25:25ZJan Ivar Beddari
<ul></ul><p>The work you are doing here Markus is really interesting, thanks and keep it up! Your progress is just inspiring, funny how you at 2008-06-29 posted that you were a Ruby newbie, well now where are we? ;-)</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=67102009-01-16T18:02:30ZPatrick Naubert
<ul></ul><p>+1</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=69152009-01-26T02:03:07ZEric Davis
<ul></ul><p>I just commited support for REST urls in <a class="changeset" title="Converted routing and urls to follow the Rails REST convention. Patch supplied by commits from G..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/2317">r2317</a>. This is the first step towards an actual REST interface.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=69302009-01-26T20:26:15ZMarkus Knittig
<ul></ul><p>Just updated, looks great!</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=72832009-02-12T17:05:30ZEric Davis
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>7</i></li><li><strong>Assignee</strong> set to <i>Eric Davis</i></li></ul><p>Seeing as this issue has been around for such a long time with very little progress, I'm going to take it and see what I can do about it. I'm not promising it will be complete, just that it will be worked on. If anyone wants to help or send me patches I'd love the help. I'll be checking the patches here and the commits on GitHub.</p>
<p>And if you don't see REST, you now have <del>a target</del> someone to ask about it.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=72922009-02-12T19:11:02ZMarkus Knittig
<ul></ul><p>Eric Davis wrote:</p>
<blockquote>
<p>Seeing as this issue has been around for such a long time with very little progress, I'm going to take it and see what I can do about it. I'm not promising it will be complete, just that it will be worked on. If anyone wants to help or send me patches I'd love the help. I'll be checking the patches here and the commits on GitHub.</p>
</blockquote>
<p>Cool, I'll revisit my Redmine RESTful branch this weekend. IMO the main problem is the ugly controller refactoring. A Ruby/Rails Pro like you can probably do a much better job...</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=89892009-05-05T16:27:54ZYohann Monnier
<ul></ul><p>I would like to use this Rest API to use Redmine's Tickets methods through webservice to make a link between</p>
<p>How it works ?</p>
<p>Has this work been merged with the main Trunk ?</p>
<p>Thank you for your work.</p>
<p>Yohann</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=95302009-05-28T19:57:09ZJens Goldhammer
<ul></ul><p>+1 for integrating it into the trunk</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=97762009-06-15T09:53:42ZOleg Lozinskij
<ul></ul><p>+1</p>
<p>and another +1 for a good documentation (or at least wiki page with all mapped URLs)</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=98082009-06-17T11:57:02ZDavide Ferrari
<ul></ul><p>+1 to know about the status of Redmine APIs. lot of integration stuff could be done with this API in a cleaner way. Can you merge somehow in trunk, even if not 100% complete (but not giving errors, obviously).</p>
<p>TIA!</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=99922009-07-01T14:47:00ZPiero Sartini
<ul></ul><p>+1<br />right now it's hard to write connectors (thinking about IntelliJ and NetBeans).</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=101222009-07-10T08:03:37ZYohann Monnier
<ul></ul><p>I published a webservice plugin, based on mylyn connector, in which i implement access to many parts of redmine.</p>
<p><a class="external" href="http://github.com/YohannsMonnier/redmine_webservice/tree/master">http://github.com/YohannsMonnier/redmine_webservice/tree/master</a></p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=107752009-09-01T18:17:09Zsebastián scarano
<ul></ul><p>+1, count me on this one...</p>
<p>it would be really great to have a connector for netbeans and other ides...</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=110852009-09-22T10:43:34ZRemo Laubacher
<ul></ul><p>+1<br />Having an API would be great for these tools:<br /><a class="external" href="http://pimsnel.com/timetoticket/Home.html">http://pimsnel.com/timetoticket/Home.html</a><br /><a class="external" href="http://sourceforge.net/projects/redmineclient/">http://sourceforge.net/projects/redmineclient/</a><br /><a class="external" href="https://sourceforge.net/projects/bluemine/">https://sourceforge.net/projects/bluemine/</a></p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=122232009-11-19T20:03:23ZChristian Ribe
<ul></ul><p>+1</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=128722009-12-09T18:09:44ZNikolay Kotlyarov
<ul></ul><p>+1 for REST API</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=129812009-12-15T14:33:31ZSergio Rubio
<ul></ul><p>Some self promotion...</p>
<p><a class="external" href="http://rubiojr.netcorex.org/blog/?p=154">http://rubiojr.netcorex.org/blog/?p=154</a></p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=132452009-12-24T19:11:57ZEric Davis
<ul></ul><p>Sergio Rubio wrote:</p>
<blockquote>
<p>Some self promotion...</p>
<p><a class="external" href="http://rubiojr.netcorex.org/blog/?p=154">http://rubiojr.netcorex.org/blog/?p=154</a></p>
</blockquote>
<p>This might work as an intermediate solution but I have two concerns:</p>
<ol>
<li>it uses the Mail API key for authentication</li>
<li>there are no tests included so it's difficult to see how it would behave under the different conditions</li>
</ol>
<p>I think once 0.9 is out, you could switch to using the System API key instead (<a class="changeset" title="Adds on optional API key to repositories management controller and reposman.rb." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/3201">r3201</a>).</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=133152009-12-28T11:00:52ZSergio Rubio
<ul></ul><p>Hi Eric,</p>
<p>Your concerns are also my concerns :D.</p>
<p>I'll try to address them for the next release. I should also clean the API and document it, so others can benefit from it till we have an official one.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=135842010-01-14T19:53:36ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Assignee</strong> changed from <i>Eric Davis</i> to <i>Jean-Philippe Lang</i></li></ul><p>XML REST API added for Issues (<a class="changeset" title="XML REST API for issues that provides CRUD operations for Issues (#1214)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/3310">r3310</a>) and Projects (<a class="changeset" title="XML REST API for Projects (#296)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/3313">r3313</a>).<br />See the <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/Rest_api">documentation</a>.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=145442010-02-20T04:03:24ZEddie Ringle
<ul><li><strong>File</strong> <a href="/attachments/3230">projects_json_format.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3230/projects_json_format.diff">projects_json_format.diff</a> added</li></ul><p>This patch adds a JSON format for lists of projects, individual project information, as well as creating and deleting projects. Tested the list and individual pages (simple GET requests), but haven't been able to test the others.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=145582010-02-20T14:02:53ZEddie Ringle
<ul></ul><p>FYI, that patch and any subsequent patches I post here are coming directly from my fork of Redmine on GitHub (<a class="external" href="http://github.com/eddieringle/redmine">http://github.com/eddieringle/redmine</a>).</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=148392010-03-02T17:28:24ZJavier Hernandez
<ul></ul><p>Hi, i'm developing a redmine's desktop client, but i need some features in REST API.</p>
<p>I enumerate features that i need, at this moment, for continue with the project:</p>
<p>Time tracking: Add spent-hours to issues<br />Projects-related features<br />Members in a project, for assign issues to a specific member<br />Issues-related features<br />Get Issues' possible types<br />Get Issues' possible categories<br />Add notes to journals at issue's update<br />Attachment files, at creation and at issue's update<br />Now, my application can get and create/update/delete issues/projects, but options are a little bit limited.</p>
<p>It is difficult to implement this?</p>
<p>Thanks in advance!</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=155512010-03-30T14:55:08ZFelix Schäfer
<ul><li><strong>Category</strong> set to <i>REST API</i></li></ul> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=161112010-04-23T08:22:06ZLennard Hunfeld
<ul></ul><p>Hi,</p>
<p>we are having the same problem with the time tracking.<br />Is there actually a good way to add spent hours using rest?</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=161122010-04-23T08:49:02ZYohann Monnier
<ul></ul><p><a class="user active" href="https://www.redmine.org/users/143936">lennard hamann</a> Hunfeld , <a class="user active" href="https://www.redmine.org/users/8742">Javier Asensio Cubero</a> Hernandez : you can use issue api to add spent hours to project ;)<br /><pre>
Timelog.new(:issue_id => params[:task], :time_entry=>{:comments => messageEntry, :activity_id => @redmine_dev_activity , :hours => params[:spent_time]})
</pre></p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=161492010-04-25T10:54:38ZLennard Hunfeld
<ul></ul><p>Thanks a lot.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=168942010-05-20T15:18:12ZLennard Hunfeld
<ul></ul><p>Hi,</p>
<p>is your code still working with version 0.9.4?<br />if so, could you tell me where the timelogs.xml (or whatever it may be called) is located?</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=170662010-05-31T15:27:41ZPerrine C.
<ul></ul><p>Hi,</p>
<p><a class="user active" href="https://www.redmine.org/users/143936">lennard hamann</a> Hunfeld: I think we have the same problem</p>
<p>@Yohann Monnier: Can you explain how to use this API ?</p>
<p>I use the PHP ActiveResource class, and tried to create a Timelog inherited class, but it cannot find the page timelogs.xml.</p>
<p>Maybe it doesn't work like Issue and Project ?</p>
<p>You said "you can use issue api".<br />Does it mean that we have to instanciate an Issue class (inherited of ActiveResource), and<br />1) search the issue to which we want to add spent hours<br />2) add time ?<br />How can we do it ?</p>
<p>Thanks in advance.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=170692010-05-31T16:27:06ZYohann Monnier
<ul></ul><p><a class="user active" href="https://www.redmine.org/users/12197">perrine archambaut</a> C.</p>
<p>I work on enhancements of the api, but my changes have not been commited yet for timelogs.</p>
<p>In order to add spent time, you can follow your algorithm, i mean</p>
<p>1/ create an issue class inheriting from active ressource<br />2/ fetch the issue you want to update<br />3/ update the issue with the params i explain in my previous post</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=170872010-06-01T08:58:43ZPerrine C.
<ul></ul><p>Hi,<br />first, I want to thank you for your fast answer ! :)</p>
<p>Unfortunately, I didn't succeed :(</p>
<p>I installed the last release (0.9.4.devel.3764).<br />Then, I did like this :</p>
<p>1) Instanciate an Issue :<br /><code>$issue = new Issue();</code></p>
<p>2) Fetch the one I want :<br /><code>$issue->find($issue_id);</code></p>
<p>3) Tried to update the subject : <br /><code>$issue->set('subject', 'test')->save();</code><br />=> it's okay...</p>
<p>4) Tried to add spent hours :<br /><code>$issue->set('time_entry', array('comments' => $comment, 'activity_id' => $activity, 'hours' => $hours) )->save();</code><br />=> it doesn't work...</p>
<p>I think I didn't understand how to use your params, because I don't know how to "translate" ruby code into php code (I don't know anything about ruby..). Could you help me to give the correct params with php code ?</p>
<p>Thanks again =)</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=170882010-06-01T09:24:41ZYohann Monnier
<ul></ul><p>Hello Perrine C.</p>
<p>I am really sorry but this way does not work anymore.</p>
<p>Here is the way i do it today :<br /><pre>
newtimelog = Timelog.new(:issue_id => params[:task], :time_entry=>{:comments => messageEntry, :activity_id => @redmine_dev_activity , :hours => params[:spent_time]})
</pre></p>
<p>But this is not available for now in the core of Redmine.</p>
<p>I working on it to add it via the development team.</p>
You can find the changes on my github repository, you need changes on these files :
<ul>
<li><a class="external" href="http://github.com/YohannsMonnier/redmine/blob/master/config/routes.rb">http://github.com/YohannsMonnier/redmine/blob/master/config/routes.rb</a></li>
<li><a class="external" href="http://github.com/YohannsMonnier/redmine/blob/master/app/controllers/timelog_controller.rb">http://github.com/YohannsMonnier/redmine/blob/master/app/controllers/timelog_controller.rb</a></li>
</ul>
<p>Best regards</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=170942010-06-01T12:17:16ZPerrine C.
<ul></ul><p>Thanks again for the answer and the attention given to my request.</p>
<p>I will watch for news about your timelogs API. Maybe you can inform everybody when your changes will be commited ?</p>
<p>All the best.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=171412010-06-04T08:07:41ZGuillaume P.
<ul></ul><p>Hello everybody.</p>
<p>I try to use this feature but I don't manage to do what I want.</p>
<p>Create project -> OK</p>
<p>Create issue for an existing project, created manually in Redmine -> OK</p>
<p>Create issue for a project which was created by this API -> NOT OK !</p>
<p>It doesn't work because trackers are not available for the project. But I don't manage to associate tracker with the project :<br />$project = new Project(array('name' => 'test', 'identifier' => 'test', 'parent_id' => '1', 'trackers' => '1'));<br />or <br />$project = new Project(array('name' => 'test', 'identifier' => 'test', 'parent_id' => '1', 'trackers' => array('1')));<br />give the same result :<br />ActiveRecord::AssociationTypeMismatch (Tracker(#-612369158) expected, got String(#-607940098)):<br /> app/controllers/projects_controller.rb:70:in `new'<br /> app/controllers/projects_controller.rb:70:in `add'</p>
<p>The creation of issues works fine after I associate manually the trackers in Redmine.</p>
<p>Is it possible to create project and after that create issue for this one ?</p>
<p>Thanks.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=171432010-06-04T09:16:23ZYohann Monnier
<ul></ul><p>Check this Redmine version here (testing only for the moment)</p>
<p><a class="external" href="http://github.com/Yohannsmonnier/redmine">http://github.com/Yohannsmonnier/redmine</a></p>
<p>It allows :</p>
<ul>
<li>List members of a projet</li>
<li>New Timelog API (in progress : for the moment: add spent time)</li>
<li>Enhanced Issue API</li>
<li>Enhanced Project API (get project in list view members for example)</li>
<li>Get current user info (for client connexion purpose)</li>
<li>Enumerations access :
<ul>
<li>Get all trackers</li>
<li>Get all priorities</li>
</ul>
</li>
<li>it also Corrects generated REST XMLs (data types, better way to display REST XMLs in tags and not with too much attributes)</li>
</ul>
More to come in the next weeks :
<ul>
<li>New User API (add, edit an user)</li>
<li>...</li>
</ul>
<p>Tell me what you need, I'll try to implement it.</p>
<p>I am open to suggestion to correct my implementations</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=171452010-06-04T09:56:48ZGuillaume P.
<ul></ul><p>Thanks Yohann.</p>
<p>I downloaded your version, it works fine but it seems that it doesn't include what I need.<br />It's very simple : I have to create 1 project and X child, and Y issues to this child.<br />The creation of the project by the API is OK, but I can't create issues for the project.</p>
<p>In order to do that, I have to configure in Redmine the trackers and the enabled modules for each projects, even if I checked all modules in default enabled modules in the administration.</p>
<p>I would like to make it automatic.</p>
<p>If I tried to put trackers in the constructor of the class :<br />$project = new Project(array('name' => 'test', 'identifier' => 'test', 'parent_id' => '1', 'trackers' => '1'));<br />or<br />$project = new Project(array('name' => 'test', 'identifier' => 'test', 'parent_id' => '1', 'trackers' => array('1')));<br />it gives me this error :<br />ActiveRecord::AssociationTypeMismatch (Tracker(#-612369158) expected, got String(#-607940098)):<br />app/controllers/projects_controller.rb:70:in `new'<br />app/controllers/projects_controller.rb:70:in `add'</p>
<p>Does anybody manage to create issues to a project which has been created by the API ?</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=171462010-06-04T10:13:05ZYohann Monnier
<ul></ul><p>Update you copy of my Repo.</p>
<p>I add all trackers on Project creation by the API.</p>
<p>Tell me if it works</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=171792010-06-07T10:01:45ZGuillaume P.
<ul></ul><p>Thank you Yohann for your modifications.</p>
<p>To resume : <br />- before the modifications : project's creation worked but it wasn't possible to create issues to a project created by the API. Because there were no trackers and no enabled modules associated to the project.<br />- after modifications : all trackers are available for a project which has been created with the API ; the defaults project modules are also available for the project.</p>
<p>I think these modifications are really importants and must be integrated in the future version of Redmine.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=180642010-07-08T15:46:16ZAdam Ferguson
<ul></ul><p>Hi Yohann,</p>
<p>I noticed earlier Javier Hernandez requested the ability to add notes to an issue when it was updated. Your summary of your changes mentioned "Enhanced Issue API" but didn't mention notes specifically. Am I to understand that using the main distribution of Redmine that you cannot add notes to issues via the API? I may just be missing something.</p>
<p>Thanks,<br />Adam</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=195892010-08-21T00:17:55ZKiall Mac Innes
<ul></ul><p>I don't believe this has been mentioned above, but access to a projects files via XML would be great.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=198402010-08-30T08:32:08ZAlumni Freeware
<ul></ul><p>Could the improvements posted in this thread be merged into the main trunk? An extended REST API would be great, as the current one has a lot of limitations.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=229652010-12-03T16:10:13ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>7</i> to <i>Closed</i></li></ul><p>Closing this ticket in favor of specific tickets for each resource that can be accessed via the API.</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=252262011-02-15T22:28:07ZAbdullah Choudhury
<ul></ul><p>Hi There,<br />I am seeing this problem after I had update using the SVN update option. <br />The issues are not returning jounrals! We wrote a small mobile client and they dont show up anymore and we found out the reason is an issue.xml is returning something like this. No jounral object here<br />@<br /><?xml version="1.0" encoding="UTF-8"?><issue><id>151</id><project name="TRF social network" id="14"/><tracker name="Support" id="3"/><status name="New" id="1"/><priority name="High" id="5"/><author name="XLNC redmine" id="1"/><assigned_to name="Mahay Khan" id="13"/><subject>Comparison of buddpress and drupal</subject><description>Please compare the buddpress version( the one that we are developing) and the Drupal version(the one they have)<br />and list the things that we need to do get it finished.<br />Please have this delivered to me no later than tomorrow. At least the home page. It has to be as detailed as possible</p>
<p>thanks,<br />Abdullah</description><start_date>2011-02-09</start_date><due_date>2011-02-10</due_date><done_ratio>0</done_ratio><estimated_hours>4.0</estimated_hours><created_on>2011-02-09T09:12:12-08:00</created_on><updated_on>2011-02-11T11:23:06-08:00</updated_on></issue><br />@</p>
<p>has anyone seen this problem before. is there any remedy?</p> Redmine - Feature #296: REST APIhttps://www.redmine.org/issues/296?journal_id=252322011-02-16T09:22:17ZEtienne Massip
<ul></ul><p>This is a recent change introduced with <a class="changeset" title="Makes some attributes optional in API response to get faster/lightweight responses. These attrib..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4486">r4486</a> : you should now add "include=..." to your query url.</p>
<p>That is : <code>/issues/296.xml?include=journals</code> will output journal entries.</p>