Resolve a repository by its provider URL
Looks up the repositories a provider URL names, scoped to your organization. A .git suffix and trailing slashes are normalized away, so every spelling of the same repository resolves alike and shares a cursor.
An unparseable providerUrl and a genuine empty result both answer PROVIDER_URL_NOT_FOUND, deliberately: a caller must not be able to distinguish a malformed URL from a repository that exists outside their organization. There is no endpoint that enumerates an organization’s repositories, so this is the way to resolve one you can name. If you are heading for a merge queue, GET /v2/merge-queues needs no arguments and returns every queue in your organization already carrying repositoryId, repositoryUrl and targetBranch — one call rather than two.
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 merge-queue permissions it holds; a key with none can read merge queues but change nothing. Those permissions scope merge queue only: every key can use the Flaky Tests and Dynamic CI endpoints, including their writes, whatever permissions it holds.
Query Parameters
Page size, between 1 and 100.
1 <= x <= 10025
Opaque cursor from a previous response's nextCursor. A cursor is bound to the operation and filter it was minted for.
"AQEKZm9vYmFy"
Set true to include total in the response. Costs an extra COUNT query, so it is off by default.
false
The repository's URL on its provider. A .git suffix and trailing slashes are normalized away.
1"https://github.com/acme/widgets"
Response
A page of repositories
100Opaque cursor for the next page, or null on the last page. Pass it back verbatim as cursor; do not construct or inspect one.
"AQEKZm9vYmFy"
True when another page is available.
true
Total rows matching the filter. Present only when the request set includeTotal=true.
1247