List a team's repositories
The repositories a team has a role on: each one's repo (workspace/name), the team's role there (read, triage, write, maintain or admin), and inherited_from, the parent team it comes from when the team inherits it, or null for its own.
GET
/workspaces/{workspace}/teams/{team}/reposEveryone in the team gets the role; where someone has a higher one otherwise, the higher one counts. Anyone who can see the team.
A role inherited from a parent team names it in inherited_from. Where the team has a role of its own on the same repository, the higher one is listed. Only repositories you can see are listed.
- Authentication: Required. Send an access token as
Authorization: Bearer. - MCP tool:
teamwithactionlist_repos, and the same inputs - Scope: An access token needs
workspace:read.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
workspace |
string | Yes | The workspace’s slug, e.g. “flagon-io”. |
team |
string | Yes | The team’s slug, as in its mention @workspace/slug, e.g. “backend”. |
Example request
Section titled “Example request”curl https://api.g1t.sh/workspaces/flagon-io/teams/backend/repos \ -H "Authorization: Bearer $G1T_TOKEN"Example response
Section titled “Example response”A successful request answers 200 with:
[ { "repo": "flagon-io/hello", "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr", "role": "write", "inherited_from": null }, { "repo": "flagon-io/docs", "repo_id": "rep_01m3m5r2a8c4e6g8j0m2p4r6t8", "role": "read", "inherited_from": "engineering" }]Errors
Section titled “Errors”A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.
| Status | Code | When |
|---|---|---|
| 401 | unauthenticated |
A token is required, or the one sent is not valid. |
| 403 | forbidden |
The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository. |
| 404 | not_found |
It does not exist, or you cannot see it. |
| 422 | invalid |
The input is not valid. message says which field and why. |