A lot of API automation for MSV needs to use a list of the actions in MSV to “do things.” The default endpoint used by many customers is GET /manage_sims/actions.json. But this endpoint is very heavy. (And will return ALL of the data for over 7k actions!) Depending on your connection (and resources available to your director) this may take a while and potentially timeout.
There is a better way, and it is using GET /manage_sims/v2/actions/library_actions_list which takes the following parameters:
- order_by - MSV itself uses the value ‘last_added’ which has worked well in all applications this author has needed
- page_number - The page number of results to pull down. MSV starts counting at zero.
- page_size - The number of elements to return per page
- direction - the order to put the order_by column. ‘asc’ is the value this author uses primarily.
The best way to use this endpoint if you want to pull the entire repository of active actions in the MSV library is to choose a decent size to pull (say 500) and iterate through that size until the return value of the call’s length is < size.
This does require more total iterations of API calls, but each one is less work for the director and less data to be transmitted over the wire.