Shows the repository a project is linked to, or null when it has none.
HTTP
GET /projects/{projectId}/repositoryAccess: Session token only. API keys get 403 with insufficient_scope.
Role: Project manager (organisation owners and admins are managers of every project).
Path parameters #
| Parameter | Description |
|---|---|
projectId | The id of the project. |
Response 200 #
The link, or null.
JSON
{
"provider": "github",
"repository": "acme/shop",
"url": "https://github.com/acme/shop",
"defaultBranch": "main",
"source": "locales/en.json",
"translations": "locales/{lang}.json",
"pullRequestUrl": "https://github.com/acme/shop/pull/1",
"connected": true
}Response fields #
| Field | Type | Description |
|---|---|---|
provider | string | github or gitlab. |
repository | string | The repository, such as acme/shop. |
url | string | Its web address. |
defaultBranch | string | Its default branch. |
source | string | Path of the source file. |
translations | string | Pattern of the translation files. |
pullRequestUrl | string or null | The setup pull or merge request. |
connected | boolean | Whether the connected account is still there. |
Errors #
| Status | error | When |
|---|---|---|
| 401 | unauthenticated | The token is missing or not valid. |
| 404 | not_found | The project does not exist in your organisation, you have no access to it, or projectId is not a UUID. |
| 403 | forbidden | You are a member of the project, but not a manager. |
| 429 | rate_limited | Too many requests, see Rate limiting. |
See Errors for the error format.