CorefinityCorefinityDocs
Open the Control PanelControl Panel
Deployments · 5 of 10

List the repositories a connection can see

Asks the git provider for the repositories the connection's account can see, most recently updated first, at most 50. q searches part of their names. You must be someone who may deploy the site.

GET/api/corestack/sites/{site}/deployments/repositories

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Query parameters

connectionintegerRequired

The id of a repository connection you may use on this site, as the settings list them in connections.

qstring

Part of a repository's name. Up to 100 characters.

Returns

200 The repositories.

Fields of the 200 answer
repositoriesarray of objectsRequired

Up to 50 items.

Fields of each item
adminbooleanRequired

True when the connection's account can manage webhooks on the repository, which connecting it needs.

default_branchstring or nullRequired
namestringRequired
repostringRequired

The repository as owner/name, as the repository endpoint takes it.

urlstring or nullRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404noneCheck the id. You see only what your account can reach.
409needs_reauthThe repository's connection is gone or needs authorising again. Reconnect the repository.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.
502noneRead the message; it says what happened.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl 'https://manage.corefinity.com/api/corestack/sites/1042/deployments/repositories?connection=4217' \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "repositories": [
    {
      "admin": true,
      "default_branch": "main",
      "name": "harbourandfinch",
      "repo": "northwind-digital/harbourandfinch",
      "url": "https://gitlab.example.com/northwind-digital/harbourandfinch"
    },
    {
      "admin": false,
      "default_branch": "main",
      "name": "harbourandfinch-theme",
      "repo": "northwind-digital/harbourandfinch-theme",
      "url": "https://gitlab.example.com/northwind-digital/harbourandfinch-theme"
    }
  ]
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT