Upstream Paths
Date:October 07, 2026Author:Nicolas GallagherCategory:ENGINEERINGThe two upstream operations of a repository now have their own paths under /upstream. A repository
has an upstream when you create it with the upstream field. The
new paths take the same requests and return the same responses as the old paths.
POST /api/repos/{repo_name}/upstream/pull starts a sync from the upstream:
curl "$PIERRE_API_BASE_URL/repos/hello-world/upstream/pull" \
-X POST \
-H "Authorization: Bearer $PIERRE_TOKEN"The request returns 202, and the sync runs in the background:
{ "message": "Repository sync initiated successfully" }DELETE /api/repos/{repo_name}/upstream removes the upstream. The repository keeps its branches,
and it stops syncing:
curl "$PIERRE_API_BASE_URL/repos/hello-world/upstream" \
-X DELETE \
-H "Authorization: Bearer $PIERRE_TOKEN"{ "message": "repository detached" }A repository without an upstream returns 200 with repository already detached.
The old paths still work. They are deprecated, and each response has a Deprecation header. Move
each call to its replacement:
| Deprecated path | Replacement |
|---|---|
POST /api/repos/{repo_name}/pull-upstream | POST /api/repos/{repo_name}/upstream/pull |
POST /api/v1/repos/pull-upstream | POST /api/repos/{repo_name}/upstream/pull |
DELETE /api/repos/{repo_name}/base | DELETE /api/repos/{repo_name}/upstream |
DELETE /api/v1/repos/base | DELETE /api/repos/{repo_name}/upstream |
The SDK method repo.pullUpstream() still calls /api/v1/repos/pull-upstream, and it keeps
working.
See the API reference for repos.upstream.pull
and repos.upstream.delete.