Skip to content
Connect an agent

Organisations

List the groups of an organisation's trusted publishers

A page of the owners the trusted publishers are grouped under (a GitHub owner, an Azure DevOps organisation and project, a GitLab group), each with its id, how many of its entries match q, provider and status, and how many of them were never used or refused last.

GET/orgs/{org}/trusted-publishers/groups

TL;DR

QuestionAnswer
What does it do?List the groups of an organisation's trusted publishers.
What does it take?org in the path, and q, provider, status, cursor, limit in the query string.
What does it return?Status 200 with a body of type TrustedPublisherGroups.
What can go wrong?400 a query value is not valid, or the cursor is not one this API wrote; 401 not signed in; 403 a member may not see them (orgs.forbidden); 404 no such organisation, or the caller is not a member of it; 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope.

What it does

A page of the owners the trusted publishers are grouped under (a GitHub owner, an Azure DevOps organisation and project, a GitLab group), each with its id, how many of its entries match q, provider and status, and how many of them were never used or refused last. The first page also has held and totals. The owner and an admin may look.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Query parameters

FieldTypeRequiredDescription
qstringnoWords to look for, without regard to case, in the name, the owner, the repository or project, the workflow file, the pipeline id and the environment.
provider"github" | "azure-devops" | "gitlab"noOnly this CI provider.
status"valid" | "invalid" | "never"noinvalid: its last exchange was refused. never: no run signed in with it yet. valid: not refused since it was last used.
cursorstringnoThe page's nextCursor from the page before, for the next page.
limitintegernoGroups in the page, 1 to 200. Default 100.

Responses

StatusMeaningBody
200A page of groups.TrustedPublisherGroups
400A query value is not valid, or the cursor is not one this API wrote.ErrorResponse
401Not signed in.ErrorResponse
403A member may not see them (orgs.forbidden).ErrorResponse
404No such organisation, or the caller is not a member of it.ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 200 answer has the type TrustedPublisherGroups.

FieldTypeRequiredDescription
activebooleanyesWhether the owner's plan includes trusted publishers. Entries saved before stay, and sign nothing in, while it does not.
plan"free" | "pro" | "enterprise"yes
audiencestring | nullyesThe audience a GitHub workflow asks GitHub for: this API's origin. Null on a server that cannot exchange GitHub's tokens.
issuerstringyesThe issuer of GitHub's tokens.
azureDevopsobjectyesWhat an Azure Pipelines token is: its issuer, which ends in the Azure DevOps organisation's id, and the audience Azure DevOps always names.
azureDevops.issuerPrefixstringyes
azureDevops.audiencestringyes
gitlabobjectyesWhat a GitLab job's token is: GitLab.com's issuer, the instance an entry names when no host is typed. A GitLab job asks for audience in its id_tokens.
gitlab.defaultIssuerstringyes
limitintegeryesThe most trusted publishers an organisation may have.
heldinteger | nullyesHow many trusted publishers the organisation has, whatever the filters. On the first page only, null after it.
totalsobject | nullyesThe entries that match the filters, in all and by CI provider. On the first page only, null after it.
totals.allintegeryes
totals.githubintegeryes
totals.azure-devopsintegeryes
totals.gitlabintegeryes
groupsTrustedPublisherGroup[]yesBy provider, then owner in lower case.
groups[].idstringyesThe provider and the owner in lower case, to send as group.
groups[].provider"github" | "azure-devops" | "gitlab"yes
groups[].ownerstringyesA GitHub repository's owner, an Azure DevOps organisation and project, or a GitLab project's group path (after its host when it is not GitLab.com), as typed.
groups[].countintegeryesIts entries that match the filters.
groups[].neverintegeryesOf them, the ones no run signed in with yet.
groups[].invalidintegeryesOf them, the ones whose last exchange was refused.
nextCursorstring | nullyesSend as cursor for the next page of groups; null on the last.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools