Identify relationship between issues and pull requests (v3 API)

Via the GH UI, I have linked a pull request P and an issue I. I would like to be able to identify such linkages via the v3 API. However, when I go to repo/pull/P, repo/issues/I, and repo/issues/P, I don’t see any information in the returned data that would indicate I’ve linked P and I via the GH UI. Is there any way to find this information via the v3 API?

I believe my issue is similar to the issue in and but I am looking for a v3 based solution as opposed to v4.

Thank you.

In case anyone has a similar issue in the future, my workaround was as follows.

First I grabbed the “html_url” for the issue, retrieved the contents of the URL and used an HTML parser to grab the div with class “css-truncate my-1” and then the href of the anchor within that. The href is a relative URL to the linked pull request. With that, I could break up the path and get the pull number, and use that number to retrieve the pull request information via the REST API.

It’s brittle, but it’s working…