Zenduty actively maintains a REST API, providing developers the ability to supplement and deploy Zenduty in sync with other tools and services. Building with the Zenduty REST API allows you to create and update incidents, users, teams, services, integrations, schedules, escalations, and automate your workflows using simple scripts.
For a detailed guide, refer to the Zenduty API documentation and reach out to us if you have any queries while building.
Zenduty also supports a Postman Collection to make building with our API easier. Postman’s Collection folders conveniently keep our API requests and elements organized, and are essentially Executable API Descriptions.
To access the Zenduty API via the Postman Collection, follow these steps -
Generating the API Key
- Login to your Zenduty account. Navigate to your account page from the Zenduty dashboard in the top right corner.
Click on the API Keys section, and then click on Create a new API key.
Give a name to your new API key and then click Create.
- Copy the newly generated API key and save it in a secure location(you will not be able to retrieve the same API key again).
Importing the Zenduty API Postman Collection
Clone the zenduty-api-postman repository from GitHub.
Open your Postman app and navigate to the Collections section.
Navigate to the cloned project in your local machine. Import the Zenduty API.postman_collection.json file.
Adding the API Key to access the Zenduty API
Click on the Zenduty API collection in your Postman app.
Navigate to the Authorization tab. In the Value section, replace (Your API key here) with the API Key copied from Zenduty. The Value section should look like Token xxxxxxxxxxx.
Click on Save.
We can now use the Zenduty API calls to harness the information we want to build upon.
Let’s try and get the list of all users on-call right now under a particular team.
Expand the Teams folder in the Zenduty API collection and select the List Teams request.
Everything is pre-filled, all you need to do is click on the Send button.
In the response, we get a list of all teams inside the account. Copy the
"team"UUID for a team you’d like to check the on-call users for.
Now, expand the On Call folder and select the List Details of On-call request.
team_idplaceholder in the URL with your chosen team’s UUID and click on Send.
In the responses, we get a list of all the users on-call under different escalation policies in the chosen team.
We can build upon this as we require, like for essence, building an email script that fetches this list of people on-call and sends it to the team managers periodically.