Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Issues from frontend with Jira Api rest?

Guilherme Cardoso de Almeida
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 9, 2023

I'm trying to get issues from Project with Jira Rest api, but my front requests returns No data. 

it's like the api can't read my Basic authentication.


EX
 response =  axios.get(

      "https://myCompany.atlassian.net/rest/api/3/issue/search?jql=project = MyProject",

      {
        headers: {
          Authorization:
            "Basic " +
            btoa(
              "email" +
                ":" +
                "myToken"

            ),
        },
      }
    ); 

 Ref article: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-get

1 answer

0 votes
Seifallah Bellassoued
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.
June 9, 2023

Dear @Guilherme Cardoso de Almeida

  1. Can you please provide the http response code?
  2. If it's 200, it means that no issue correspond to your JQL. To check this you can go to Jira > filters > advanced issue search and check your JQL.

Best Regards,

Seif,

Guilherme Cardoso de Almeida
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 12, 2023

Dear @Seifallah Bellassoued  I finally fix my problem, it was just badly formated auth token

Solved: 

let auth_buff = user + ":" + password;
let auth = btoa(auth_buff);

in front, we have a function called btoa() for Base64 tokens. 

Thank you for paying attention to me.




Like Seifallah Bellassoued likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events