Appframe Knowledge Base


1 hits
3

Using Rest API to return result a API resource

Example of how to retrieve documents in Pims Document Control function getDocuments(){ jQuery.ajax({ url: "https://api.pimsdevhosting.com/dcs/documents/?take=100", type: "GET", beforeSend: function(xhr) { xhr.setRequestHeader("Authorization", "Basic " + btoa("Username" + ":" + "Password")); xhr.setRequestHeader("Accept","application/json"); }, success: function(resultData) { //here is your json. console.log(resultData); }, error : function(jqXHR, textStatus, errorThrown) { }, timeout: 120000, }); }

rest api web · Perma link post comment Posted by: Johnny Vik (10-jun-2015)

D. Young Hoang :
for sorting results, add parm ?order=["Title","OtherField"] or ?order=[{"desc":"Title"},{"asc","OtherField"}] This is important for paging since skip 0 or no skip does not implement row_number() causing the final results to skew... issue https://www.pims.no/issues/issue?43709 (03-jul-2018)