Manual
CLI
API
Log in Get started free

Scan a GitLab repository

Looks for locale files in a repository, so the setup form can be filled in.

Looks for locale files in a repository, so the setup form can be filled in.

HTTP
GET /integrations/gitlab/scan

Access: Session token only. API keys get 403 with insufficient_scope.

Role: Organisation owner or admin.

Query parameters #

ParameterRequiredDescription
repoyesThe repository, such as acme/shop.
connectionIdyesThe connectionId of a connected account, from the overview.
sourceLanguagenoThe language code of the source file. Default en.

Response 200 #

What was found.

JSON
{
  "defaultBranch": "main",
  "name": "shop",
  "source": "locales/en.json",
  "pattern": "locales/{lang}.json",
  "languages": ["de", "fr"],
  "ignored": []
}

Response fields #

FieldTypeDescription
defaultBranchstringThe default branch.
namestringThe name of the repository.
sourcestring or nullThe guessed path of the source file, such as locales/en.json.
patternstring or nullThe guessed pattern of the translation files, with {lang}.
languageslist of stringLanguages that already have a file.
ignoredlistPaths that look like locale files but were not used.

Errors #

StatuserrorWhen
401unauthenticatedThe token is missing or not valid.
403forbiddenYou are not an owner or admin.
503gitlab_not_configuredThe GitLab integration is not set up on this server.
404not_foundThe account is not connected to your organisation.
422invalid_requestrepo is not valid.
502gitlab_errorGitLab refused the request. message says why.
429rate_limitedToo many requests, see Rate limiting.

See Errors for the error format.