Added new array-formatted API call function.