Webhooks payload's IDs

Hi everyone!

I’m using Webhooks API to detect new changes in pull requests. But Webhooks response-payload contains only ‘databaseId’ values in ‘id’ fields. I. e. integer numbers instead of Global Relay IDs (hash-numbers).

It is possible to get Global Relay ID of the object via Webhooks API because I use GraphQL API after that and it requires Global Relay ID instead of ‘databaseId’? Or what I need to do with my problem? Maybe use REST (v3 API) instead of GraphQL(v4 API)? But GraphQL more convenient solution how I believe.

Hi @normandez,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now in the board. No action is needed on your part; you can continue the conversation as normal here.

If you don’t get the information you’re looking for here, you might also try the GitHub Platform forum since you’re working with both the GitHub v3 API and the v4 API.

Let me know if you have any other questions or if I can help with anything else.


The GraphQL documentation gives an example mutation that includes finding an issue’s GraphQL ID by its number that can easily be translated to doing the same for a pull request:

query {
  repository(owner:"octocat", name:"Hello-World") {
    pullRequest(number:349) {

You’re looking for the node_id field, not the id field (if your error was of the same type as mine: “int64 isn’t a defined input type (on $pullRequestID)”)

See messaage on https://developer.github.com/v4/guides/using-global-node-ids/ :

" Note: In REST, the global node ID field is named node_id. In GraphQL, it’s an id field on the node interface."

In case that won’t work, see other answer about using what information you do have (PR number, repo name) to create a query to get the node ID.