Go to All Forums

Ability to pull Names instead of only IDs from API

When using the API, the only options to get some information out is by using IDs which is not user-friendly. When exporting data from the GUI the information is populated with the actual names for things and it would be awesome to be able to get those via the API.

Some examples are:

VIA EXPORT VIA API
notification_profile_name notification_profile_id
location_profile_name location_profile_id
monitor_groups monitor_groups
user_group_names user_group_ids

We are always running custom reports for our business personnel and it's not always feasible or easy to do it from the GUI.

Like (1) Reply
Replies (1)

Re: Ability to pull Names instead of only IDs from API

If you need to get monitor configuration details with names as in Export Monitors option in GUI, as a workaround, you can call the following API and get it. The response will not be in standard format, as it was actually constructed for generating CSV output.

/api/monitors/export?JSONString=%7B%22selection_type%22:0%7D

Configuration APIs such as /monitors, /threshold_profiles will return IDs whereas reporting APIs such as /reports/summary/ will return names.

Generally, the expectation is configuration APIs will mostly be used in automation scripting, where IDs will be more useful and enough. 

Reporting API calls would be made to generate a report in the user desired custom format, where they will expect only names. So those APIs will return names. 

In your case, you want to generate a custom report for the configuration details. We will think about the use case and provide documented support for such an API in future.

Like (0) Reply

Was this post helpful?