To sort the data, a query string needs to be added in the following format:

/api/[entity]?sort=[field]

It is possible to sort on multiple fields:

/api/[entity]?sort=[field],[field2]

Example

The following example is in javascript, using jQuery:

function getData(){
 $.ajax({
      type: "GET",
      url: 'https://[subdomain].manageworkonline.com/awt/api/[entity]?sort=[field]',
      crossDomain: true,
      xhrFields: { withCredentials: true },
      success: function(response){
           if(response.Success){
                if(response.Data.length > 0) alert(response.Data[0].Id); 
                else alert("No data found");
           } else {
                alert(response.ErrorMessage);
           }
      },
      dataType: "json"
   });
}

For further information view Entities

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Please do not use this for support questions.
For customer support, please contact us here.

Post Comment