Retrieve dispatch event payload through API

Hi,

I’m triggering workflow runs using repository dispatches. My workflow runs are parameterized by the dispatch payload. I’d like to be able to match up the parameters I sent (“test against version X”) with the outcome (“it failed!”).

Ideally I would be able to do one of the following things:

  • I send my dispatch; the response includes the trigger workflow run ID(s). I’ll poll the runs API and match the outcome up with what I sent.
  • I send my dispatch and poll the runs API. Each run would include the dispatch event payload that triggered it so that I can match up the parameter with the run outcome.

It doesn’t look like either of these things are possible… is there another way to accomplish what I’m trying to do?

@danielpeach,

When you use the API to create dispatch events, the API will not return anything but only a status code in the Response. So, you can get nothing about the triggered workflow runs from the Response of the API.

However, as we have known, you can use the API to pass some parameters into the triggered workflow runs.

In the workflow runs, you can use the passed data to compare with any other data generated in the workflow runs.