Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 2

What is the significance of the 'events' API "id" and "push_id" values ?

When using the API endpoint, "/repos/:owner/:repo/events", do the 'id' and 'push_id' values map back to anything contained in a webhook payload, such as the "GitHub-Delivery ID"?

I am trying to come up with a way of comparing payloads received by webhooks against payloads github 'thinks' it delivered to those webhooks, to ensure none were 'lost' due to 413/503 type errors.  For example, if I have multiple webhooks that fire on a push event, I want to scan all those payloads (via the API) and do a "1-to-1" comparison against payloads received by webhook scripts. If 50 payloads were sent, but only 48 received, I want to know exactly what 2 payloads (and from what hook(s)) were 'lost' (without having to go into the gui and manually trudge through every payload from every webhook )

 

Do the 'id' and 'push_id' values (as retrieved by the events API) point back to the webhook or payload somehow? I know there isn't an API to list all webhook deliveries, but there has to be a way to compare "what was sent" against "what was received", I would hope anyhow.

 

Thanks in advance!

 

1 Reply
Community Manager
Message 2 of 2

Re: What is the significance of the 'events' API "id" and "push_id" values ?

Hi @mgoddard27,

 

Thank you for being here and apologies for the delay in reponse. The various payloads are documented at Event Types & Payloads. In addition, the X-GitHub-Event header will contain the name of the event that triggered the delivery.

 

The payload in the Example delivery screenshot shows how to put it all together. In that example, by inspecting the header and payload you can see that it was spawned by opening issue 1347 on the octocat/Hello-World repository, and it was opened by octocat.

 

I hope this helps!


Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!