Publish a locale to the CDN
Publish the locale's current translations as a new immutable bundle version, the API twin of the console's publish button.
Publish the locale's current translations as a new immutable bundle version, the API twin of the console's publish button. When the content is identical to the live version, no new version is minted and created is false. The bundle's format is the project's runtime delivery format. Needs a plan that includes CDN delivery; otherwise 403 plan-limit.
deployTokenAuthorizationBearer <token>A project deploy token, minted in the console under Settings, Developer, API tokens. Send the whole value, including the numeric prefix before the |. A token carries a set of abilities (push, pull, manage, read, write) and each operation requires one of them. Tokens do not inherit from each other: a manage token cannot read the glossary unless it also has read.
application/json- body
locale*stringlength <= 35The live bundle for this locale.
application/json- response
locale?stringversion?integerThe published version number. Versions only increase.
format?FileFormatA file format transglot reads and writes.
"json_flat""json_nested""android_xml""ios_strings""ios_stringsdict""flutter_arb""laravel_php""laravel_json""xliff_12""ios_xcstrings""gettext_po""yaml""csv""xlsx""xliff_20""java_properties""resx""markdown""unity_csv""unreal_po"content_hash?stringSHA-256 of the bundle body. It is the bundle's ETag.
key_count?integerEntries in the bundle.
omitted_invalid_icu_keys?integerTranslations left out of the bundle because their message syntax would fail at runtime. They are not counted in key_count.
byte_size?integercreated?booleanfalse when the content was identical to the live version, so no new version was minted.
published_at?stringdate-timeimmutable_url?stringThe URL of this exact version. Its response never changes.
urilatest_url?stringThe URL that always serves the newest published version.
uricurl -X POST 'https://api.transglot.ai/v1/cdn/publish' \ -H 'Content-Type: application/json' \ -d '{ "locale": "fr"}'{ "locale": "string", "version": 0, "format": "json_flat", "content_hash": "string", "key_count": 0, "omitted_invalid_icu_keys": 0, "byte_size": 0, "created": true, "published_at": "2019-08-24T14:15:22Z", "immutable_url": "http://example.com", "latest_url": "http://example.com"}