No, i need to get the most recent comments of the ticket....do you have a API to get recent comments. if there...what are the scopes required to read the comments of the ticket. Kuba respond
Yes, you can obtain the name of the agent who acted on a ticket using the Zendesk API, but it requires an additional step after retrieving the comments.
The GET /api/v2/tickets/{ticket_id}/comments endpoint provides you with an author_id, which corresponds to the user who made the comment.
To get the name of the author from the author_id, you need to make a separate API call to the GET /api/v2/users/{user_id} endpoint.
Unfortunately, there is no API that would get assignee name within ticket object, this would require to make two calls, one to Ticket API to get the assingee_id and then use it to call User API and get their name
is there an API that allows you to retrieve the assignee name by providing the assignee ID in the request body call.well, i need the assignee name to be displayed with the ticket so...do we have an API Kuba
If I understand correctly your request, you would like to get the name of assignee based on their id.
You can call the User API to get this information following this documentation:
GET: /api/v2/users/{user_id} and use the assignee id to get your user data. This call should return a JSON object with the user's details, including their name.
The Zendesk API does not provide a direct way to fetch only a specific field, such as the name, from the user object in the response.
You will receive the full user object, and you will need to parse the JSON response to extract the name field. This is typically done in the code of the application that is making the API call.
For example, if you are using JavaScript, you would do something like this:
fetch('https://subdomain.zendesk.com/api/v2/users/assignee_id.json') .then(response => response.json()) .then(data => { const assigneeName = data.user.name; console.log(assigneeName); // This will log the name of the assignee to the console }) .catch(error => console.error('Error:', error));
6 comments
Permanently deleted user
No, i need to get the most recent comments of the ticket....do you have a API to get recent comments.
if there...what are the scopes required to read the comments of the ticket.
Kuba respond
0
Jakub
Yes, you can obtain the name of the agent who acted on a ticket using the Zendesk API, but it requires an additional step after retrieving the comments.
The
GET /api/v2/tickets/{ticket_id}/comments
endpoint provides you with anauthor_id
, which corresponds to the user who made the comment.To get the name of the author from the
author_id
, you need to make a separate API call to theGET /api/v2/users/{user_id}
endpoint.0
Permanently deleted user
similarly are there any API's to get the recent comments on a ticket..with the name of person who commented or assisted that respective ticket
Kuba
0
Jakub
Unfortunately, there is no API that would get assignee name within ticket object, this would require to make two calls, one to Ticket API to get the assingee_id and then use it to call User API and get their name
0
Permanently deleted user
is there an API that allows you to retrieve the assignee name by providing the assignee ID in the request body call.well, i need the assignee name to be displayed with the ticket so...do we have an API
Kuba
0
Jakub
Hey shiva pulicharla
If I understand correctly your request, you would like to get the name of assignee based on their id.
You can call the User API to get this information following this documentation:
GET: /api/v2/users/{user_id} and use the assignee id to get your user data. This call should return a JSON object with the user's details, including their name.
The Zendesk API does not provide a direct way to fetch only a specific field, such as the name, from the user object in the response.
You will receive the full user object, and you will need to parse the JSON response to extract the
name
field. This is typically done in the code of the application that is making the API call.For example, if you are using JavaScript, you would do something like this:
Here is a test I ran with this method:

0
Sign in to leave a comment.