API updates
By Edouard on 3 juin 2014
Following up on our last post 6 new features to WebTranslateIt, here are 4 new features to WebTranslateIt’s API.
CORS support
WebTranslateIt now supports CORS: Cross Origin Resource Sharing requests. It enables the API to be requested from another domain.
New Endpoint: push by file path
The File API has a new endpoint to push a file by its path instead of pushing it by its ID. It’s useful to push a file without knowing it’s ID.
You can now use:
/api/projects/:project_token/files/...?file_path=path/to/file.po [PUT]
Instead of:
/api/projects/:project_token/files/:master_project_file_id/locales/:locale_code [PUT]
For more information please check the documentation on the File API.
Access the File Show API using JSONP
You can also now access the File Show endpoint using JSONP parameters by adding ?callback=callbackName
to the URL if the file requested is a JSON file. More information can be found on the File Show API endpoint documentation.
Organization API
We now have a brand new Organization API endpoint. For now it lets your retrieve all your projects (including their API tokens) and your collaborators. You will find your Organization API token in your organization settings.
I hope you will find these improvements on the API useful. Thank you for using WebTranslateIt.