Ad Widget

Collapse

Get expanded opdata macro from API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • b0tting
    Junior Member
    • Jan 2020
    • 1

    #1

    Get expanded opdata macro from API

    We implemented the new opdata attribute for most of our checks. Most of these are more then just "ITEM.VALUE" macros. We also display our events on an external source, which is initially triggered using the new webhooks. Here opdata gets send out correctly. Now, I want to keep the opdata in this external source updated. Using events per minute to send updates very quickly turns messy in the UI. I have a list of triggerids there so the easiest route would be to query the trigger.get API from our external application every so many minutes.

    However, when doing so, the opdata attribute in the JSON response is returned as a non-expanded macro, ie. 'Uptime: {ITEM.LASTVALUE2}'

    As there are a number of flags for expanding a few very specific attributes ("expandDescription" and "expandExpression") in the trigger API I assume that there is no simple solution in the trigger API. Is there any way to get expanded opdata out of the API?
Working...