Returns the translations of one language as { "key": "text" }. For the source language it returns the source strings. See also Pull translations for your build.
HTTP
GET /projects/{projectId}/pullAccess: Session token, or an API key with the translations:read scope.
Role: Any role in the project.
Path parameters #
| Parameter | Description |
|---|---|
projectId | The id of the project. |
Query parameters #
| Parameter | Required | Description |
|---|---|---|
language | yes | A language code of the project, or its source language. Not case sensitive. |
branch | no | The branch name. Unknown or missing names fall back to the protected branch. |
tag | no | The name of a tag. Returns the snapshot of that tag instead of a branch, and branch is ignored. |
status | no | approved (default) returns published translations. all also returns drafts and ones waiting for review. |
Response 200 #
The translations.
JSON
{
"branch": "main",
"tag": null,
"language": "de-de",
"total": 2,
"translated": 1,
"keys": { "checkout.title": "Kasse" }
}Response fields #
| Field | Type | Description |
|---|---|---|
branch | string | The branch that was read. For a tag, the branch the tag was taken from. |
tag | string or null | The tag that was read, or null when a branch was read. |
language | string | The language code. |
total | integer | Keys with a source text. |
translated | integer | Keys with a published translation. When the project does not require review, translations in review count as published. |
keys | object | Key name to text. Only keys that have a text, and are published unless status=all. |
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. |
| 404 | not_found | tag is given and the project has no tag with that name. |
| 404 | not_found | language is not a language of the project and not its source language. |
| 429 | rate_limited | Too many requests, see Rate limiting. |
See Errors for the error format.