<script>
$(document).ready(function () {
$.ajax({
type: "GET",
url: "<your_api_path_here>",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
//alert(JSON.stringify(data));
//process your data here
},
failure: function (data) {
alert(data.responseText);
},
error: function (data) {
alert(data.responseText);
}
});
});
</script>