Some of the translation is missing when downloading files via API

I’m using Crowdin REST API to do some tasks like automatically sync translation tables and convert them into POs, etc. Recently I found that translations of some keys are missing in downloaded file. However when I manually download it from the webpage it perfectly contains all the translations. Specifically I’m not using any optional parameters when using API, just passing file id and project id. Seems it’s a bug?

Hi @Midor ,

We would appreciate it if you could share some details about the specific API call you are using to download translations. Do you remember to build before downloading translations?

I’m using HTTP API:
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.files.download.get
I can correctly list projects and files, and get file metadatas. But file downloaded is missing lots of translations.

I am not sure if the translations were built. But if they were not, I wonder why the Web Dashboard could still provide a complete table?

I found the magic! Using API to build translation won’t automatically sync generated file to the project space, so download files directly from build API would be a better idea.
Thanks~

Hi @Midor ,

Well, the Download File API endpoint you shared is for downloading the source file from the project, not the translation file.

As to why you get the file with the latest translations through the UI, because in Crowdin Enterprise, when you click Download, a build is automatically created on the backend, and as a result, you get the latest translations.

If you download translations through the API, you need to first do Build Project Translation and then Download Project Translations