I'm using crowdin's V1 API to send newly added keys to crowdin and now want to shift to v2 API of crowdin.
My current API is below
$url = "https://api.crowdin.com/api/project/$projectIdentifier/update-file?key=$projectKey"
Now I read in crowdin docmentation they asked to create storage first then add file and then update file. I believe create storage and add file must be one time activity and update file is the API which I would have to create which will get called daily. Is this correct understanding?
I've create storage and can access it. *I need example to of all 3 actions using ps1.
- add storage
- add file
- update file.*
I felt crowdin should have create storage for existing users who were using v1 API but looks like that's not there.
The Crowdin API v2 Storage is a separate container for each file. You need to use the Add Storage method before adding files to your projects via API. Files that should be uploaded into storage include files for localization, screenshots, glossaries, and translation memories.
In your case, the sequence of API calls will be the following:
Please note that storages are not permanent, they will be purged sometime after uploading. Also, it is not recommended to reuse storages, it's always better to create a new one.
In addition, feel free to check the official API Clients available: