Call JIRA REST Webservices and using their JSON output

Posted by asthomas on 01-Dec-2012 14:09

Hopefully something simple for the JSON expers out there.

Has anyone had any luck in calling JIRA REST Webservices from the ABL an dusing the JSON that comes back from them?

I want to be able to create dynamic ProDatasets with the data that I get back from JIRA.

I have managed to get the calls to the webservices working, including adding an authorization header to the .Net http web request to corectly log in. But I am stumbling on the the complex JSON replies that comes back and how to best handle this in the ABL.

Here an (truncated) example from a simple call to get details on an issue back:

{"expand":"renderedFields,names,schema,transitions,operations,editmeta,changelog","id":"10103","self":"https://appsolutions.atlassian.net/rest/api/2/issue/10103","key":"PP-15","fields":{"summary":"Telefondubletter","progress":{"progress":28800,"total":28800,"percent":100},"timetracking":...}

The "expand" section contains a list of fields that can be expanded on a new request.

id is the interal ID of the issue

self is the URL for the issue.

key - is the issue number

and "fields" contains the basic data for the issue.

What's the best aprocah to use data like this in the ABL?

TIA

Thomas

All Replies

Posted by jmls on 01-Dec-2012 14:22

We've had some success with the .net client

https://bitbucket.org/farmas/atlassian.net-sdk/wiki/Home

On 1 December 2012 20:09, Thomas Hansen

Posted by asthomas on 01-Dec-2012 15:40

Thanks Julian,

Although I had searched for something like this, I missed this one for some reason....

Have you come across this message when retrieving isseu data ?

---------------------------

Error (Press HELP to view stack trace)

---------------------------

System.ServiceModel.ProtocolException: The content type text/html;charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 139 bytes of the response were: '

jirasoapservice-v2

---------------------------

OK   Help  

---------------------------

How to I get around this?

Posted by asthomas on 01-Dec-2012 15:45

Turns out I was getting an error message from the webservice, which comes back as HTML code.

ONce I set the correct URL to sconnect to - I am not getting this error...

Posted by Admin on 01-Dec-2012 15:47

Have you enables the REST services on your JIRA Instance?

Sounds like you are getting an HTML error message

Posted by jmls on 01-Dec-2012 15:52

always helps when you set the right url

On 1 December 2012 21:45, Thomas Hansen

Posted by jmls on 01-Dec-2012 15:52

bingo Mike

Posted by asthomas on 01-Dec-2012 16:04

I was getting an HTML error - but I am pretty sure I have REST enabled, as I have been getting JSON messages back from my ABL testing.

And using the correct URL works now

Posted by asthomas on 06-Dec-2012 02:22

Looks like this would work - if it worked

Did you actually get this to work with the latest build?

The documentation is very lacking - and it looks like the latest build requires parameters for createIssue that are not at all documented.

Regards / Med Venlig Hilsen 

Thomas Hansen

Director

Posted by SJProgress on 06-Dec-2012 02:27

Vielen Dank für Ihre Nachricht!

Ich werde ab Fr. 07.12.2012 wieder im Büro sein und Ihre Email-Nachricht bearbeiten.

Mit freundlichen Grüssen

Josef Siegetsleitner, Easyrent Software Entwicklung

Thank you for your message!

I will return to my office on Friday December, 7th and will answer your email then.

Best regards

Josef Siegetsleitner - Easyrent Software Development

Posted by asthomas on 06-Dec-2012 02:32

I am not in the office. I will not be checking my mail and phone on a regular basis, but will reply to your mail as soon as I can.

If you need support from appSolutions, please send your mails to support@app-solutions.com.

If you need Roundtable support, please send mails to :

support-europe@roundtable-tsms.com.

Jeg er væk fra kontoret, og checker ikke mail og telefon regelmæssigt. Jeg vil dog svare på din mail så snart som muligt.

Hvis du har behov for support, kontakt venligst support@app-solutions.com, så vender vi tilbage så snart det er muligt.

Administrative henvendelser kan ske til : admin@app-solutions.com.

Med venlig hilsen / Regards

Thomas Hansen

appSolutions a/s

This thread is closed