List a workspace's projects
A workspace's projects that you can see, by name.
/workspaces/{workspace}/projectsA project is what a workspace builds and runs, from a repository or a root directory in one; every repository has a project of its own name. Each has what it is (kind: app, library, tool, docs or other) and why (kind_reason), where it runs (runs: g1t when g1t deploys it, elsewhere when it is deployed by other means, at production_url), and its links.
By name. Projects whose repository you cannot see are left out; without a token you see public ones only. kind is what the project is, from setting where a person set it and from detection otherwise (detected, shown beside it); kind_reason says why. runs is null for what is not deployed. homepage_inherited is true while the homepage is its repository’s website. pushed_at is null until its repository is pushed to. See Projects.
- Authentication: Optional. Public data can be read without a token; send one to see what is private.
- MCP tool:
workspacewithactionlist_projects, and the same inputs - Scope: An access token needs
repo:read.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
workspace |
string | Yes | The workspace’s slug, e.g. “flagon-io”. |
Example request
Section titled “Example request”curl https://api.g1t.sh/workspaces/flagon-io/projects \ -H "Authorization: Bearer $G1T_TOKEN"Example response
Section titled “Example response”A successful request answers 200 with:
[ { "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x", "workspace": "flagon-io", "slug": "g1t", "name": "g1t", "description": "Git hosting where people and agents work together.", "description_inherited": true, "url": "https://g1t.sh/flagon-io/g1t", "repository": "flagon-io/g1t", "root_dir": "", "default_branch": "main", "private": false, "archived": false, "primary": true, "kind": "app", "kind_reason": { "by": "set", "detail": "Set to an app that runs elsewhere." }, "runs": "elsewhere", "production_url": "https://g1t.sh", "setting": { "kind": "app", "runs": "elsewhere" }, "detected": { "kind": "app", "reason": { "by": "files", "detail": "wrangler.jsonc at its root makes it an app." } }, "ecosystem": null, "links": { "homepage": "https://g1t.sh", "homepage_inherited": true, "docs": "https://docs.g1t.sh", "custom": [ { "label": "Status", "url": "https://status.g1t.sh" } ] }, "created_at": "2026-09-01T10:00:00.000Z", "updated_at": "2026-10-07T11:20:00.000Z", "pushed_at": "2026-10-07T10:00:00.000Z" }, { "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y", "workspace": "flagon-io", "slug": "hello", "name": "hello", "description": "Greets people from the command line.", "description_inherited": false, "url": "https://g1t.sh/flagon-io/hello", "repository": "flagon-io/hello", "root_dir": "", "default_branch": "main", "private": false, "archived": false, "primary": true, "kind": "library", "kind_reason": { "by": "files", "detail": "composer.json says it is a library." }, "runs": null, "production_url": null, "setting": { "kind": null, "runs": null }, "detected": { "kind": "library", "reason": { "by": "files", "detail": "composer.json says it is a library." } }, "ecosystem": "composer", "links": { "homepage": null, "homepage_inherited": false, "docs": null, "custom": [] }, "created_at": "2026-09-12T14:30:00.000Z", "updated_at": "2026-10-01T09:12:00.000Z", "pushed_at": null }]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. |