Get a pull request's impacted targets
Returns the impacted targets most recently uploaded for this pull request’s head commit, with PUT /impacted-targets. The head commit is the one Trunk has indexed for the pull request; a squash merge does not move it, so this answers for a merged pull request too. Uploads are stored per commit, so a push after the upload makes this a 404 IMPACTED_TARGETS_NOT_FOUND until CI uploads for the new commit. For a stacked pull request this is its own commit’s upload alone, not the stack’s. This reflects uploads only: a queue that treats an older pull request as impacting everything through its backfill cutoff has no upload for it, and this read answers 404.
A GitHub Actions login can call this for a pull request in its own repository. It cannot look a pull request up by number, so it needs the pull request’s id from another source. A fork pull request’s login can read only its own pull request, and only if the repository has a merge queue whose GitHub settings allow impacted targets from fork pull requests. If one of these two conditions is false, Trunk refuses the read with 403 INSUFFICIENT_PERMISSIONS.
Authorizations
An API key, sent as Authorization: Bearer <key>. An organization admin creates one in the Trunk app under Settings → Developer → API Keys and chooses the permissions it holds. A new key starts with no permissions: it can read merge queues but change nothing in them, and it cannot get a Dynamic CI plan. Each endpoint that needs a permission names it in its description; the Dynamic CI plan endpoints need Generate Dynamic CI plans.
Path Parameters
Response
The pull request's impacted targets
The impacted targets most recently uploaded for a pull request's head commit (PUT /impacted-targets): a set of one commit.
The union of the commits' uploaded targets, sorted and deduplicated. Empty when impactsAllTargets is true, and also when every upload was an explicit empty list — the commits impact nothing. Truncated to the first 100,000 targets; totalImpactedTargets says whether it was.
100000