It’s been two weeks since I posted about starting work on the Amara API Refactor and I wanted to share the progress since then.
As usual, I underestimated the amount of work it would take. Originally I was estimating 2-4 weeks of development time. After 2 weeks, I can safely say that 4 weeks is the minimum amount of time and 6 is probably a better guess.
One of the things I didn’t realize would be so difficult is matching the old API exactly. Things like the “meta” variable for paginated lists and making the input/output format selection all took longer than expected. Hopefully I got it right, please tell me if there is a mismatch between the old output and the new.
With all of that said, there are a couple endpoints that have been implemented and the code was being deployed as I typed this out. If you use the API, I would love for you to check out the new implementations. One of the biggest improvements with the new API is the browser-friendly endpoints, so you should be able to navigate to the URLs in your browser and test them out. Make sure you’re logged in to the site first and also make sure that any data you POST to the endpoints is really what you want. Here’s the endpoints implemented so far:
- http://amara.org/api/videos/ — The videos endpoint is probably the most complex one we have so please test it out if you depend on the functionality.
- http://amara.org/api/videos/(video-id)/languages/(language-code)/subtitles/actions/ — Is a way to view subtitle actions. This is a generic system to perform actions on subtitle sets that works with both the tasks and the collab models. Actions generally correspond to the buttons in the workflow area of the editor (Publish, Approve, Endorse, Send Back, etc). This endpoint lets you view the list of possible actions as well as perform them.
- http://amara.org/api/videos/(video-id)/languages/(language-code)/subtitles/notes/ — Lists the editor notes for subtitles. Again, this is only currently working for task/collab based teams.
Lastly, I’ve been putting in work to make sure the API docs are up-to-date and readable. http://amara.readthedocs.org/en/latest/new-api.html contains a description of the new API. The sections are basically the same as before, but hopefully it’s a bit more clear.