You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I want to extract reporter name using REST API.
GET http://localhost:8080/rest/api/2/issue/awd-1?fields=reporter
If I used command above I get the following extract:
{ "expand": "renderedFields,names,schema,transitions,operations,editmeta,changelog", "id": "10000", "self": "http://localhost:8080/rest/api/2/issue/10000", "key": "AWD-1", "fields": { "reporter": { "self": "http://localhost:8080/rest/api/2/user?username=username", "name": "username", "emailAddress": "user@domain.com", "avatarUrls": { "16x16": "http://localhost:8080/secure/useravatar?size=small&avatarId=10122", "48x48": "http://localhost:8080/secure/useravatar?avatarId=10122" }, "displayName": "User Name", "active": true } } }
Now I want to get the reporter name from extract above.
You can use below code :
httpClient.get(`rest/api/3/issue/${res.req.query.issueKey}`, function (err, response, body)
{
let get_reporter_data = JSON.parse(body);
let displayName = get_reporter_data.fields.reporter.displayName;
console.log("reporter Name is ",displayName);
});
Hey,
How to get reporter's email address?
I am not getting email address from above API?
Can you please do help me on this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.