Hi Adam,
Unfortunately, there still isn't complete documentation for the API. :-/ Lately, I haven't had a lot of time for this project.
However, I can give you a super quick overview and explain how to gleen more information from the code! If you would be willing to help create documentation as you learn the API, that would be awesome. :-) If you're interested in doing that, you can just start editting the Wiki on GitHub:
All the code for the API and be found in this file:
All of the endpoints take HTTP POST requests and accept/return JSON (except for the top-level URL, which is a GET request and returns text with version information). So, the API is actually not quite RESTful, it's more like a super simple HTTP RPC.
There is one magic URL, /list_collections which returns the names of all available collections. Every other URL will contain the collection name and is directly connected to a Handler class:
/collection/[NAME]/[METHOD] -> CollectionHandler
/collection/[NAME]/model/[MODEL_ID]/[METHOD] -> ModelHandler
/collection/[NAME]/note/[NOTE_ID]/[METHOD] -> NoteHandler
/collection/[NAME]/deck/[DECK_ID]/[METHOD] -> DeckHandler
/collection/[NAME]/card/[CARD_ID]/[METHOD] -> CardHandler
Replace [NAME] with the collection name and [METHOD] with a paricular method on the Handler class that you want to call. So, for example, POSTing to this URL:
/collection/mine/latest_notes
... will call the CollectionHandler.latest_notes() method in the rest_app.py file I linked above.
Unfortunately, right now, the only way to find out what arguments each method takes is by looking at the code. But all the methods are pretty short and *usually* are just stubs that call a similarly named function in Anki.
If you want to help by documenting the methods as you learn how they work, please update this page in the Wiki:
I hope that helps and thanks in advance for any help!
Best regards,
David.