HTTP API

I18n

GET/api/v1/i18n/projects
GET
/api/v1/i18n/projects

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

q?string

Full-text search query applied to project name

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Page size

Formatint64
Range0 <= value
sort_by?string

Sort field (created_at, name, active_version)

sort_order?string

Sort order (asc or desc)

Value in

  • "asc"
  • "desc"

Response Body

application/json

curl -X GET "https://example.com/api/v1/i18n/projects"
{  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  },  "projects": [    {      "active_version": 0,      "approval_required": true,      "base_locale": "string",      "created_at": "2019-08-24T14:15:22Z",      "created_by": "string",      "fallback_policy": {        "default_chain": [          "string"        ],        "locale_overrides": {          "property1": [            "string"          ],          "property2": [            "string"          ]        },        "mode": "recursive"      },      "name": "string",      "project_id": "string",      "translator_roles": [        "string"      ],      "updated_at": "2019-08-24T14:15:22Z"    }  ]}
POST/api/v1/i18n/projects
POST
/api/v1/i18n/projects

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/i18n/projects" \  -H "Content-Type: application/json" \  -d '{    "base_locale": "string",    "name": "string"  }'
{  "active_version": 0,  "approval_required": true,  "base_locale": "string",  "created_at": "2019-08-24T14:15:22Z",  "created_by": "string",  "fallback_policy": {    "default_chain": [      "string"    ],    "locale_overrides": {      "property1": [        "string"      ],      "property2": [        "string"      ]    },    "mode": "recursive"  },  "name": "string",  "project_id": "string",  "translator_roles": [    "string"  ],  "updated_at": "2019-08-24T14:15:22Z"}
GET/api/v1/i18n/projects/{project_id}
GET
/api/v1/i18n/projects/{project_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/i18n/projects/string"
{  "active_version": 0,  "approval_required": true,  "base_locale": "string",  "created_at": "2019-08-24T14:15:22Z",  "created_by": "string",  "fallback_policy": {    "default_chain": [      "string"    ],    "locale_overrides": {      "property1": [        "string"      ],      "property2": [        "string"      ]    },    "mode": "recursive"  },  "name": "string",  "project_id": "string",  "translator_roles": [    "string"  ],  "updated_at": "2019-08-24T14:15:22Z"}
POST/api/v1/i18n/projects/{project_id}/experiments
POST
/api/v1/i18n/projects/{project_id}/experiments

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/i18n/projects/string/experiments" \  -H "Content-Type: application/json" \  -d '{    "experiment_id": "string",    "key": "string",    "variants": [      {        "experiment_id": "string",        "value": "string",        "variant": "string",        "weight": 0      }    ]  }'
{  "experiment_id": "string",  "key": "string",  "record_id": "string",  "variant_count": 0}
GET/api/v1/i18n/projects/{project_id}/locales
GET
/api/v1/i18n/projects/{project_id}/locales

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/i18n/projects/string/locales"
{  "locales": [    {      "active_version": 0,      "coverage": {        "fallback_hits_24h": 0,        "missing_keys": 0,        "translated_keys": 0      },      "display_name": "string",      "fallback_chain": [        "string"      ],      "locale": "string",      "locale_id": "string",      "plural_rules": "string",      "project_id": "string",      "status": "draft",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "project_id": "string"}
POST/api/v1/i18n/projects/{project_id}/locales
POST
/api/v1/i18n/projects/{project_id}/locales

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/i18n/projects/string/locales" \  -H "Content-Type: application/json" \  -d '{    "display_name": "string",    "locale": "string"  }'
{  "active_version": 0,  "coverage": {    "fallback_hits_24h": 0,    "missing_keys": 0,    "translated_keys": 0  },  "display_name": "string",  "fallback_chain": [    "string"  ],  "locale": "string",  "locale_id": "string",  "plural_rules": "string",  "project_id": "string",  "status": "draft",  "updated_at": "2019-08-24T14:15:22Z"}
GET/api/v1/i18n/projects/{project_id}/locales/{locale}/bundle
GET
/api/v1/i18n/projects/{project_id}/locales/{locale}/bundle

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string
locale*string

Query Parameters

include_fallback?boolean

Include fallback-resolved values for missing keys

Response Body

application/json

curl -X GET "https://example.com/api/v1/i18n/projects/string/locales/string/bundle"
{  "etag": "string",  "locale": "string",  "project_id": "string",  "published_at": "2019-08-24T14:15:22Z",  "strings": {    "property1": "string",    "property2": "string"  },  "version": 0}
POST/api/v1/i18n/projects/{project_id}/publish
POST
/api/v1/i18n/projects/{project_id}/publish

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/i18n/projects/string/publish" \  -H "Content-Type: application/json" \  -d '{}'
{  "active_version": 0,  "project_id": "string",  "published_locales": [    {      "key_count": 0,      "locale": "string",      "version": 0    }  ]}
GET/api/v1/i18n/projects/{project_id}/report/missing
GET
/api/v1/i18n/projects/{project_id}/report/missing

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string

Query Parameters

locale?string

Filter by locale

namespace?string

Filter by namespace

caller?string

Filter by caller

Response Body

application/json

curl -X GET "https://example.com/api/v1/i18n/projects/string/report/missing"
{  "events": [    {      "caller": "string",      "count": 0,      "fallback_used": "string",      "first_seen_at": "2019-08-24T14:15:22Z",      "key": "string",      "last_seen_at": "2019-08-24T14:15:22Z",      "locale": "string",      "namespace": "string"    }  ],  "project_id": "string"}
GET/api/v1/i18n/projects/{project_id}/resolve
GET
/api/v1/i18n/projects/{project_id}/resolve

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string

Query Parameters

locale*string

Locale to resolve for

key*string

Translation key to resolve

count?integer

Optional plural count for pluralized keys

Formatint64
var?array<string>

Variable values as repeated name:value pairs

context?array<string>

Context selectors as repeated name:value pairs

subject_id?string

Subject id used for deterministic A/B bucketing

Response Body

application/json

curl -X GET "https://example.com/api/v1/i18n/projects/string/resolve?locale=string&key=string"
{  "resolved": {    "experiment_id": "string",    "fallback_path": [      "string"    ],    "key": "string",    "rich_text_markdown": true,    "source_locale": "string",    "tone": null,    "value": "string",    "variant": "string",    "version": 0  }}
POST/api/v1/i18n/projects/{project_id}/resolve-batch
POST
/api/v1/i18n/projects/{project_id}/resolve-batch

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/i18n/projects/string/resolve-batch" \  -H "Content-Type: application/json" \  -d '{    "keys": [      "string"    ],    "locale": "string"  }'
{  "missing": [    "string"  ],  "resolved": [    {      "experiment_id": "string",      "fallback_path": [        "string"      ],      "key": "string",      "rich_text_markdown": true,      "source_locale": "string",      "tone": null,      "value": "string",      "variant": "string",      "version": 0    }  ]}
POST/api/v1/i18n/projects/{project_id}/rollback
POST
/api/v1/i18n/projects/{project_id}/rollback

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/i18n/projects/string/rollback" \  -H "Content-Type: application/json" \  -d '{    "locale": "string",    "version": 0  }'
{  "locale": "string",  "project_id": "string",  "restored_version": 0}
POST/api/v1/i18n/projects/{project_id}/telemetry/missing
POST
/api/v1/i18n/projects/{project_id}/telemetry/missing

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/i18n/projects/string/telemetry/missing" \  -H "Content-Type: application/json" \  -d '{    "caller": "string",    "key": "string",    "locale": "string"  }'
{  "count": 0,  "key": "string",  "locale": "string"}
POST/api/v1/i18n/projects/{project_id}/translations/approve
POST
/api/v1/i18n/projects/{project_id}/translations/approve

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/i18n/projects/string/translations/approve" \  -H "Content-Type: application/json" \  -d '{    "locale": "string"  }'
{  "approved": 0,  "locale": "string",  "project_id": "string"}
POST/api/v1/i18n/projects/{project_id}/translations/upload
POST
/api/v1/i18n/projects/{project_id}/translations/upload

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

project_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/i18n/projects/string/translations/upload" \  -H "Content-Type: application/json" \  -d '{    "locale": "string",    "strings": {      "property1": {},      "property2": {}    }  }'
{  "created": 0,  "locale": "string",  "project_id": "string",  "updated": 0,  "upload_id": "string",  "validation_errors": [    {      "key": "string",      "message": "string"    }  ]}

On this page