Is there any REST API java client

Hi, is there any implementation of YouTrack REST API client in java?
0
9 comments
Hello!

We do not deliver java lib for our REST API yet, but you can create it using application.wadl (http://youtrack.jetbrains.com/rest/application.wadl) and some tool like wadl2java (http://wadl.java.net/wadl2java.html)
0
Hi,

Ive generated the wadl2java. But im a bit in the dark on how to use the service. Is it possible to produce a few examples on how to access the server using the wadl. Guess get projects, issues and basic authentication should be great to start using it.

Thanks in advance
Jorge Costa
0
Did you get any further help?  I'm looking for a java lib...
0
No, and since then I had this on the side. But I guess I will likely create
something simple only to cover my use case when having a bit of time, at
least if there is nothing available at that point
On Mar 13, 2013 2:25 AM, "jerry hoffmeister - YouTrack" <
jetforum@jetbrains.com> wrote:

* YouTrack <http://forum.jetbrains.com/forum/YouTrack> * > * Is there any
REST API java client <http://forum.jetbrains.com/thread/YouTrack-686> * [
* rest api <http://forum.jetbrains.com/tag/YouTrack-rest%20api%20> * ] 8:25
pm <http://forum.jetbrains.com/thread/YouTrack-686?message=YouTrack-686-3>  jerry
hoffmeister <http://forum.jetbrains.com/user/jhoff>

Did you get any further help? I'm looking for a java lib...

  Jorge Costa <http://forum.jetbrains.com/user/jmecosta> @ Dec 31<http://forum.jetbrains.com/thread/YouTrack-686?message=YouTrack-686-2>

Hi,

Ive generated the wadl2java. But im a bit in the dark on how to use the
service. Is it possible to produce a few examples on how to access the
server using the wadl. Guess get projects, issues and basic authentication
should be great to start using it.

Thanks in advance
Jorge Costa

  JetBrains Forum | Build #143 (Nov/16/2012 5:22PM) | Feedback<http://confluence.jetbrains.net/display/JETF/Feedback>
0
I haven't been able to get wadl2java to work - I get this error and haven't yet found a solution:


Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl
0
Check this thread

http://forum.jetbrains.com/thread/YouTrack-766

let me know if you see same behaviour has me

On Thu, Mar 14, 2013 at 1:47 AM, jerry hoffmeister - YouTrack <
jetforum@jetbrains.com> wrote:

* YouTrack <http://forum.jetbrains.com/forum/YouTrack> * > * Is there any
REST API java client <http://forum.jetbrains.com/thread/YouTrack-686> * [
* rest api <http://forum.jetbrains.com/tag/YouTrack-rest%20api%20> * ] 7:47
pm <http://forum.jetbrains.com/thread/YouTrack-686?message=YouTrack-686-5>  jerry
hoffmeister <http://forum.jetbrains.com/user/jhoff>

I haven't been able to get wadl2java to work - I get this error and
haven't yet found a solution:


Exception in thread "main" java.lang.RuntimeException:
java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl

   blabno <http://forum.jetbrains.com/user/blabno> @ Nov 08<http://forum.jetbrains.com/thread/YouTrack-686>

Hi, is there any implementation of YouTrack REST API client in java?

  JetBrains Forum | Build #143 (Nov/16/2012 5:22PM) | Feedback<http://confluence.jetbrains.net/display/JETF/Feedback>
0
I will try it later today - I see you're using wadl2java v1.1.4 - when I downloaded the distribution, I got 1.1.3 so that's likely my problem.  So to be clear, the issue you see is 5 tickets get created?  I've used the REST interface from a python script to create issues and it worked fine for me.  Anyway, will try later this afternoon and let you know.

Also, I'd been working on my own code to login and create issues - haven't gotten to the create issues part yet - I'd gotten login and getting the contents of a bundle working so far.
0
The python client works fine for me also. Only problem I saw was indeed the
5 tickets created. Log in, add comments and pretty much everything was
working properly. It might be a simple thing to solve so good luck
On Mar 14, 2013 5:45 PM, "jerry hoffmeister - YouTrack" <
jetforum@jetbrains.com> wrote:

* YouTrack <http://forum.jetbrains.com/forum/YouTrack> * > * Is there any
REST API java client <http://forum.jetbrains.com/thread/YouTrack-686> * [
* rest api <http://forum.jetbrains.com/tag/YouTrack-rest%20api%20> * ] 11:43
am <http://forum.jetbrains.com/thread/YouTrack-686?message=YouTrack-686-7>
* updated 11:45 am * jerry hoffmeister<http://forum.jetbrains.com/user/jhoff>

I will try it later today - I see you're using wadl2java v1.1.4 - when I
downloaded the distribution, I got 1.1.3 so that's likely my problem. So to
be clear, the issue you see is 5 tickets get created? I've used the REST
interface from a python script to create issues and it worked fine for me.
Anyway, will try later this afternoon and let you know.+

Also, I'd been working on my own code to login and create issues - haven't
gotten to the create issues part yet - I'd gotten login and getting the
contents of a bundle working so far.+

  blabno <http://forum.jetbrains.com/user/blabno> @ Nov 08<http://forum.jetbrains.com/thread/YouTrack-686>

Hi, is there any implementation of YouTrack REST API client in java?

  JetBrains Forum | Build #143 (Nov/16/2012 5:22PM) | Feedback<http://confluence.jetbrains.net/display/JETF/Feedback>
0

This is high on Google search results so here's an update from the future:

The API linked above is deprecated. You can generate code from the new API like this:

docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
   -i https://YOURSERVER.youtrack.cloud/api/openapi.json \
   -g java \
   -o /local

However… the code is not even close to working. As far as I can tell the openapi-generator (and the similar swagger-codegen) project is broken on complex projects (particularly around subclasses).

I did get working code using the closed-source tool liblab. They offer 5 API generations per month, one of which is Java (in beta). Have yet to put it through its paces but at least the code compiles.

0

Please sign in to leave a comment.