Repositories
The repository a function deploys from. Reachable with a team API key.
postDisconnect a function's repository
Stops the function deploying from its repository and returns the updated function, whose workspace becomes editable again. For GitLab, the webhook and the project access token provisioned for this function are removed on a best-effort basis. The active version keeps serving. A function with no repository is returned unchanged. Needs the editor role in the owning team. A `git.disconnect` event is recorded. Callable with a console session or a team API key (`Authorization: Bearer xk_…`). **Required scopes:** `functions:functions:edit`
postList deployable repositories
Lists the repositories a provider connection can deploy from, with each one's full name, default branch and visibility, sorted by full name. With `connectionId`, it lists that team connection's repositories, which needs the viewer role in the connection's team. Otherwise it lists through `functionId`'s own provider connection, which needs the viewer role in the function's team. `search` filters GitLab projects; a GitHub App installation lists every repository it covers. Pages default to 50 repositories and are capped at 500 (`limit`); pass `nextCursor` back as `cursor` until it comes back empty. The flags tell a picker what to show instead of an empty list. `connected` is false when the function has no provider yet. `listable` is false when the connection cannot enumerate repositories. `reconnect` is true when the credential that could list has lapsed. A provider whose integration is not configured on this deployment answers `UNIMPLEMENTED`. Callable with a console session or a team API key (`Authorization: Bearer xk_…`). **Required scopes:** `functions:functions:read`
postSet the repository a function deploys from
Points the function at one repository from `ListRepositories`, with the branch that deploys (the repository's default branch when empty) and an optional `subdirectory`. The function must already have a provider connected (`FAILED_PRECONDITION` otherwise). For GitLab this also registers the push webhook and provisions a project access token. That needs Maintainer access on the project (`PERMISSION_DENIED` otherwise) and a connect session that has not expired (`FAILED_PRECONDITION`). `outcome` is `REPOSITORY_OUTCOME_CONNECTED`, or `REPOSITORY_OUTCOME_CONNECTED_NO_TOKEN` when the webhook was registered but no deploy token could be created. For GitHub, the App installation supplies the credential and the webhook, and `outcome` is `REPOSITORY_OUTCOME_CONNECTED`. Needs the editor role in the owning team. A `git.select_repo` event is recorded. Callable with a console session or a team API key (`Authorization: Bearer xk_…`). **Required scopes:** `functions:functions:edit`
Get my Functions role POST
Returns whether the caller is a platform administrator, and their Functions role (`admin`, `editor` or `viewer`) in each of their teams. Takes no parameter and reads nobody else. Needs a signed-in user: team API keys are refused (`PERMISSION_DENIED`). **Required scopes:** `functions:functions:read`
Disconnect a function's repository POST
Stops the function deploying from its repository and returns the updated function, whose workspace becomes editable again. For GitLab, the webhook and the project access token provisioned for this function are removed on a best-effort basis. The active version keeps serving. A function with no repository is returned unchanged. Needs the editor role in the owning team. A `git.disconnect` event is recorded. Callable with a console session or a team API key (`Authorization: Bearer xk_…`). **Required scopes:** `functions:functions:edit`