Skip to content
Connect an agent

Organisations

A repository's workflow files and deployment environments

Reads the default branch's tree, paths only, and answers the workflow files under .github/workflows and the deployment environments by name.

GET/orgs/{org}/github/repositories/{id}/workflows

TL;DR

QuestionAnswer
What does it do?A repository's workflow files and deployment environments.
What does it take?org, id in the path.
What does it return?Status 200 with a body of type GithubWorkflows.
What can go wrong?401 not signed in; 403 a member may not (orgs.forbidden), or the plan has no GitHub App (plan.github_app_not_included); 404 no such organisation or repository (github.repository_not_found); 409 the installation is suspended on GitHub (github.suspended); 429 too many requests, or GitHub asked to wait (github.rate_limited); 502 GitHub could not be reached (github.unavailable); 503 the GitHub App is not set up on this server (github.not_configured), or organisations are not. Every failure uses the one error envelope.

What it does

Reads the default branch's tree, paths only, and answers the workflow files under .github/workflows and the deployment environments by name. Nothing is stored. The owner and an admin, on Pro and Enterprise.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.
idstringyesGitHub's id.

Responses

StatusMeaningBody
200The workflow files and environments.GithubWorkflows
401Not signed in.ErrorResponse
403A member may not (orgs.forbidden), or the plan has no GitHub App (plan.github_app_not_included).ErrorResponse
404No such organisation or repository (github.repository_not_found).ErrorResponse
409The installation is suspended on GitHub (github.suspended).ErrorResponse
429Too many requests, or GitHub asked to wait (github.rate_limited).ErrorResponse
502GitHub could not be reached (github.unavailable).ErrorResponse
503The GitHub App is not set up on this server (github.not_configured), or organisations are not.ErrorResponse

Response body

A 200 answer has the type GithubWorkflows.

FieldTypeRequiredDescription
repositoryGithubPickerRepositoryyes
repository.idstringyesGitHub's repository id.
repository.fullNamestringyes
repository.defaultBranchstringyes
workflowsobject[]yesThe workflow files on the default branch, by file name, at most 200. Empty for an empty repository.
workflows[].pathstringyes
workflows[].filestringyes
truncatedbooleanyesTrue when the tree was too large to read whole, so only the top level was read and the list may miss files.
environmentsstring[]yesThe deployment environments by name, at most 100. Empty when there are none or GitHub does not let the App read them.

See also

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