Skip to content

API V1

Projects

Endpoints for the operations that can be performed on projects of a workspace

API V1 addresses a project by two slugs, {workspaceUrl} and {projectUrl}. List all projects returns them in the self link of each project; see Workspace and project URLs. With an API key, the list contains the projects of the key’s workspace that the key can access.

Permissions

Operation Permission
List all projects Any valid API key
Get translation status of all accessible workspace projects generalView on the workspace
Get project details generalView on the project
Get project resource file status resourcesView on the project
Create a project settingsManage on the workspace

Translation status

Get translation status of all accessible workspace projects returns one entry per project:

  • status maps each language code to the number of texts per status. The statuses are NOT_TRANSLATED, PRE_TRANSLATED, DRAFT and APPROVED; PRE_TRANSLATED counts the texts that are AI translated.
  • url is the address of the project in the LingoHub app, not its slug.

Get project resource file status reports the same per file and language, with the statuses NOT_TRANSLATED, DRAFT, TRANSLATED and APPROVED. It accepts the query parameter branch; without it, LingoHub reads the default branch.

Project details

  • links contains self, weburl (the project in the LingoHub app) and resources (the list of its resource files). Two more entries, translations and search, remain for older clients; their href is the word discontinued.
  • owner_email is the billing email address of the workspace.

Resource file status

  • filePathWithLocalePlaceholder is the path of a file with %{locale} in place of the language. Use it for filePaths when you request an export.
  • supportedExportFormats lists the formats the files can be downloaded in: ios.strings, ios.stringsdict, android.string.resources, properties and standard_json. Pass one as projectType to Download a resource file. The export request uses other values for exportFormat.
  • repositoryConnections has one entry per provider: github, bitbucket, gitlab, azure and aws_code_commit. connected is true for the provider the project is connected to.

Create a project

resourceType decides the file format of the project and can’t be changed later. Allowed values:

File format resourceType
Android XML android_xml
Apple .strings and .stringsdict ios_strings
Flutter ARB arb
Java properties properties
Gettext PO gettext_po
RESX and RESW windows_resx
Qt Linguist TS qt_linguist_ts
PHP define php_define
INI standard_ini
Ruby on Rails YAML rails_yaml
Symfony YAML symfony2_yaml
JSON standard_json
angular-translate JSON angular_translate_json
React Intl JSON react_intl_json
i18next JSON i18next_json
go-i18n JSON json_go_i18n
Chrome i18n JSON chrome_i18n
CSV with one column per language csv
XLIFF 1.2 xliff
Markdown markdown
Plain text txt
Twine twine_txt
HTML html

Any other value returns 422 with the code project.resource_type.invalid. API V1 can’t create projects of the newer project types, such as Xcode String Catalogs or XLIFF 2; create those in the LingoHub app or with API V2. See Supported file formats.

A successful request returns 200 with the details of the new project.

Errors

Status Meaning
401 The API key is missing or invalid.
403 The key lacks the permission the operation needs.
404 The workspace or the project doesn’t exist.
422 The body of Create a project is invalid, or the branch doesn’t exist.

Operations

Operation Request
Create a project POST /v1/{workspaceUrl}/projects
Get project details GET /v1/{workspaceUrl}/projects/{projectUrl}
Get project resource file status GET /v1/{workspaceUrl}/projects/{projectUrl}/status
Get translation status of all accessible workspace projects GET /v1/{workspaceUrl}/projects/status
List all projects GET /v1/projects