Export list of Agent Emails via API | Community
Skip to main content

Export list of Agent Emails via API

  • May 9, 2018
  • 1 reply
  • 0 views

Hi there,

I am trying to export a list of all users who are agents, but I don't need all the information that the command generates - I only need to the name and email address of the agent.

Reason being is that I'm going to need to load this data into a powershell script to create diffs for people who are no longer within our organization. 

What would the syntax be for that?
The below works and generates a list of our agents but it has too much info in there, I just need their name and email.

curl -o export.html -u emailaddress/token:blahblahblahhttps://ourinstance.zendesk.com/api/v2/users.json?role[]=agent

any advice would be much appreciated.

Thanks

Steve

This topic has been closed for replies.

1 reply

  • May 11, 2018

Hi Steve-

The most effective API endpoint I can recommend for this would be our Incremental User Export API, with a sideload of Roles. This data will return a paginated list of 1000 records per-page, with a limit of 10 calls to the endpoint per minute. There is no endpoint that will return just these values (name & email) and results will have to be parsed accordingly.

For any future questions regarding our APIs, please visit our new forum(s) at https://develop.zendesk.com/hc/en-us/community/topics/360000019807-REST-APIs. Certainly interested in your powershell script, and if you would care to share some basics when you are done, it may very well help someone else in the future.

Please let me know if there is anything I missed here or requires further explanation. Otherwise, please do enjoy the balance of the week!