You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
When ever trying to hit the Jira Api's
Getting below response:
JSON Response: {"errorMessages":["Issue does not exist or you do not have permission to see it."],"errors":{}}
Moreover When i directly try to hit the endpoint URL , It works for me.
I have admin access for my user and still getting this error.
Below is the code snippet
public string username ='XXXXXX';
public string password ='XXXXXXXXX';
HTTP h = new HTTP();
HTTPRequest r = new HTTPRequest();
r.setEndpoint('https://wuservicecloud.atlassian.net/rest/api/latest/issue/38281');
System.debug('User name'+username );
System.debug('Password'+password);
Blob headerValue = Blob.valueOf(username+':'+password);
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
r.setHeader('Authorization', authorizationHeader);
r.setHeader('Content-Type','application/json');
r.setMethod('GET');
System.debug('authorizationHeader ---->'+authorizationHeader );
HTTPResponse res = h.send(r);
System.debug('JSON Response: ' + res.getBody());
Kindly assist