from Products.Zuul import getFacade class ResolveSysRouter(DirectRouter): """ JSON API router. This router is accessed via POST to a URL such as the following. https://zenoss5.example.com/zport/dmd/resolvesys_router With an application/json data such as the following. { "action": "ResolveSysRouter", "method": "updateEventDetails", "data": [ { "evid": "c0136587-0ce2-417f-94ce-2c13ab4c228a", "details": { "Zenoss.Resolve.Worksheet": "exhibit-a", "WhatIsThatServiceNowFieldCalled": "INC12345" } } ] } Note that the "resolvesys_router" portion of the URL comes from the name we give our "directRouter" in configure.zcml when we register it. """ def updateEventDetails(self, evid, **details): """Update event details of event identified by evid.""" # zep is the "Zenoss Event Processor" API. zep = getFacade("zep") # This is easy because we already have a method for it. zep.updateDetails(evid, **details)