Using Get Lead Activities, we need to provide the activity types.
It seems weird that in order to know what activity types there are (I only found out that "12" is "lead created"), we're supposed to call "Get Activity Types" API. (http://developers.marketo.com/documentation/rest/get-activity-types/ )
I only want to see the list of activity types so I can choose which ones to specify in the "Get Lead Activities" when offline querying the activities. This is not a programatic/dynamic action, it's something I need to know in development time.
Why is there no documentation of the available activity types online anywhere? Or is there?
Not every instance should be expected to have the same Activity Type list. And although common Activity Types have the same Type ID across instances in my experience, even that may not be strictly guaranteed.
Not sure I agree with how you're distinguishing runtime and development time. Knowing the most current Types & Type IDs certainly can be required at runtime, unless you don't care about missing information. (I understand you wouldn't care about newer Type IDs if you're only fetching records for a single known/cached Type ID, but the list is not inherently an offline resource.)
Anyway, surely you can download the list and save the JSON offline?
well, to get all activities, it would have been helpful if the default (without types) was all activity types, or have an option for that. Asking to specify the type IDs in the request, yet not providing documentation on available ones (even the common ones) is a bit weird.
I did follow your suggestion to issue the request and get the JSON. The "description" field is very limited documentation for each activity type.
For writing code for multiple instances, it would be helpful to know what activities are common, and the JSON doesn't provide that information either.
Yes, it might sound good to "get all" by default, but this could be overwhelming (and you may run out of API calls). You really need to profile your instance to know how to most efficiently use the API, and the limit of 10 might be kind of punitive but it works out for the best IME.
The Activities endpoint is just surfacing a machine-readable version of the user-readable Activity Log, with very few exceptions. If there are some Types that are confusing, please post them here and we can explain what they signify.