REST API authorisation

Samir September 23, 2016

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
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2016

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

0 votes
Samir September 25, 2016

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
Petar Petrov (Appfire)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2016

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
Samir September 25, 2016

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?)

Petar Petrov (Appfire)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2016

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

Samir September 27, 2016

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

gabiux February 14, 2017

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

 

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2016

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)

0 votes
Samir September 23, 2016

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
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 23, 2016

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.

Suggest an answer

Log in or Sign up to answer