REST API authorisation

I want to use Talend Open Studio to GET data from the JIRA REST API. Talend needs HTTP Header information to be filled in, what do i need to fill in that information.

i already tried username and password but that doesn't work.

Talend fields to fill:

Name: 

Value:

http method = GET

6 answers

0 votes

The JIRA REST API will accept and respond to any well formed request.  We don't know what your Talend is doing here, so you'll need to expand on that, and how you're expecting to make it make the right REST calls.

Hi Nic,

Thank you for your response.

I am new in the REST API world and i have no clue of what to do. i have been exploring the internet for answers but i could not find any...

In JIRA i have an username and password, i searched in JIRA with the advanced function for a specific project and now have a link like this https://jira.[companyname].nl/rest/api/latest/search?j=project=circoo so when i put this in the browser a bunch of text (json) is shown. when i try to make the connection in Talend it needs the URL, i paste the one above and then it needs HTTP method and header. method is GET and the header (name,value) i dont know what to fill in there.. do you have any clue?

0 votes

I think you need to look at Talend resources to find out why it's asking for these when you're doing simple postings that don't need the headers.  (They may be useful if you want to retain an authentication, but without knowing what Talend is doing or why, I can't even say that)

Name/value pairs are for query parameters. Do the following:

  1. For URL you should use just "https://jira.[companyname].nl/rest/api/latest/search"
  2. Add a query parameter with name "jql" and value "project=circoo" (without the quotes)
  3. Check the "Use Authentication" checkbox - select Basic HTTP and enter username/password

thanks for your answer, so i changed the link and filled in name: jql and value: project=circoo. so for that part i understand. but where can i find the checkbox for use authentication? and also, where should i fill in the username/password (i think you mean the username/password for my JIRA login right?)

I was looking at this. Post a screenshot of your screen if it's different.

well i am using another component in Talend, i am using: tREST instead of what the screenshot is showing me (tRESTClient).
however i managed to get rid of the error messages by adding the JIRA certificate to my JAVA keystore, now i dont get any errors when connecting but when i try to retrieve the data from the REST API i get 0 results....
so the data i get from the tREST = just the first part of the REST API, when i enter the URL in the browser then i get the full REST API.
see the attachment for more information..

 

Capture.jpg

i get this when i read the data from the tREST directly:

Capture2.PNG

Hello,

It is returning 0 results because you are still not authorised to view data, although the connection is successful. Just add a query parameter with name "Authorization" and value looking like  "Basic ABCxxxxxxx123XX123t1bmFpdGU6XxxsdXMxMVBsdXMx" where the string is base64 encoded string in format username:password

 This is answer to a question of how to add basic authentication to tREST component in Talend:

https://www.talendforge.org/forum/viewtopic.php?id=38724

 

i seem to be getting an SSL certificate error..does anyone know how i can get the certificate in my Java folder.. i have searched for an download of the certificate but i can't find it anywhere.. i think that is the problem, that the certificate is not trusted now..

0 votes

You'll need to import it into your java keystore, I think

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,945 views 19 22
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you