Hey folks!
We've been asked why the data/Alarms and data/Events API resources return deviceName in unexpected format.
Instead of device name the value may contain name of the device, IP address, and MAC address.
The problem is that the attribute has inaccurate description; instead of device name the returned value contains the failure source. When an alarm or event is generated, it includes information about the source of the failure. Information is presented using a specific format. For example, performance failures use the format MACAddress:SlotID. Failure sources for other alarms may include the host name, IP address, or other properties.
Failure source format is configurable and may differ for each event category. You can adjust the properties and separators (a colon, dash, or number sign) that are displayed in the alarm's failure source using the following procedure:
- Choose Administration > Settings > System Settings, then choose Alarms and Events > Alarms and Events.
- In the Failure Source Pattern area, select the alarm category you want to customize.
- Adjust the failure source format
- To apply your changes, click Save at the bottom of the Alarms and Events settings window.

This is also documented in the Cisco Prime Infrastructure Administrator Guide.
We will keep this behavior as it is working in this way since 3.0 and update the documentation in 3.6 to reflect this.