Hi ,
I am using
https://mydomain.atlassian.net/rest/api/2/search?jql=project = 'project' AND issuetype = 'story'
query to retrieve data from JIRA.
My node js code :
const requestObj = {
headers: { 'content-type': 'application/json' },
url: "https://mydomain.atlassian.net/rest/api/2/search?jql=project = 'myproject' AND component = 'mycomponeny' and issuetype = 'story'",
auth: { Basic: ('myid@project.com:vtrhtututitittitfterew').toString('base64') },
Accept: 'application/json'
};
I am getting error "auth mechanism is not defined"
I have also tried
auth: { bearer: ('myid@mydomain.atlassian.net:vtrhtututitittitfterew').toString('base64') },
auth: { Basic: ('myid@mydomain.atlassian.net:vtrhtututitittitfterew').toString('base64') },
But I am still getting error "auth mechanism is not defined"
your help is highly appreciated.
Regards,
Abhay
I use C# as opposed to js, but the differences that I notice are :
Hopefully you can get something out of this to help you
Thanks Warren
The format I have used is mentioned in Jira rest api documentation.
I have tried with Authorization and basic and it work properly.
Regards,
Abhay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi can you let me know what was the Authorization header you used . I tried but it's not going through
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So my header looks like
Authorization: Basic encodedDetails
where encodedDetails is the 64 bit encoded combination of the Jira e-mail address and the API key.
If this doesn't help you, you'll need to give more info about what you're trying to do, what you've done and what problem you're facing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.