Hi
I get this error when I am trying to create a Jira issue via REST API from salesforce.
This is the sample code:
HttpRequest request = new HttpRequest();
Http http = new Http();
string username = 'xxxxxxx';
string password = 'xxxxxxx';
Blob headerValue = Blob.valueOf(username + ':' + password);
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
request.setEndpoint('https://xxxxxx.atlassian.net/rest/api/3/issue/');
request.setHeader('Authorization', authorizationHeader);
request.setMethod('POST');
request.setHeader('Content-Type', 'application/json');
request.setBody('{"fields":{"summary":"TEST API","project":{"id":"100"},"issuetype":{"id":"1000"}}');
HttpResponse response = http.send(request);
And, the user using for the callout has got full permissions and were able to create jira issues through postman without any errors.
Thanks
HI. Please check there is a field 'summary' on the creation screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.