In addition to the above documentation, here is a little known trick for building out API calls:
Workspace Reports are all built using the API, and you can get all the calls that are used to make your tables of data.
You first have to enable the debugger:

This will add a new icon onto your tables:

When you click on this, it will first ask you if you want to get the calls for the Freeform Table or for the Sparkline (choose the Table)

Next, it will show you different timestamps, some complex tables may need multiple calls, you can check each of these, and when you choose them, it will take you to a new screen that will show you the API requests in different languages (you can take the one relevant to you and use it as is, or modify it to suite you better.

Basically, if you can build a basic freeform table that returns the data you need in Workspaces, you can use those same calls to get the same data into your external data pulls.
Good luck.