Get Lokalize Item By Key Name instead of Key Id

322 Views Asked by At

We are using lokalise REST api to get the translation from the key id. GET https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id} https://app.lokalise.com/api2docs/curl/#resource-keys

The problem is that we don't know the id of the resource but only key name of the resource. How do get the translation from key-name (like welcome_message) instead of key-d(like 123)

1

There are 1 best solutions below

0
Imran Qadir Baksh - Baloch On BEST ANSWER

I got the answer from Lokalise team support. I need to use filter_keys to filter data from all keys, include_translations to get the translation and filter_translation_lang_ids to get specfic languge (though the language id is not ISO standard but Lokalise internal language id). Here is an example,

Example below,

https://api.lokalise.com/api2/projects/project_id/keys?filter_keys=key_name&include_translations=1&filter_translation_lang_ids=123