CorefinityCorefinityDocs
Open the Control PanelControl Panel
Enterprise deployments · 13 of 17

List the git accounts for a repository

Answers the git accounts you may set a repository of this environment up with: those of the environment's company and of the agencies that manage it, as far as you may use them. Send an account's id as connection_id when you add or change a repository.

GET/api/environments/{environment}/repositories/connections

Path parameters

environmentintegerRequired

The id of a CoreStack Enterprise environment. Not the same number as a site row id. At least 1.

Returns

200 The git accounts. Empty when there is none you may use.

Fields of the 200 answer
connectionsarray of objectsRequired
Fields of each item
companystringRequired

The company the account belongs to.

idstringRequired
providerstringRequired

The git provider, such as github, gitlab, bitbucket or gitlab_self_hosted.

usernamestringRequired

The account's name at the provider.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403scope_requiredUse a token with the scope named in scope.
404noneCheck the id. You see only what your account can reach.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/environments/1311/repositories/connections \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "connections": [
    {
      "company": "Harbour & Finch",
      "id": "4216",
      "provider": "github",
      "username": "daniel-reyes"
    }
  ]
}
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