cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Signing off a great year with one last question!

henk_stobbe
DynaMight Leader
DynaMight Leader

All,

Thanks for a great "2024 community year", see you in 2025!

And, one more for the road,

 

  From the documentation: 

 An API call can always trigger a workflow independent of the trigger type.

 You can run a workflow triggering it using params and input as data, so would it be nice to add the "event" as a data       option, for testing?

 (or if regular trigger is event => input will be used as event)

 

Best wishes and see you in the new year!

1 REPLY 1

ChristopherHejl
Dynatrace Advisor
Dynatrace Advisor

Hi Henk,

event is actually part of the params. So you can add the event property as part of the params to manually trigger a workflow with your own event payload. The event data in params will be available under the event() expression as usual.
This is actually exactly what happens when you manually run a workflow with an event trigger, and the UI asks you to provide a sample event.
Also, if you check out an execution of an event triggered workflow, you can see the event payload as part of the params. So the payload for the API triggered workflow /workflows/{id}/run would be

{
  "input": {},
  "params": {
    "event": {
      "event.id": "-804131061630612141_1734610595013V2",
      "timestamp": "2024-12-19T12:16:48.191000000Z",
      "display_id": "P-24124496",
      "event.kind": "DAVIS_PROBLEM",
      "event.name": "Network availability monitor global outage",
      ...
    }
  }
}

 

ChristopherHejl_0-1734611827970.png

See you in the new year!

Featured Posts