In my opinion using the report transformation type facility would provide a better solution. Have a look at
But to answer your question, documentation of the API is scattered on the forum in combination with self documentation. See Search results for 'api' - Manager Forum